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