output: elf64 -- increase .symtab and .rel* alignment to 8
[nasm.git] / test / mpx-64.asm
blobd17762211c268ae78e623570138810e9b915af2d
1 ;Testname=mpx-64; Arguments=-felf64 -ompx-64.o -O0; Files=stdout stderr mpx-64.o
2 BITS 64
4 bndmk bnd1, [r11]
5 bndmk bnd1, [rax]
6 bndmk bnd1, [0x399]
7 bndmk bnd1, [r9+0x3]
8 bndmk bnd1, [rax+0x3]
9 bndmk bnd1, [3,1*r12]
10 bndmk bnd1, [rax+rcx]
11 bndmk bnd1, [r11+1*rax+0x3]
12 bndmk bnd1, [rbx+1*r9+0x3]
14 ; bndmov
15 bndmov bnd1, [r11]
16 bndmov bnd1, [rax]
17 bndmov bnd1, [0x399]
18 bndmov bnd2, [r9+0x3]
19 bndmov bnd2, [rax+0x3]
20 bndmov bnd0, [1*r12+0x3]
21 bndmov bnd2, [rax+rdx]
22 bndmov bnd1, [r11+1*rax+0x3]
23 bndmov bnd1, [rbx+1*r9+0x3]
24 bndmov bnd0, bnd2
26 bndmov [r11], bnd1
27 bndmov [rax], bnd1
28 bndmov [0x399], bnd1
29 bndmov [r9+0x3], bnd2
30 bndmov [rax+0x3], bnd2
31 bndmov [1*r12+0x3], bnd0
32 bndmov [rax+rdx], bnd2
33 bndmov [r11+1*rax+0x3], bnd1
34 bndmov [rbx+1*r9+0x3], bnd1
35 bndmov bnd2, bnd0
37 ; bndcl
38 bndcl bnd1, [r11]
39 bndcl bnd1, [rax]
40 bndcl bnd1, r11
41 bndcl bnd1, rcx
42 bndcl bnd1, [0x399]
43 bndcl bnd1, [r9+0x3]
44 bndcl bnd1, [rax+0x3]
45 bndcl bnd1, [1*r12+0x3]
46 bndcl bnd1, [rax+rcx]
47 bndcl bnd1, [r11+1*rax+0x3]
48 bndcl bnd1, [rbx+1*r9+0x3]
50 ; bndcu
51 bndcu bnd1, [r11]
52 bndcu bnd1, [rax]
53 bndcu bnd1, r11
54 bndcu bnd1, rcx
55 bndcu bnd1, [0x399]
56 bndcu bnd1, [r9+0x3]
57 bndcu bnd1, [rax+0x3]
58 bndcu bnd1, [1*r12+0x3]
59 bndcu bnd1, [rax+rcx]
60 bndcu bnd1, [r11+1*rax+0x3]
61 bndcu bnd1, [rbx+1*r9+0x3]
63 ; bndcn
64 bndcn bnd1, [r11]
65 bndcn bnd1, [rax]
66 bndcn bnd1, r11
67 bndcn bnd1, rcx
68 bndcn bnd1, [0x399]
69 bndcn bnd1, [r9+0x3]
70 bndcn bnd1, [rax+0x3]
71 bndcn bnd1, [1*r9+0x3]
72 bndcn bnd1, [rax+rcx]
73 bndcn bnd1, [r11+1*rax+0x3]
74 bndcn bnd1, [rbx+1*r9+0x3]
76 ; bndstx
77 ; next 5 lines should be parsed same
78 bndstx [rax+0x3,rbx], bnd0 ; NASM - split EA
79 bndstx [rax+rbx*1+0x3], bnd0 ; GAS
80 bndstx [rax+rbx+3], bnd0 ; GAS
81 bndstx [rax+0x3], bnd0, rbx ; ICC-1
82 bndstx [rax+0x3], rbx, bnd0 ; ICC-2
84 ; next 5 lines should be parsed same
85 bndstx [,rcx*1], bnd2 ; NASM
86 bndstx [0,rcx*1], bnd2 ; NASM
87 bndstx [0], bnd2, rcx ; ICC-1
88 bndstx [0], rcx, bnd2 ; ICC-2
89 bndstx [rcx*1], bnd2 ; GAS - rcx is encoded as index only when it is mib
91 ; next 3 lines should be parsed same
92 bndstx [3,1*r12], bnd2 ; NASM
93 bndstx [1*r12+3], bnd2 ; GAS
94 bndstx [3], r12, bnd2 ; ICC
96 bndstx [r12+0x399], bnd3
97 bndstx [r11+0x1234], bnd1
98 bndstx [rbx+0x1234], bnd2
99 bndstx [rdx], bnd1
101 ; bndldx
102 bndldx bnd0, [rax+rbx*1+0x3]
103 bndldx bnd2, [rbx+rdx+3]
104 bndldx bnd3, [r12+0x399]
105 bndldx bnd1, [r11+0x1234]
106 bndldx bnd2, [rbx+0x1234]
107 bndldx bnd2, [1*rbx+3]
108 bndldx bnd2, [1*r12+3]
109 bndldx bnd1, [rdx]
111 ; bnd
112 bnd ret
113 bnd call foo
114 bnd jmp foo ; when it becomes a Jb form - short jmp (eb),
115 ; bnd prefix is silently dropped
116 bnd jmp near 0 ; near jmp (opcode e9)
117 ; bnd jmp short 0 ; explicit short jmp (opcode eb) : error
118 bnd jno foo
120 foo: bnd ret