Move ARM and X86 specific AsmParser tests into separate subdirectories, and only
authorDaniel Dunbar <daniel@zuster.org>
Mon, 21 Sep 2009 00:05:30 +0000 (00:05 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 21 Sep 2009 00:05:30 +0000 (00:05 +0000)
run if appropriate target is supported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82419 91177308-0d34-0410-b5e6-96231b3b80d8

test/MC/AsmParser/ARM/arm_word_directive.s [new file with mode: 0644]
test/MC/AsmParser/ARM/dg.exp [new file with mode: 0644]
test/MC/AsmParser/X86/dg.exp [new file with mode: 0644]
test/MC/AsmParser/X86/x86_instructions.s [new file with mode: 0644]
test/MC/AsmParser/X86/x86_operands.s [new file with mode: 0644]
test/MC/AsmParser/X86/x86_word_directive.s [new file with mode: 0644]
test/MC/AsmParser/arm_word_directive.s [deleted file]
test/MC/AsmParser/dg.exp
test/MC/AsmParser/x86_instructions.s [deleted file]
test/MC/AsmParser/x86_operands.s [deleted file]
test/MC/AsmParser/x86_word_directive.s [deleted file]

diff --git a/test/MC/AsmParser/ARM/arm_word_directive.s b/test/MC/AsmParser/ARM/arm_word_directive.s
new file mode 100644 (file)
index 0000000..7833691
--- /dev/null
@@ -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 (file)
index 0000000..3ff359a
--- /dev/null
@@ -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 (file)
index 0000000..629a147
--- /dev/null
@@ -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 (file)
index 0000000..4c5b698
--- /dev/null
@@ -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 (file)
index 0000000..433c9bf
--- /dev/null
@@ -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 (file)
index 0000000..2950c8c
--- /dev/null
@@ -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 (file)
index 7833691..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-@ RUN: llvm-mc -triple arm-unknown-unknown %s | FileCheck %s
-
-@ CHECK: TEST0:
-@ CHECK: .long 3
-TEST0:  
-        .word 3
index ca6aefe9c53d3b2ea9834920bce5886806ff1115..64cb75b20ff11d1769778e3fa6319b574280010d 100644 (file)
@@ -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 (file)
index 4c5b698..0000000
+++ /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 (file)
index 433c9bf..0000000
+++ /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 (file)
index 2950c8c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
-
-# CHECK: TEST0:
-# CHECK: .short 3
-TEST0:  
-        .word 3