From 7da28c57e5f11242914c6c2610edb5314e8002fc Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Fri, 27 Jun 2014 23:29:18 +0000 Subject: [RuntimeDyld] Make sure that RuntimeDyld regression tests only run for targets that have been enabled. Without this, testers will fail when llvm-rtdyld is invoked with triples for unsupported targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211969 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../RuntimeDyld/MachO_x86-64_PIC_relocations.s | 32 ---------------------- .../RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s | 32 ++++++++++++++++++++++ test/ExecutionEngine/RuntimeDyld/X86/lit.local.cfg | 3 ++ 3 files changed, 35 insertions(+), 32 deletions(-) delete mode 100644 test/ExecutionEngine/RuntimeDyld/MachO_x86-64_PIC_relocations.s create mode 100644 test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s create mode 100644 test/ExecutionEngine/RuntimeDyld/X86/lit.local.cfg diff --git a/test/ExecutionEngine/RuntimeDyld/MachO_x86-64_PIC_relocations.s b/test/ExecutionEngine/RuntimeDyld/MachO_x86-64_PIC_relocations.s deleted file mode 100644 index 6c27b62dbf..0000000000 --- a/test/ExecutionEngine/RuntimeDyld/MachO_x86-64_PIC_relocations.s +++ /dev/null @@ -1,32 +0,0 @@ -# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -relocation-model=pic -filetype=obj -o %s.o %s -# RUN: llvm-rtdyld -triple=x86_64-apple-macosx10.9 -verify -check=%s %s.o -# RUN: rm %s.o - - .section __TEXT,__text,regular,pure_instructions - .globl foo - .align 4, 0x90 -foo: - retq - - .globl main - .align 4, 0x90 -main: -# Test PC-rel branch. -# rtdyld-check: decode_operand(insn1, 0) = foo - next_pc(insn1) -insn1: - callq foo - -# Test PC-rel signed. -# rtdyld-check: decode_operand(insn2, 4) = x - next_pc(insn2) -insn2: - movl x(%rip), %eax - movl $0, %eax - retq - - .section __DATA,__data - .globl x - .align 2 -x: - .long 5 - -.subsections_via_symbols diff --git a/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s b/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s new file mode 100644 index 0000000000..6c27b62dbf --- /dev/null +++ b/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s @@ -0,0 +1,32 @@ +# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -relocation-model=pic -filetype=obj -o %s.o %s +# RUN: llvm-rtdyld -triple=x86_64-apple-macosx10.9 -verify -check=%s %s.o +# RUN: rm %s.o + + .section __TEXT,__text,regular,pure_instructions + .globl foo + .align 4, 0x90 +foo: + retq + + .globl main + .align 4, 0x90 +main: +# Test PC-rel branch. +# rtdyld-check: decode_operand(insn1, 0) = foo - next_pc(insn1) +insn1: + callq foo + +# Test PC-rel signed. +# rtdyld-check: decode_operand(insn2, 4) = x - next_pc(insn2) +insn2: + movl x(%rip), %eax + movl $0, %eax + retq + + .section __DATA,__data + .globl x + .align 2 +x: + .long 5 + +.subsections_via_symbols diff --git a/test/ExecutionEngine/RuntimeDyld/X86/lit.local.cfg b/test/ExecutionEngine/RuntimeDyld/X86/lit.local.cfg new file mode 100644 index 0000000000..e71f3cc4c4 --- /dev/null +++ b/test/ExecutionEngine/RuntimeDyld/X86/lit.local.cfg @@ -0,0 +1,3 @@ +if not 'X86' in config.root.targets: + config.unsupported = True + -- cgit v1.2.3