brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · c9d185f Raw
51 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t3// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/far-arm-abs.s -o %tfar4// RUN: ld.lld  %t %tfar -o %t25// RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --triple=armv7a-none-linux-gnueabi %t2 | FileCheck --check-prefix=SHORT %s6// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/far-long-arm-abs.s -o %tfarlong7// RUN: ld.lld  %t %tfarlong -o %t38// RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --triple=armv7a-none-linux-gnueabi %t3 | FileCheck --check-prefix=LONG %s9 .syntax unified10 .section .text, "ax",%progbits11 .globl _start12 .balign 0x1000013 .type _start,%function14_start:15 /// address of too_far symbols are just out of range of ARM branch with16 /// 26-bit immediate field and an addend of -817 bl  too_far118 b   too_far219 beq too_far320 21// SHORT: 00030000 <_start>:22// SHORT-NEXT:    30000: bl      0x3000c <__ARMv7ABSLongThunk_too_far1>23// SHORT-NEXT:    30004: b       0x30010 <__ARMv7ABSLongThunk_too_far2>24// SHORT-NEXT:    30008: beq     0x30014 <__ARMv7ABSLongThunk_too_far3>25// SHORT:      0003000c <__ARMv7ABSLongThunk_too_far1>:26/// 0x2030008 = too_far127// SHORT-NEXT:    3000c: b       0x203000828// SHORT:      00030010 <__ARMv7ABSLongThunk_too_far2>:29/// 0x203000c = too_far230// SHORT-NEXT:    30010: b       0x203000c31// SHORT:      00030014 <__ARMv7ABSLongThunk_too_far3>:32/// 0x2030010 = too_far333// SHORT-NEXT:    30014: b       0x203001034 35// LONG:      00030000 <_start>:36// LONG-NEXT:    30000: bl      0x3000c <__ARMv7ABSLongThunk_too_far1>37// LONG-NEXT:    30004: b       0x30018 <__ARMv7ABSLongThunk_too_far2>38// LONG-NEXT:    30008: beq     0x30024 <__ARMv7ABSLongThunk_too_far3>39// LONG:      0003000c <__ARMv7ABSLongThunk_too_far1>:40// LONG-NEXT:    3000c: movw    r12, #2041// LONG-NEXT:    30010: movt    r12, #51542// LONG-NEXT:    30014: bx      r1243// LONG:      00030018 <__ARMv7ABSLongThunk_too_far2>:44// LONG-NEXT:    30018: movw    r12, #3245// LONG-NEXT:    3001c: movt    r12, #51546// LONG-NEXT:    30020: bx      r1247// LONG:      00030024 <__ARMv7ABSLongThunk_too_far3>:48// LONG-NEXT:    30024: movw    r12, #4449// LONG-NEXT:    30028: movt    r12, #51550// LONG-NEXT:    3002c: bx      r1251