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
|
|
|
|
|
|
|
# '*'
|
2010-09-22 05:49:14 +00:00
|
|
|
# CHECK: calll a
|
2009-07-02 02:28:23 +00:00
|
|
|
call a
|
2010-09-22 05:49:14 +00:00
|
|
|
# CHECK: calll *%eax
|
2009-07-02 02:28:23 +00:00
|
|
|
call *%eax
|
2010-09-22 05:49:14 +00:00
|
|
|
# CHECK: calll *4(%eax)
|
2009-07-02 02:28:23 +00:00
|
|
|
call *4(%eax)
|
2014-07-31 23:26:35 +00:00
|
|
|
foo:
|
|
|
|
calll foo()
|
|
|
|
# CHECK: calll foo{{$}}
|
|
|
|
calll foo(,)
|
|
|
|
# CHECK: calll foo{{$}}
|
2009-07-02 02:28:23 +00:00
|
|
|
|
2010-04-17 18:56:34 +00:00
|
|
|
# CHECK: movl %gs:8, %eax
|
|
|
|
movl %gs:8, %eax
|
|
|
|
|