x86-32-ms-inline-asm.s revision dca83187b7c4465ad6ff8507052223d31c0ea66a
1// RUN: llvm-mc -x86-asm-syntax=intel -triple i386-unknown-unknown --show-encoding %s | FileCheck %s
2
3mov eax, [ebx].0
4mov [ebx].4, ecx
5
6// CHECK: movl (%ebx), %eax
7// CHECK: encoding: [0x8b,0x03]
8// CHECK: movl %ecx, 4(%ebx)
9// CHECK: encoding: [0x89,0x4b,0x04]
10
11_t21:                                   ## @t21
12// CHECK: t21
13	mov eax, [4*eax + 4]
14// CHECK: movl 4(,%eax,4), %eax
15// CHECK: # encoding: [0x8b,0x04,0x85,0x04,0x00,0x00,0x00]
16    mov eax, [4*eax][4]
17// CHECK: movl 4(,%eax,4), %eax
18// CHECK: # encoding: [0x8b,0x04,0x85,0x04,0x00,0x00,0x00]
19
20	mov eax, [esi + eax]
21// CHECK: movl (%esi,%eax), %eax
22// CHECK: # encoding: [0x8b,0x04,0x06]
23	mov eax, [esi][eax]
24// CHECK: movl (%esi,%eax), %eax
25// CHECK: # encoding: [0x8b,0x04,0x06]
26
27	mov eax, [esi + 4*eax]
28// CHECK: movl (%esi,%eax,4), %eax
29// CHECK: # encoding: [0x8b,0x04,0x86]
30	mov eax, [esi][4*eax]
31// CHECK: movl (%esi,%eax,4), %eax
32// CHECK: # encoding: [0x8b,0x04,0x86]
33
34    mov eax, [esi + eax + 4]
35// CHECK: movl 4(%esi,%eax), %eax
36// CHECK: # encoding: [0x8b,0x44,0x06,0x04]
37	mov eax, [esi][eax + 4]
38// CHECK: movl 4(%esi,%eax), %eax
39// CHECK: # encoding: [0x8b,0x44,0x06,0x04]
40	mov eax, [esi + eax][4]
41// CHECK: movl 4(%esi,%eax), %eax
42// CHECK: # encoding: [0x8b,0x44,0x06,0x04]
43	mov eax, [esi][eax][4]
44// CHECK: movl 4(%esi,%eax), %eax
45// CHECK: # encoding: [0x8b,0x44,0x06,0x04]
46
47	mov eax, [esi + 2*eax + 4]
48// CHECK: movl 4(%esi,%eax,2), %eax
49// CHECK: # encoding: [0x8b,0x44,0x46,0x04]
50	mov eax, [esi][2*eax + 4]
51// CHECK: movl 4(%esi,%eax,2), %eax
52// CHECK: # encoding: [0x8b,0x44,0x46,0x04]
53	mov eax, [esi + 2*eax][4]
54// CHECK: movl 4(%esi,%eax,2), %eax
55// CHECK: # encoding: [0x8b,0x44,0x46,0x04]
56	mov eax, [esi][2*eax][4]
57// CHECK: movl 4(%esi,%eax,2), %eax
58// CHECK: # encoding: [0x8b,0x44,0x46,0x04]
59
60    pusha
61// CHECK: pushal
62// CHECK: # encoding: [0x60]
63    popa
64// CHECK: popal
65// CHECK: # encoding: [0x61]
66    pushad
67// CHECK: pushal
68// CHECK: # encoding: [0x60]
69    popad
70// CHECK: popal
71// CHECK: # encoding: [0x61]
72
73	ret
74