mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
dc5840c57c
specific printer (this only works on x86, for now). - This makes it possible to do some correctness checking of the parsing and matching, since we can compare the results of 'as' on the original input, to those of 'as' on the output from llvm-mc. - In theory, we could now have an easy ATT -> Intel syntax converter. :) llvm-svn: 78986
59 lines
1.4 KiB
ArmAsm
59 lines
1.4 KiB
ArmAsm
// 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 $3, %eax
|
|
addl $(1+2), %eax
|
|
# CHECK: addl $a, %eax
|
|
addl $a, %eax
|
|
# CHECK: addl $3, %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, 8(%eax)
|
|
addl $1, 4+4(%eax)
|
|
# CHECK: addl $1, 8(%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, 8(,%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)
|
|
|
|
|