From eb2fff64dd5055ebcf7bf899f2abb5fe6b148c19 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Thu, 10 Jul 2014 23:29:11 +0000 Subject: [PATCH] [RuntimeDyld] Replace a crufty old ARM RuntimeDyld test with a new one that uses RuntimeDyldChecker. This allows us to remove one of the six remaining object files in the LLVM source tree. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212780 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../ARM/MachO_ARM_PIC_relocations.s | 27 ++++++++++++++++++ .../RuntimeDyld/ARM/lit.local.cfg | 3 ++ .../RuntimeDyld/Inputs/arm_secdiff_reloc.o | Bin 616 -> 0 bytes .../RuntimeDyld/macho_relocations.test | 1 - 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s create mode 100644 test/ExecutionEngine/RuntimeDyld/ARM/lit.local.cfg delete mode 100644 test/ExecutionEngine/RuntimeDyld/Inputs/arm_secdiff_reloc.o delete mode 100644 test/ExecutionEngine/RuntimeDyld/macho_relocations.test diff --git a/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s b/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s new file mode 100644 index 00000000000..86041835591 --- /dev/null +++ b/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s @@ -0,0 +1,27 @@ +# RUN: llvm-mc -triple=armv7s-apple-ios7.0.0 -relocation-model=pic -filetype=obj -o %t.o %s +# RUN: llvm-rtdyld -triple=armv7s-apple-ios7.0.0 -verify -check=%s %t.o +# RUN: rm %t.o + + .syntax unified + .section __TEXT,__text,regular,pure_instructions + .globl bar + .align 2 +bar: +# Check lower 16-bits of section difference relocation +# rtdyld-check: decode_operand(insn1, 1) = (foo-(nextPC+8))[15:0] +insn1: + movw r0, :lower16:(foo-(nextPC+8)) +# Check upper 16-bits of section difference relocation +# rtdyld-check: decode_operand(insn2, 2) = (foo-(nextPC+8))[31:16] +insn2: + movt r0, :upper16:(foo-(nextPC+8)) +nextPC: + add r0, pc, r0 + bx lr + + .globl foo + .align 2 +foo: + bx lr + +.subsections_via_symbols diff --git a/test/ExecutionEngine/RuntimeDyld/ARM/lit.local.cfg b/test/ExecutionEngine/RuntimeDyld/ARM/lit.local.cfg new file mode 100644 index 00000000000..98c6700c209 --- /dev/null +++ b/test/ExecutionEngine/RuntimeDyld/ARM/lit.local.cfg @@ -0,0 +1,3 @@ +if not 'ARM' in config.root.targets: + config.unsupported = True + diff --git a/test/ExecutionEngine/RuntimeDyld/Inputs/arm_secdiff_reloc.o b/test/ExecutionEngine/RuntimeDyld/Inputs/arm_secdiff_reloc.o deleted file mode 100644 index 5392266cf560cb739b8ef0d2d15932f92bf73f2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 616 zcmX^2>+L@t1_lOhAZ7$&W+46oVkkiPJs>s~AOaK$Uy@o;0_6ay z`1lalh!6xH#DeJu8o{6fBv?R#EDQ}G3Irf#B^@0b<7h30S-Z0QtxOBoD%5g2xOD4nW-hK<>Z(Ll6eW%}kI# lfM6ojU!72XBZv=5BJ$950!jlQHdsDB&5$8J%?K#O003e`IAj0- diff --git a/test/ExecutionEngine/RuntimeDyld/macho_relocations.test b/test/ExecutionEngine/RuntimeDyld/macho_relocations.test deleted file mode 100644 index 92e4dd793cc..00000000000 --- a/test/ExecutionEngine/RuntimeDyld/macho_relocations.test +++ /dev/null @@ -1 +0,0 @@ -RUN: llvm-rtdyld -printline %p/Inputs/arm_secdiff_reloc.o