brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 51bbb49 Raw
76 lines · plain
1// RUN: llvm-mc -triple aarch64-unknown-windows-msvc -filetype obj %s -o - | llvm-objdump -D -r - | FileCheck %s2// RUN: not llvm-mc -triple aarch64-unknown-windows-msvc -filetype obj --defsym ERR=1 %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR3 4    .text5main:6    nop7    b .Ltarget8    b .Lother_target9 10// A privte label target in the same section11    .def .Ltarget12    .scl 313    .type 3214    .endef15    .p2align 216.Ltarget:17    ret18 19// A privte label target in another section20    .section "other"21    nop22    nop23    nop24    nop25    nop26    nop27    nop28    nop29    .def .Lother_target30    .scl 331    .type 3232    .endef33    .p2align 234.Lother_target:35    ret36 37// Check that both branches have a relocation with a zero offset.38//39// CHECK: 0000000000000000 <main>:40// CHECK:        0: d503201f      nop41// CHECK:        4: 14000000      b       0x4 <main+0x4>42// CHECK:                 0000000000000004:  IMAGE_REL_ARM64_BRANCH26     .Ltarget43// CHECK:        8: 14000000      b       0x8 <main+0x8>44// CHECK:                 0000000000000008:  IMAGE_REL_ARM64_BRANCH26     .Lother_target45// CHECK: 000000000000000c <.Ltarget>:46// CHECK:        c: d65f03c0      ret47// CHECK: 0000000000000000 <other>:48// CHECK:        0: d503201f      nop49// CHECK:        4: d503201f      nop50// CHECK:        8: d503201f      nop51// CHECK:        c: d503201f      nop52// CHECK:       10: d503201f      nop53// CHECK:       14: d503201f      nop54// CHECK:       18: d503201f      nop55// CHECK:       1c: d503201f      nop56// CHECK: 0000000000000020 <.Lother_target>:57// CHECK:       20: d65f03c0      ret58 59.ifdef ERR60    .section "err"61err:62    nop63    b .Lerr_target+464// ERR: [[#@LINE-1]]:19: error: cannot perform a PC-relative fixup with a non-zero symbol offset65 66    .def .Lerr_target67    .scl 368    .type 3269    .p2align 270    .endef71.Lerr_target:72    nop73    nop74    ret75.endif76