From: Daniel Dunbar Date: Mon, 21 Sep 2009 00:05:30 +0000 (+0000) Subject: Move ARM and X86 specific AsmParser tests into separate subdirectories, and only X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=06e483dae04b0ad714f9d8bb0a929b98720bf483;p=oota-llvm.git Move ARM and X86 specific AsmParser tests into separate subdirectories, and only run if appropriate target is supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82419 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/MC/AsmParser/ARM/arm_word_directive.s b/test/MC/AsmParser/ARM/arm_word_directive.s new file mode 100644 index 00000000000..78336913169 --- /dev/null +++ b/test/MC/AsmParser/ARM/arm_word_directive.s @@ -0,0 +1,6 @@ +@ RUN: llvm-mc -triple arm-unknown-unknown %s | FileCheck %s + +@ CHECK: TEST0: +@ CHECK: .long 3 +TEST0: + .word 3 diff --git a/test/MC/AsmParser/ARM/dg.exp b/test/MC/AsmParser/ARM/dg.exp new file mode 100644 index 00000000000..3ff359aab39 --- /dev/null +++ b/test/MC/AsmParser/ARM/dg.exp @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if { [llvm_supports_target ARM] } { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] +} diff --git a/test/MC/AsmParser/X86/dg.exp b/test/MC/AsmParser/X86/dg.exp new file mode 100644 index 00000000000..629a1477361 --- /dev/null +++ b/test/MC/AsmParser/X86/dg.exp @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if { [llvm_supports_target X86] } { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] +} diff --git a/test/MC/AsmParser/X86/x86_instructions.s b/test/MC/AsmParser/X86/x86_instructions.s new file mode 100644 index 00000000000..4c5b698d3fc --- /dev/null +++ b/test/MC/AsmParser/X86/x86_instructions.s @@ -0,0 +1,58 @@ +// FIXME: Switch back to FileCheck once we print actual instructions + +// RUN: llvm-mc -triple x86_64-unknown-unknown %s | FileCheck %s + +// CHECK: subb %al, %al + subb %al, %al + +// CHECK: addl $24, %eax + addl $24, %eax + +// CHECK: movl %eax, 10(%ebp) + movl %eax, 10(%ebp) +// CHECK: movl %eax, 10(%ebp,%ebx) + movl %eax, 10(%ebp, %ebx) +// CHECK: movl %eax, 10(%ebp,%ebx,4) + movl %eax, 10(%ebp, %ebx, 4) +// CHECK: movl %eax, 10(,%ebx,4) + movl %eax, 10(, %ebx, 4) + +// FIXME: Check that this matches SUB32ri8 +// CHECK: subl $1, %eax + subl $1, %eax + +// FIXME: Check that this matches SUB32ri8 +// CHECK: subl $-1, %eax + subl $-1, %eax + +// FIXME: Check that this matches SUB32ri +// CHECK: subl $256, %eax + subl $256, %eax + +// FIXME: Check that this matches XOR64ri8 +// CHECK: xorq $1, %rax + xorq $1, %rax + +// FIXME: Check that this matches XOR64ri32 +// CHECK: xorq $256, %rax + xorq $256, %rax + +// FIXME: Check that this matches SUB8rr +// CHECK: subb %al, %bl + subb %al, %bl + +// FIXME: Check that this matches SUB16rr +// CHECK: subw %ax, %bx + subw %ax, %bx + +// FIXME: Check that this matches SUB32rr +// CHECK: subl %eax, %ebx + subl %eax, %ebx + +// FIXME: Check that this matches the correct instruction. +// CHECK: call *%rax + call *%rax + +// FIXME: Check that this matches the correct instruction. +// CHECK: shldl %cl, %eax, %ebx + shldl %cl, %eax, %ebx diff --git a/test/MC/AsmParser/X86/x86_operands.s b/test/MC/AsmParser/X86/x86_operands.s new file mode 100644 index 00000000000..433c9bf7729 --- /dev/null +++ b/test/MC/AsmParser/X86/x86_operands.s @@ -0,0 +1,58 @@ +// FIXME: Actually test that we get the expected results. + +// RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s + +# Immediates +# CHECK: addl $1, %eax + addl $1, %eax +# CHECK: addl $1+2, %eax + addl $(1+2), %eax +# CHECK: addl $a, %eax + addl $a, %eax +# CHECK: addl $1+2, %eax + addl $1 + 2, %eax + +# Disambiguation + + # FIXME: Add back when we can match this. + #addl $1, 4+4 + # FIXME: Add back when we can match this. + #addl $1, (4+4) +# CHECK: addl $1, 4+4(%eax) + addl $1, 4+4(%eax) +# CHECK: addl $1, 4+4(%eax) + addl $1, (4+4)(%eax) +# CHECK: addl $1, 8(%eax) + addl $1, 8(%eax) +# CHECK: addl $1, 0(%eax) + addl $1, (%eax) +# CHECK: addl $1, 4+4(,%eax) + addl $1, (4+4)(,%eax) + +# Indirect Memory Operands +# CHECK: addl $1, 1(%eax) + addl $1, 1(%eax) +# CHECK: addl $1, 1(%eax,%ebx) + addl $1, 1(%eax,%ebx) +# CHECK: addl $1, 1(%eax,%ebx) + addl $1, 1(%eax,%ebx,) +# CHECK: addl $1, 1(%eax,%ebx,4) + addl $1, 1(%eax,%ebx,4) +# CHECK: addl $1, 1(,%ebx) + addl $1, 1(,%ebx) +# CHECK: addl $1, 1(,%ebx) + addl $1, 1(,%ebx,) +# CHECK: addl $1, 1(,%ebx,4) + addl $1, 1(,%ebx,4) +# CHECK: addl $1, 1(,%ebx,4) + addl $1, 1(,%ebx,(2+2)) + +# '*' +# CHECK: call a + call a +# CHECK: call *%eax + call *%eax +# CHECK: call *4(%eax) + call *4(%eax) + + diff --git a/test/MC/AsmParser/X86/x86_word_directive.s b/test/MC/AsmParser/X86/x86_word_directive.s new file mode 100644 index 00000000000..2950c8cd5f1 --- /dev/null +++ b/test/MC/AsmParser/X86/x86_word_directive.s @@ -0,0 +1,6 @@ +# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s + +# CHECK: TEST0: +# CHECK: .short 3 +TEST0: + .word 3 diff --git a/test/MC/AsmParser/arm_word_directive.s b/test/MC/AsmParser/arm_word_directive.s deleted file mode 100644 index 78336913169..00000000000 --- a/test/MC/AsmParser/arm_word_directive.s +++ /dev/null @@ -1,6 +0,0 @@ -@ RUN: llvm-mc -triple arm-unknown-unknown %s | FileCheck %s - -@ CHECK: TEST0: -@ CHECK: .long 3 -TEST0: - .word 3 diff --git a/test/MC/AsmParser/dg.exp b/test/MC/AsmParser/dg.exp index ca6aefe9c53..64cb75b20ff 100644 --- a/test/MC/AsmParser/dg.exp +++ b/test/MC/AsmParser/dg.exp @@ -1,6 +1,4 @@ load_lib llvm.exp -if { [llvm_supports_target X86] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{s}]] -} +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{s}]] diff --git a/test/MC/AsmParser/x86_instructions.s b/test/MC/AsmParser/x86_instructions.s deleted file mode 100644 index 4c5b698d3fc..00000000000 --- a/test/MC/AsmParser/x86_instructions.s +++ /dev/null @@ -1,58 +0,0 @@ -// FIXME: Switch back to FileCheck once we print actual instructions - -// RUN: llvm-mc -triple x86_64-unknown-unknown %s | FileCheck %s - -// CHECK: subb %al, %al - subb %al, %al - -// CHECK: addl $24, %eax - addl $24, %eax - -// CHECK: movl %eax, 10(%ebp) - movl %eax, 10(%ebp) -// CHECK: movl %eax, 10(%ebp,%ebx) - movl %eax, 10(%ebp, %ebx) -// CHECK: movl %eax, 10(%ebp,%ebx,4) - movl %eax, 10(%ebp, %ebx, 4) -// CHECK: movl %eax, 10(,%ebx,4) - movl %eax, 10(, %ebx, 4) - -// FIXME: Check that this matches SUB32ri8 -// CHECK: subl $1, %eax - subl $1, %eax - -// FIXME: Check that this matches SUB32ri8 -// CHECK: subl $-1, %eax - subl $-1, %eax - -// FIXME: Check that this matches SUB32ri -// CHECK: subl $256, %eax - subl $256, %eax - -// FIXME: Check that this matches XOR64ri8 -// CHECK: xorq $1, %rax - xorq $1, %rax - -// FIXME: Check that this matches XOR64ri32 -// CHECK: xorq $256, %rax - xorq $256, %rax - -// FIXME: Check that this matches SUB8rr -// CHECK: subb %al, %bl - subb %al, %bl - -// FIXME: Check that this matches SUB16rr -// CHECK: subw %ax, %bx - subw %ax, %bx - -// FIXME: Check that this matches SUB32rr -// CHECK: subl %eax, %ebx - subl %eax, %ebx - -// FIXME: Check that this matches the correct instruction. -// CHECK: call *%rax - call *%rax - -// FIXME: Check that this matches the correct instruction. -// CHECK: shldl %cl, %eax, %ebx - shldl %cl, %eax, %ebx diff --git a/test/MC/AsmParser/x86_operands.s b/test/MC/AsmParser/x86_operands.s deleted file mode 100644 index 433c9bf7729..00000000000 --- a/test/MC/AsmParser/x86_operands.s +++ /dev/null @@ -1,58 +0,0 @@ -// FIXME: Actually test that we get the expected results. - -// RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s - -# Immediates -# CHECK: addl $1, %eax - addl $1, %eax -# CHECK: addl $1+2, %eax - addl $(1+2), %eax -# CHECK: addl $a, %eax - addl $a, %eax -# CHECK: addl $1+2, %eax - addl $1 + 2, %eax - -# Disambiguation - - # FIXME: Add back when we can match this. - #addl $1, 4+4 - # FIXME: Add back when we can match this. - #addl $1, (4+4) -# CHECK: addl $1, 4+4(%eax) - addl $1, 4+4(%eax) -# CHECK: addl $1, 4+4(%eax) - addl $1, (4+4)(%eax) -# CHECK: addl $1, 8(%eax) - addl $1, 8(%eax) -# CHECK: addl $1, 0(%eax) - addl $1, (%eax) -# CHECK: addl $1, 4+4(,%eax) - addl $1, (4+4)(,%eax) - -# Indirect Memory Operands -# CHECK: addl $1, 1(%eax) - addl $1, 1(%eax) -# CHECK: addl $1, 1(%eax,%ebx) - addl $1, 1(%eax,%ebx) -# CHECK: addl $1, 1(%eax,%ebx) - addl $1, 1(%eax,%ebx,) -# CHECK: addl $1, 1(%eax,%ebx,4) - addl $1, 1(%eax,%ebx,4) -# CHECK: addl $1, 1(,%ebx) - addl $1, 1(,%ebx) -# CHECK: addl $1, 1(,%ebx) - addl $1, 1(,%ebx,) -# CHECK: addl $1, 1(,%ebx,4) - addl $1, 1(,%ebx,4) -# CHECK: addl $1, 1(,%ebx,4) - addl $1, 1(,%ebx,(2+2)) - -# '*' -# CHECK: call a - call a -# CHECK: call *%eax - call *%eax -# CHECK: call *4(%eax) - call *4(%eax) - - diff --git a/test/MC/AsmParser/x86_word_directive.s b/test/MC/AsmParser/x86_word_directive.s deleted file mode 100644 index 2950c8cd5f1..00000000000 --- a/test/MC/AsmParser/x86_word_directive.s +++ /dev/null @@ -1,6 +0,0 @@ -# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s - -# CHECK: TEST0: -# CHECK: .short 3 -TEST0: - .word 3