Debian Codegraph @

travis/test/mpx-64.asm

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