48 lines · plain
1# REQUIRES: aarch642 3# RUN: llvm-mc -triple=aarch64-windows-gnu %s -filetype=obj -o %t-arm64.obj4# RUN: llvm-mc -triple=arm64ec-windows-gnu %s -filetype=obj -o %t-arm64ec.obj5# RUN: lld-link -machine:arm64x -lldmingw -out:%t.exe -opt:ref -entry:main %t-arm64.obj %t-arm64ec.obj -verbose 2>&1 | FileCheck %s6# CHECK: Discarded unused7 8# Check that __gxx_personality_v0 is not discarded and is present in the output.9 10# RUN: llvm-objdump -d %t.exe | FileCheck --check-prefix=DISASM %s11# DISASM: 0000000140001000 <.text>:12# DISASM-NEXT: 140001000: 52800000 mov w0, #0x0 // =013# DISASM-NEXT: 140001004: d65f03c0 ret14# DISASM-NEXT: 140001008: 52800020 mov w0, #0x1 // =115# DISASM-NEXT: 14000100c: d65f03c0 ret16# DISASM-NEXT: ...17# DISASM-NEXT: 140002000: 52800000 mov w0, #0x0 // =018# DISASM-NEXT: 140002004: d65f03c0 ret19# DISASM-NEXT: 140002008: 52800020 mov w0, #0x1 // =120# DISASM-NEXT: 14000200c: d65f03c0 ret21 22 .def main; .scl 2; .type 32; .endef23 .section .text,"xr",one_only,main24 .globl main25main:26 .cfi_startproc27 .cfi_personality 0, __gxx_personality_v028 mov w0, #029 ret30 .cfi_endproc31 32 .def __gxx_personality_v0; .scl 2; .type 32; .endef33 .section .text,"xr",one_only,__gxx_personality_v034 .globl __gxx_personality_v035__gxx_personality_v0:36 mov w0, #137 ret38 39 .def unused; .scl 2; .type 32; .endef40 .section .text,"xr",one_only,unused41 .globl unused42unused:43 .cfi_startproc44 .cfi_personality 0, __gxx_personality_v045 mov w0, #246 ret47 .cfi_endproc48