2009-08-14 11:48:55 +08:00
|
|
|
// RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
|
2009-07-02 10:28:23 +08:00
|
|
|
|
|
|
|
# Immediates
|
2009-08-14 11:48:55 +08:00
|
|
|
# CHECK: addl $1, %eax
|
|
|
|
addl $1, %eax
|
2010-02-13 09:28:07 +08:00
|
|
|
# CHECK: addl $3, %eax
|
2009-08-14 11:48:55 +08:00
|
|
|
addl $(1+2), %eax
|
2010-05-06 22:46:38 +08:00
|
|
|
# CHECK: addl $a, %eax
|
2009-08-14 11:48:55 +08:00
|
|
|
addl $a, %eax
|
2010-02-13 09:28:07 +08:00
|
|
|
# CHECK: addl $3, %eax
|
2009-08-14 11:48:55 +08:00
|
|
|
addl $1 + 2, %eax
|
2009-07-02 10:28:23 +08:00
|
|
|
|
|
|
|
# Disambiguation
|
2009-08-14 11:48:55 +08:00
|
|
|
|
2010-02-13 09:28:07 +08: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 11:48:55 +08:00
|
|
|
addl $1, 4+4(%eax)
|
2010-02-13 09:28:07 +08:00
|
|
|
# CHECK: addl $1, 8(%eax)
|
2009-08-14 11:48:55 +08:00
|
|
|
addl $1, (4+4)(%eax)
|
|
|
|
# CHECK: addl $1, 8(%eax)
|
|
|
|
addl $1, 8(%eax)
|
2010-02-13 08:17:21 +08:00
|
|
|
# CHECK: addl $1, (%eax)
|
2009-08-14 11:48:55 +08:00
|
|
|
addl $1, (%eax)
|
2010-02-13 09:28:07 +08:00
|
|
|
# CHECK: addl $1, 8(,%eax)
|
2009-08-14 11:48:55 +08:00
|
|
|
addl $1, (4+4)(,%eax)
|
2009-07-02 10:28:23 +08:00
|
|
|
|
|
|
|
# Indirect Memory Operands
|
2009-08-14 11:48:55 +08: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 10:28:23 +08:00
|
|
|
|
|
|
|
# '*'
|
2010-09-22 13:49:14 +08:00
|
|
|
# CHECK: calll a
|
2009-07-02 10:28:23 +08:00
|
|
|
call a
|
2010-09-22 13:49:14 +08:00
|
|
|
# CHECK: calll *%eax
|
2009-07-02 10:28:23 +08:00
|
|
|
call *%eax
|
2010-09-22 13:49:14 +08:00
|
|
|
# CHECK: calll *4(%eax)
|
2009-07-02 10:28:23 +08:00
|
|
|
call *4(%eax)
|
2014-08-01 07:26:35 +08:00
|
|
|
foo:
|
|
|
|
calll foo()
|
|
|
|
# CHECK: calll foo{{$}}
|
|
|
|
calll foo(,)
|
|
|
|
# CHECK: calll foo{{$}}
|
2009-07-02 10:28:23 +08:00
|
|
|
|
2010-04-18 02:56:34 +08:00
|
|
|
# CHECK: movl %gs:8, %eax
|
|
|
|
movl %gs:8, %eax
|
|
|
|
|