xref: /aosp_15_r20/external/llvm/test/MC/ARM/ldr-pseudo-obj-errors.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker@RUN: not llvm-mc -triple=armv7-unknown-linux-gnueabi -filetype=obj %s -o %t1 2> %t2
2*9880d681SAndroid Build Coastguard Worker@RUN: cat %t2 | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker@RUN: not llvm-mc -triple=armv7-darwin-apple -filetype=obj %s -o %t1_darwin 2> %t2_darwin
4*9880d681SAndroid Build Coastguard Worker@RUN: cat %t2_darwin | FileCheck %s
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker@These tests look for errors that should be reported for invalid object layout
7*9880d681SAndroid Build Coastguard Worker@with the ldr pseudo. They are tested separately from parse errors because they
8*9880d681SAndroid Build Coastguard Worker@only trigger when the file has successfully parsed and the object file is about
9*9880d681SAndroid Build Coastguard Worker@to be written out.
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker.text
12*9880d681SAndroid Build Coastguard Workerfoo:
13*9880d681SAndroid Build Coastguard Worker  ldr r0, =0x12345678
14*9880d681SAndroid Build Coastguard Worker  .space 8000
15*9880d681SAndroid Build Coastguard Worker@ CHECK: error: out of range pc-relative fixup value
16*9880d681SAndroid Build Coastguard Worker@ CHECK: ldr r0, =0x12345678
17*9880d681SAndroid Build Coastguard Worker@ CHECK: ^
18