brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · ab7cb61 Raw
37 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc --triple=armv7a-none-eabi --arm-add-build-attributes -filetype=obj -o %t.o %s3// RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s4 .section .os0, "ax", %progbits5 .balign 10246 .thumb_func7low:8 bx lr9 10/// Check that we error when the immediate for the add or sub is not encodeable11 .section .os1, "ax", %progbits12 .arm13 .balign 102414 .global _start15 .type _start, %function16_start:17// CHECK: {{.*}}.s.tmp.o:(.os1+0x0): unencodeable immediate 1031 for relocation R_ARM_ALU_PC_G018/// adr r0, low19 .inst 0xe24f000820 .reloc 0, R_ARM_ALU_PC_G0, low21 // CHECK: {{.*}}.s.tmp.o:(.os1+0x4): unencodeable immediate 1013 for relocation R_ARM_ALU_PC_G022/// adr r1, unaligned23 .inst 0xe24f100824 .reloc 4, R_ARM_ALU_PC_G0, unaligned25 26 .balign 51227/// ldrd r0, r1, _start28// CHECK: {{.*}}.s.tmp.o:(.os1+0x200): relocation R_ARM_LDRS_PC_G0 out of range: 512 is not in [0, 255]; references '_start'29 .reloc ., R_ARM_LDRS_PC_G0, _start30 .inst 0xe14f00d031 32 .section .os2, "ax", %progbits33 .balign 102434 .thumb_func35unaligned:36  bx lr37