67 lines · plain
1@@ Check that PC-relative memory addressing is annotated2 3@ RUN: llvm-mc %s -triple=armv7 -filetype=obj | \4@ RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --triple=armv7 - | \5@ RUN: FileCheck %s6 7.text8foo:9@ CHECK: 00000000 <foo>:10 .word 0x0102030411 12_start:13@ CHECK: 00000004 <_start>:14 15@@ Check a special case immediate for AddrMode_i1216 ldr r1, [pc, #-0]17@ CHECK-NEXT: 4: ldr r1, [pc, #-0] @ 0xc <_start+0x8>18 19@@ Check AddrMode_i12 instructions, with positive and negative immediates20 ldr r0, foo21 ldrb r0, bar22 pli _start23 pld bar24@ CHECK-NEXT: 8: ldr r0, [pc, #-16] @ 0x0 <foo>25@ CHECK-NEXT: c: ldrb r0, [pc, #48] @ 0x44 <bar>26@ CHECK-NEXT: 10: pli [pc, #-20] @ 0x4 <_start>27@ CHECK-NEXT: 14: pld [pc, #40] @ 0x44 <bar>28 29@@ Check that AddrMode_i12 instructions that do not use PC-relative addressing30@@ are not annotated31 ldr r0, [r1, #8]32@ CHECK-NEXT: 18: ldr r0, [r1, #8]{{$}}33 34@@ Check AddrMode3 instructions, with positive and negative immediates35 ldrd r0, r1, foo36 ldrh r0, bar37@ CHECK-NEXT: 1c: ldrd r0, r1, [pc, #-36] @ 0x0 <foo>38@ CHECK-NEXT: 20: ldrh r0, [pc, #28] @ 0x44 <bar>39 40@@ Check that AddrMode3 instruction that do not use PC+imm addressing are not41@@ annotated42 ldrh r0, [r1, #8]43 ldrh r0, [pc, r2]44@ CHECK-NEXT: 24: ldrh r0, [r1, #8]{{$}}45@ CHECK-NEXT: 28: ldrh r0, [pc, r2]{{$}}46 47@@ Check AddrMode5 instructions, with positive and negative immediates48 ldc p14, c5, foo49 ldcl p6, c4, bar50 ldc2 p5, c2, foo51 ldc2l p3, c1, bar52@ CHECK-NEXT: 2c: ldc p14, c5, [pc, #-52] @ 0x0 <foo>53@ CHECK-NEXT: 30: ldcl p6, c4, [pc, #12] @ 0x44 <bar>54@ CHECK-NEXT: 34: ldc2 p5, c2, [pc, #-60] @ 0x0 <foo>55@ CHECK-NEXT: 38: ldc2l p3, c1, [pc, #4] @ 0x44 <bar>56 57@@ Check that AddrMode5 instruction that do not use PC+imm addressing are not58@@ annotated59 ldc p14, c5, [r1, #8]60 ldc p14, c5, [pc], {16}61@ CHECK-NEXT: 3c: ldc p14, c5, [r1, #8]{{$}}62@ CHECK-NEXT: 40: ldc p14, c5, [pc], {16}{{$}}63 64bar:65@ CHECK: 00000044 <bar>:66 .word 0x0102030467