166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# Immediates
466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, %eax
566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, %eax
666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $3, %eax
766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $(1+2), %eax
866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $a, %eax
966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $a, %eax
1066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $3, %eax
1166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1 + 2, %eax
1266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
1366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# Disambiguation
1466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
1566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 8
1666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, 4+4
1766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 8
1866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, (4+4)
1966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 8(%eax)
2066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, 4+4(%eax)
2166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 8(%eax)
2266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, (4+4)(%eax)
2366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 8(%eax)
2466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, 8(%eax)
2566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, (%eax)
2666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, (%eax)
2766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 8(,%eax)
2866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, (4+4)(,%eax)
2966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
3066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# Indirect Memory Operands
3166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 1(%eax)
3266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, 1(%eax)
3366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 1(%eax,%ebx)
3466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, 1(%eax,%ebx)
3566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 1(%eax,%ebx)
3666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, 1(%eax,%ebx,)
3766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 1(%eax,%ebx,4)
3866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, 1(%eax,%ebx,4)
3966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 1(,%ebx)
4066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, 1(,%ebx)
4166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 1(,%ebx)
4266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, 1(,%ebx,)
4366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 1(,%ebx,4)
4466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, 1(,%ebx,4)
4566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: addl $1, 1(,%ebx,4)
4666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        addl $1, 1(,%ebx,(2+2))
4766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
4866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# '*'
4966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: calll a
5066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        call a
5166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: calll *%eax
5266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        call *%eax
5366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: calll *4(%eax)
5466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        call *4(%eax)
5566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
5666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman# CHECK: movl	%gs:8, %eax
5766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanmovl %gs:8, %eax
5866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
59