brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 584c02f Raw
43 lines · plain
1// REQUIRES: aarch642// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t3// RUN: ld.lld --image-base=0x12000 -Ttext=0x12000 -defsym long=0x10000000 -defsym short=0x8012004 -defsym short2=0x8012008 -defsym short3=0x801200c %t -o %t.exe4// RUN: llvm-objdump -d --no-show-raw-insn %t.exe | FileCheck %s5 6/// The AArch64AbsLongThunk requires 8-byte alignment just in case unaligned7/// accesses are disabled. This increases the thunk section alignment to 8,8/// and the alignment of the AArch64AbsLongThunk to 8. The short thunk form9/// can still use 4-byte alignment.10.text11.type _start, %function12.globl _start13_start:14 b short15 b short216 b short317 b long18 nop19 20// CHECK-LABEL: <_start>:21// CHECK-NEXT: 12000: b       0x12018 <__AArch64AbsLongThunk_short>22// CHECK-NEXT:        b       0x1201c <__AArch64AbsLongThunk_short2>23// CHECK-NEXT:        b       0x12020 <__AArch64AbsLongThunk_short3>24// CHECK-NEXT:        b       0x12028 <__AArch64AbsLongThunk_long>25// CHECK-NEXT:        nop26// CHECK-NEXT:        udf     #0x027// CHECK-EMPTY:28// CHECK-LABEL: <__AArch64AbsLongThunk_short>:29// CHECK-NEXT: 12018: b       0x8012004 <__AArch64AbsLongThunk_long+0x7ffffdc>30// CHECK-EMPY:31// CHECK-LABEL: <__AArch64AbsLongThunk_short2>:32// CHECK-NEXT: 1201c: b       0x8012008 <__AArch64AbsLongThunk_long+0x7ffffe0>33// CHECK-EMPTY:34// CHECK-LABEL: <__AArch64AbsLongThunk_short3>:35// CHECK-NEXT: 12020: b       0x801200c <__AArch64AbsLongThunk_long+0x7ffffe4>36// CHECK-NEXT:        udf     #0x037// CHECK-EMPTY:38// CHECK-LABEL: <__AArch64AbsLongThunk_long>:39// CHECK-NEXT: 12028: ldr     x16, 0x12030 <__AArch64AbsLongThunk_long+0x8>40// CHECK-NEXT:        br      x1641// CHECK-NEXT: 00 00 00 10   .word   0x1000000042// CHECK-NEXT: 00 00 00 00   .word   0x0000000043