2010-05-06 14:46:38 +00:00
|
|
|
// FIXME: Actually test that we get the expected results.
|
|
|
|
|
2009-08-14 03:48:55 +00:00
|
|
|
// RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
|
2009-07-02 02:28:23 +00:00
|
|
|
|
|
|
|
# Immediates
|
2009-08-14 03:48:55 +00:00
|
|
|
# CHECK: addl $1, %eax
|
|
|
|
addl $1, %eax
|
2010-02-13 01:28:07 +00:00
|
|
|
# CHECK: addl $3, %eax
|
2009-08-14 03:48:55 +00:00
|
|
|
addl $(1+2), %eax
|
2010-05-06 14:46:38 +00:00
|
|
|
# CHECK: addl $a, %eax
|
2009-08-14 03:48:55 +00:00
|
|
|
addl $a, %eax
|
2010-02-13 01:28:07 +00:00
|
|
|
# CHECK: addl $3, %eax
|
2009-08-14 03:48:55 +00:00
|
|
|
addl $1 + 2, %eax
|
2009-07-02 02:28:23 +00:00
|
|
|
|
|
|
|
# Disambiguation
|
2009-08-14 03:48:55 +00:00
|
|
|
|
2010-02-13 01:28:07 +00:00
|
|
|
# CHECK: addl $1, 8
|
|
|
|
addl $1, 4+4
|
|
|
|
# CHECK: addl $1, 8
|
|
|
|
addl $1, (4+4)
|
|
|
|
# CHECK: addl $1, 8(%eax)
|
2009-08-14 03:48:55 +00:00
|
|
|
addl $1, 4+4(%eax)
|
2010-02-13 01:28:07 +00:00
|
|
|
# CHECK: addl $1, 8(%eax)
|
2009-08-14 03:48:55 +00:00
|
|
|
addl $1, (4+4)(%eax)
|
|
|
|
# CHECK: addl $1, 8(%eax)
|
|
|
|
addl $1, 8(%eax)
|
2010-02-13 00:17:21 +00:00
|
|
|
# CHECK: addl $1, (%eax)
|
2009-08-14 03:48:55 +00:00
|
|
|
addl $1, (%eax)
|
2010-02-13 01:28:07 +00:00
|
|
|
# CHECK: addl $1, 8(,%eax)
|
2009-08-14 03:48:55 +00:00
|
|
|
addl $1, (4+4)(,%eax)
|
2009-07-02 02:28:23 +00:00
|
|
|
|
|
|
|
# Indirect Memory Operands
|
2009-08-14 03:48:55 +00:00
|
|
|
# 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))
|
2009-07-02 02:28:23 +00:00
|
|
|
|
|
|
|
# '*'
|
2009-08-14 03:48:55 +00:00
|
|
|
# CHECK: call a
|
2009-07-02 02:28:23 +00:00
|
|
|
call a
|
2009-08-14 03:48:55 +00:00
|
|
|
# CHECK: call *%eax
|
2009-07-02 02:28:23 +00:00
|
|
|
call *%eax
|
2009-08-14 03:48:55 +00:00
|
|
|
# CHECK: call *4(%eax)
|
2009-07-02 02:28:23 +00:00
|
|
|
call *4(%eax)
|
|
|
|
|
2010-04-17 18:56:34 +00:00
|
|
|
# CHECK: movl %gs:8, %eax
|
|
|
|
movl %gs:8, %eax
|
|
|
|
|