aboutsummaryrefslogtreecommitdiffstats
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
commit92697b5350428e6f012fef27dbb9aedad95032e7 (patch)
treeab83c7e40eb99bcb7bd05f57c3cfb253d7302c23
parentb901d87cb78f01ef9466ae82cffd22eb07bd0077 (diff)
downloadexternal_llvm-92697b5350428e6f012fef27dbb9aedad95032e7.zip
external_llvm-92697b5350428e6f012fef27dbb9aedad95032e7.tar.gz
external_llvm-92697b5350428e6f012fef27dbb9aedad95032e7.tar.bz2
llvm-mc/x86: Test case for x86 operand parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74688 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/MC/AsmParser/x86_operands.s36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/MC/AsmParser/x86_operands.s b/test/MC/AsmParser/x86_operands.s
new file mode 100644
index 0000000..708f1bd
--- /dev/null
+++ b/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)
+
+