1# MPX instructions
2	.allow_index_reg
3	.text
4start:
5	### bndmk
6	bndmk (%eax), %bnd1
7	bndmk (0x399), %bnd1
8	bndmk 0x3(%edx), %bnd1
9	bndmk (%eax,%ecx), %bnd1
10	bndmk (,%ecx,1), %bnd1
11	bndmk 0x3(%ecx,%eax,1), %bnd1
12
13	### bndmov
14	bndmov (%eax), %bnd1
15	bndmov (0x399), %bnd1
16	bndmov 0x3(%edx), %bnd2
17	bndmov (%eax,%edx), %bnd2
18	bndmov (,%eax,1), %bnd2
19	bndmov 0x3(%ecx,%eax,1), %bnd1
20	bndmov %bnd2, %bnd0
21
22	bndmov %bnd1, (%eax)
23	bndmov %bnd1, (0x399)
24	bndmov %bnd2, 0x3(%edx)
25	bndmov %bnd2, (%eax,%edx)
26	bndmov %bnd2, (,%eax,1)
27	bndmov %bnd1, 0x3(%ecx,%eax,1)
28	bndmov %bnd0, %bnd2
29
30	### bndcl
31	bndcl (%ecx), %bnd1
32	bndcl %ecx, %bnd1
33	bndcl (0x399), %bnd1
34	bndcl 0x3(%edx), %bnd1
35	bndcl (%eax,%ecx), %bnd1
36	bndcl (,%ecx,1), %bnd1
37	bndcl 0x3(%ecx,%eax,1), %bnd1
38
39	### bndcu
40	bndcu (%ecx), %bnd1
41	bndcu %ecx, %bnd1
42	bndcu (0x399), %bnd1
43	bndcu 0x3(%edx), %bnd1
44	bndcu (%eax,%ecx), %bnd1
45	bndcu (,%ecx,1), %bnd1
46	bndcu 0x3(%ecx,%eax,1), %bnd1
47
48	### bndcn
49	bndcn (%ecx), %bnd1
50	bndcn %ecx, %bnd1
51	bndcn (0x399), %bnd1
52	bndcn 0x3(%edx), %bnd1
53	bndcn (%eax,%ecx), %bnd1
54	bndcn (,%ecx,1), %bnd1
55	bndcn 0x3(%ecx,%eax,1), %bnd1
56
57	### bndstx
58	bndstx %bnd0, 0x3(%eax,%ebx,1)
59	bndstx %bnd2, 3(%ebx,%edx)
60	bndstx %bnd2, 3(,%edx,1)
61	bndstx %bnd3, 0x399(%edx)
62	bndstx %bnd2, 0x1234(%ebx)
63	bndstx %bnd2, 3(%ebx,1)
64	bndstx %bnd1, (%edx)
65
66	### bndldx
67	bndldx 0x3(%eax,%ebx,1), %bnd0
68	bndldx 3(%ebx,%edx), %bnd2
69	bndldx 3(,%edx,1), %bnd2
70	bndldx 0x399(%edx), %bnd3
71	bndldx 0x1234(%ebx), %bnd2
72	bndldx 3(%ebx,1), %bnd2
73	bndldx (%edx), %bnd1
74
75	### bnd
76	bnd call	foo
77	bnd call	*(%eax)
78	bnd je	foo
79	bnd jmp	foo
80	bnd jmp	*(%ecx)
81	bnd ret
82
83.intel_syntax noprefix
84	bndmk bnd1, [eax]
85	bndmk bnd1, [0x399]
86	bndmk bnd1, [ecx+0x3]
87	bndmk bnd1, [eax+ecx]
88	bndmk bnd1, [ecx*1]
89	bndmk bnd1, [edx+1*eax+0x3]
90
91	### bndmov
92	bndmov bnd1, [eax]
93	bndmov bnd1, [0x399]
94	bndmov bnd1, [ecx+0x3]
95	bndmov bnd1, [eax+ecx]
96	bndmov bnd1, [ecx*1]
97	bndmov bnd1, [edx+1*eax+0x3]
98	bndmov bnd0, bnd1
99
100	bndmov [eax], bnd1
101	bndmov [0x399], bnd1
102	bndmov [ecx+0x3], bnd1
103	bndmov [eax+ecx], bnd1
104	bndmov [ecx*1], bnd1
105	bndmov [edx+1*eax+0x3], bnd1
106	bndmov bnd1, bnd0
107
108	### bndcl
109	bndcl bnd1, [eax]
110	bndcl bnd1, ecx
111	bndcl bnd1, [0x399]
112	bndcl bnd1, [ecx+0x3]
113	bndcl bnd1, [eax+ecx]
114	bndcl bnd1, [ecx*1]
115	bndcl bnd1, [edx+1*eax+0x3]
116
117	### bndcu
118	bndcu bnd1, [eax]
119	bndcu bnd1, ecx
120	bndcu bnd1, [0x399]
121	bndcu bnd1, [ecx+0x3]
122	bndcu bnd1, [eax+ecx]
123	bndcu bnd1, [ecx*1]
124	bndcu bnd1, [edx+1*eax+0x3]
125
126	### bndcn
127	bndcn bnd1, [eax]
128	bndcn bnd1, ecx
129	bndcn bnd1, [0x399]
130	bndcn bnd1, [ecx+0x3]
131	bndcn bnd1, [eax+ecx]
132	bndcn bnd1, [ecx*1]
133	bndcn bnd1, [edx+1*eax+0x3]
134
135	### bndstx
136	bndstx [eax+ebx*1+0x3], bnd0
137	bndstx [ebx+edx+3], bnd2
138	bndstx [ecx*1], bnd2
139	bndstx [edx+0x399], bnd3
140	bndstx [1*ebx+3], bnd2
141	bndstx [edx], bnd1
142
143	### bndldx
144	bndldx bnd0, [eax+ebx*1+0x3]
145	bndldx bnd2, [ebx+edx+3]
146	bndldx bnd2, [ecx*1]
147	bndldx bnd3, [edx+0x399]
148	bndldx bnd2, [1*ebx+3]
149	bndldx bnd1, [edx]
150
151	### bnd
152	bnd call	foo
153	bnd call	eax
154	bnd je	foo
155	bnd jmp	foo
156	bnd jmp	ecx
157	bnd ret
158
159foo:	bnd ret
160