[llvm-commits] [llvm] r74688 - /llvm/trunk/test/MC/AsmParser/x86_operands.s

Daniel Dunbar daniel at zuster.org
Wed Jul 1 19:28:23 PDT 2009


Author: ddunbar
Date: Wed Jul  1 21:28:23 2009
New Revision: 74688

URL: http://llvm.org/viewvc/llvm-project?rev=74688&view=rev
Log:
llvm-mc/x86: Test case for x86 operand parsing.

Added:
    llvm/trunk/test/MC/AsmParser/x86_operands.s

Added: llvm/trunk/test/MC/AsmParser/x86_operands.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/x86_operands.s?rev=74688&view=auto

==============================================================================
--- llvm/trunk/test/MC/AsmParser/x86_operands.s (added)
+++ llvm/trunk/test/MC/AsmParser/x86_operands.s Wed Jul  1 21:28:23 2009
@@ -0,0 +1,36 @@
+// FIXME: Actually test that we get the expected results.
+        
+// RUN: llvm-mc %s > %t
+
+# Immediates
+        push $1
+        push $(1+2)
+        push $a
+        push $1 + 2
+        
+# Disambiguation
+        push 4+4
+        push (4+4)
+        push (4+4)(%eax)
+        push 8(%eax)
+        push (%eax)
+        push (4+4)(,%eax)
+        
+# Indirect Memory Operands
+        push 1(%eax)
+        push 1(%eax,%ebx)
+        push 1(%eax,%ebx,)
+        push 1(%eax,%ebx,4)
+        push 1(,%ebx)
+        push 1(,%ebx,)
+        push 1(,%ebx,4)
+        push 1(,%ebx,(2+2))
+
+# '*'
+        call a
+        call *a
+        call *%eax
+        call 4(%eax) # FIXME: Warn or reject.
+        call *4(%eax)
+
+        





More information about the llvm-commits mailing list