From: Eli Friedman Date: Tue, 1 Nov 2011 03:21:48 +0000 (+0000) Subject: Move x86-specific tests into X86 folder. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dc9414d62f8ddfb24fa7e640f61266d62083080a;p=oota-llvm.git Move x86-specific tests into X86 folder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143424 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Object/X86/dg.exp b/test/Object/X86/dg.exp new file mode 100644 index 00000000000..6a91de70cae --- /dev/null +++ b/test/Object/X86/dg.exp @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if { [llvm_supports_target X86] } { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{test}]] +} diff --git a/test/Object/X86/objdump-disassembly-inline-relocations.test b/test/Object/X86/objdump-disassembly-inline-relocations.test new file mode 100644 index 00000000000..a5875f6a2f9 --- /dev/null +++ b/test/Object/X86/objdump-disassembly-inline-relocations.test @@ -0,0 +1,32 @@ +RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.coff-i386 \ +RUN: | FileCheck %s -check-prefix COFF-i386 +RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.coff-x86-64 \ +RUN: | FileCheck %s -check-prefix COFF-x86-64 + +COFF-i386: file format COFF-i386 +COFF-i386: Disassembly of section .text: +COFF-i386: 0: 83 ec 0c subl $12, %esp +COFF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) +COFF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) +COFF-i386: e: IMAGE_REL_I386_DIR32 L_.str +COFF-i386: 12: e8 00 00 00 00 calll 0 +COFF-i386: 13: IMAGE_REL_I386_REL32 _puts +COFF-i386: 17: e8 00 00 00 00 calll 0 +COFF-i386: 18: IMAGE_REL_I386_REL32 _SomeOtherFunction +COFF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax +COFF-i386: 20: 83 c4 0c addl $12, %esp +COFF-i386: 23: c3 ret + +COFF-x86-64: file format COFF-x86-64 +COFF-x86-64: Disassembly of section .text: +COFF-x86-64: 0: 48 83 ec 28 subq $40, %rsp +COFF-x86-64: 4: c7 44 24 24 00 00 00 00 movl $0, 36(%rsp) +COFF-x86-64: c: 48 8d 0d 00 00 00 00 leaq (%rip), %rcx +COFF-x86-64: f: IMAGE_REL_AMD64_REL32 L.str +COFF-x86-64: 13: e8 00 00 00 00 callq 0 +COFF-x86-64: 14: IMAGE_REL_AMD64_REL32 puts +COFF-x86-64: 18: e8 00 00 00 00 callq 0 +COFF-x86-64: 19: IMAGE_REL_AMD64_REL32 SomeOtherFunction +COFF-x86-64: 1d: 8b 44 24 24 movl 36(%rsp), %eax +COFF-x86-64: 21: 48 83 c4 28 addq $40, %rsp +COFF-x86-64: 25: c3 ret diff --git a/test/Object/X86/objdump-trivial-object.test b/test/Object/X86/objdump-trivial-object.test new file mode 100644 index 00000000000..8f9ea974d27 --- /dev/null +++ b/test/Object/X86/objdump-trivial-object.test @@ -0,0 +1,54 @@ +RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-i386 \ +RUN: | FileCheck %s -check-prefix COFF-i386 +RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-x86-64 \ +RUN: | FileCheck %s -check-prefix COFF-x86-64 +RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.elf-i386 \ +RUN: | FileCheck %s -check-prefix ELF-i386 +RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.elf-x86-64 \ +RUN: | FileCheck %s -check-prefix ELF-x86-64 + +COFF-i386: file format COFF-i386 +COFF-i386: Disassembly of section .text: +COFF-i386: 0: 83 ec 0c subl $12, %esp +COFF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) +COFF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) +COFF-i386: 12: e8 00 00 00 00 calll 0 +COFF-i386: 17: e8 00 00 00 00 calll 0 +COFF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax +COFF-i386: 20: 83 c4 0c addl $12, %esp +COFF-i386: 23: c3 ret + +COFF-x86-64: file format COFF-x86-64 +COFF-x86-64: Disassembly of section .text: +COFF-x86-64: 0: 48 83 ec 28 subq $40, %rsp +COFF-x86-64: 4: c7 44 24 24 00 00 00 00 movl $0, 36(%rsp) +COFF-x86-64: c: 48 8d 0d 00 00 00 00 leaq (%rip), %rcx +COFF-x86-64: 13: e8 00 00 00 00 callq 0 +COFF-x86-64: 18: e8 00 00 00 00 callq 0 +COFF-x86-64: 1d: 8b 44 24 24 movl 36(%rsp), %eax +COFF-x86-64: 21: 48 83 c4 28 addq $40, %rsp +COFF-x86-64: 25: c3 ret + + +ELF-i386: file format ELF32-i386 +ELF-i386: Disassembly of section .text: +ELF-i386: 0: 83 ec 0c subl $12, %esp +ELF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) +ELF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) +ELF-i386: 12: e8 fc ff ff ff calll -4 +ELF-i386: 17: e8 fc ff ff ff calll -4 +ELF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax +ELF-i386: 20: 83 c4 0c addl $12, %esp +ELF-i386: 23: c3 ret + +ELF-x86-64: file format ELF64-x86-64 +ELF-x86-64: Disassembly of section .text: +ELF-x86-64: 0: 48 83 ec 08 subq $8, %rsp +ELF-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp) +ELF-x86-64: c: bf 00 00 00 00 movl $0, %edi +ELF-x86-64: 11: e8 00 00 00 00 callq 0 +ELF-x86-64: 16: 30 c0 xorb %al, %al +ELF-x86-64: 18: e8 00 00 00 00 callq 0 +ELF-x86-64: 1d: 8b 44 24 04 movl 4(%rsp), %eax +ELF-x86-64: 21: 48 83 c4 08 addq $8, %rsp +ELF-x86-64: 25: c3 ret diff --git a/test/Object/objdump-disassembly-inline-relocations.test b/test/Object/objdump-disassembly-inline-relocations.test deleted file mode 100644 index 1e8b72a3c70..00000000000 --- a/test/Object/objdump-disassembly-inline-relocations.test +++ /dev/null @@ -1,32 +0,0 @@ -RUN: llvm-objdump -d -r %p/Inputs/trivial-object-test.coff-i386 \ -RUN: | FileCheck %s -check-prefix COFF-i386 -RUN: llvm-objdump -d -r %p/Inputs/trivial-object-test.coff-x86-64 \ -RUN: | FileCheck %s -check-prefix COFF-x86-64 - -COFF-i386: file format COFF-i386 -COFF-i386: Disassembly of section .text: -COFF-i386: 0: 83 ec 0c subl $12, %esp -COFF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) -COFF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) -COFF-i386: e: IMAGE_REL_I386_DIR32 L_.str -COFF-i386: 12: e8 00 00 00 00 calll 0 -COFF-i386: 13: IMAGE_REL_I386_REL32 _puts -COFF-i386: 17: e8 00 00 00 00 calll 0 -COFF-i386: 18: IMAGE_REL_I386_REL32 _SomeOtherFunction -COFF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax -COFF-i386: 20: 83 c4 0c addl $12, %esp -COFF-i386: 23: c3 ret - -COFF-x86-64: file format COFF-x86-64 -COFF-x86-64: Disassembly of section .text: -COFF-x86-64: 0: 48 83 ec 28 subq $40, %rsp -COFF-x86-64: 4: c7 44 24 24 00 00 00 00 movl $0, 36(%rsp) -COFF-x86-64: c: 48 8d 0d 00 00 00 00 leaq (%rip), %rcx -COFF-x86-64: f: IMAGE_REL_AMD64_REL32 L.str -COFF-x86-64: 13: e8 00 00 00 00 callq 0 -COFF-x86-64: 14: IMAGE_REL_AMD64_REL32 puts -COFF-x86-64: 18: e8 00 00 00 00 callq 0 -COFF-x86-64: 19: IMAGE_REL_AMD64_REL32 SomeOtherFunction -COFF-x86-64: 1d: 8b 44 24 24 movl 36(%rsp), %eax -COFF-x86-64: 21: 48 83 c4 28 addq $40, %rsp -COFF-x86-64: 25: c3 ret diff --git a/test/Object/objdump-trivial-object.test b/test/Object/objdump-trivial-object.test deleted file mode 100644 index 951cd403d4d..00000000000 --- a/test/Object/objdump-trivial-object.test +++ /dev/null @@ -1,54 +0,0 @@ -RUN: llvm-objdump -d %p/Inputs/trivial-object-test.coff-i386 \ -RUN: | FileCheck %s -check-prefix COFF-i386 -RUN: llvm-objdump -d %p/Inputs/trivial-object-test.coff-x86-64 \ -RUN: | FileCheck %s -check-prefix COFF-x86-64 -RUN: llvm-objdump -d %p/Inputs/trivial-object-test.elf-i386 \ -RUN: | FileCheck %s -check-prefix ELF-i386 -RUN: llvm-objdump -d %p/Inputs/trivial-object-test.elf-x86-64 \ -RUN: | FileCheck %s -check-prefix ELF-x86-64 - -COFF-i386: file format COFF-i386 -COFF-i386: Disassembly of section .text: -COFF-i386: 0: 83 ec 0c subl $12, %esp -COFF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) -COFF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) -COFF-i386: 12: e8 00 00 00 00 calll 0 -COFF-i386: 17: e8 00 00 00 00 calll 0 -COFF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax -COFF-i386: 20: 83 c4 0c addl $12, %esp -COFF-i386: 23: c3 ret - -COFF-x86-64: file format COFF-x86-64 -COFF-x86-64: Disassembly of section .text: -COFF-x86-64: 0: 48 83 ec 28 subq $40, %rsp -COFF-x86-64: 4: c7 44 24 24 00 00 00 00 movl $0, 36(%rsp) -COFF-x86-64: c: 48 8d 0d 00 00 00 00 leaq (%rip), %rcx -COFF-x86-64: 13: e8 00 00 00 00 callq 0 -COFF-x86-64: 18: e8 00 00 00 00 callq 0 -COFF-x86-64: 1d: 8b 44 24 24 movl 36(%rsp), %eax -COFF-x86-64: 21: 48 83 c4 28 addq $40, %rsp -COFF-x86-64: 25: c3 ret - - -ELF-i386: file format ELF32-i386 -ELF-i386: Disassembly of section .text: -ELF-i386: 0: 83 ec 0c subl $12, %esp -ELF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) -ELF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) -ELF-i386: 12: e8 fc ff ff ff calll -4 -ELF-i386: 17: e8 fc ff ff ff calll -4 -ELF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax -ELF-i386: 20: 83 c4 0c addl $12, %esp -ELF-i386: 23: c3 ret - -ELF-x86-64: file format ELF64-x86-64 -ELF-x86-64: Disassembly of section .text: -ELF-x86-64: 0: 48 83 ec 08 subq $8, %rsp -ELF-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp) -ELF-x86-64: c: bf 00 00 00 00 movl $0, %edi -ELF-x86-64: 11: e8 00 00 00 00 callq 0 -ELF-x86-64: 16: 30 c0 xorb %al, %al -ELF-x86-64: 18: e8 00 00 00 00 callq 0 -ELF-x86-64: 1d: 8b 44 24 04 movl 4(%rsp), %eax -ELF-x86-64: 21: 48 83 c4 08 addq $8, %rsp -ELF-x86-64: 25: c3 ret