From 0a93771e4c7283bf7999c00b3282eab0431b463f Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 2 Jul 2009 02:28:23 +0000 Subject: [PATCH] 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 --- test/MC/AsmParser/x86_operands.s | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 test/MC/AsmParser/x86_operands.s diff --git a/test/MC/AsmParser/x86_operands.s b/test/MC/AsmParser/x86_operands.s new file mode 100644 index 00000000000..708f1bd3e88 --- /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) + + -- 2.34.1