summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-02 02:28:23 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-02 02:28:23 +0000
commita065149f39ae47c12df282a65573f3d88d2c3c18 (patch)
tree38d2b61d9ef4245598c2b8ce4e6553adb26dd2ad
parent0224b65f0ad25dd633317d36e04d6d4d431e260f (diff)
downloadbcm5719-llvm-a065149f39ae47c12df282a65573f3d88d2c3c18.tar.gz
bcm5719-llvm-a065149f39ae47c12df282a65573f3d88d2c3c18.zip
llvm-mc/x86: Test case for x86 operand parsing.
llvm-svn: 74688
-rw-r--r--llvm/test/MC/AsmParser/x86_operands.s36
1 files changed, 36 insertions, 0 deletions
diff --git a/llvm/test/MC/AsmParser/x86_operands.s b/llvm/test/MC/AsmParser/x86_operands.s
new file mode 100644
index 00000000000..708f1bd3e88
--- /dev/null
+++ b/llvm/test/MC/AsmParser/x86_operands.s
@@ -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)
+
+
OpenPOWER on IntegriCloud