4 iterate <instr,opcode>, bzhi,0F5h
\r
6 macro instr? dest*,src*,src2*
\r
7 x86.parse_operand @dest,dest
\r
8 x86.parse_operand @src,src
\r
9 x86.parse_operand @src2,src2
\r
10 if @dest.type = 'reg' & (@src.type = 'mem' | @src.type = 'reg') & @src2.type = 'reg'
\r
12 err 'invalid operand size'
\r
13 else if @src.size and not @dest.size | @src2.size <> @dest.size
\r
14 err 'operand sizes do not match'
\r
18 err 'instruction requires long mode'
\r
20 AVX.store_instruction 16,VEX_0F38_W1,opcode,@src,@dest.rm,@src2.rm
\r
22 AVX.store_instruction 16,VEX_0F38_W0,opcode,@src,@dest.rm,@src2.rm
\r
25 err 'invalid combination of operands'
\r
31 iterate <instr,vex_mp,opcode>, mulx,VEX_F2_0F38,0F6h, pdep,VEX_F2_0F38,0F5h, pext,VEX_F3_0F38,0F5h
\r
33 macro instr? dest*,src*,src2*
\r
34 x86.parse_operand @dest,dest
\r
35 x86.parse_operand @src,src
\r
36 x86.parse_operand @src2,src2
\r
37 if @dest.type = 'reg' & @src.type = 'reg' & (@src2.type = 'mem' | @src2.type = 'reg')
\r
39 err 'invalid operand size'
\r
40 else if @src.size <> @dest.size | @src2.size and not @dest.size
\r
41 err 'operand sizes do not match'
\r
45 err 'instruction requires long mode'
\r
47 AVX.store_instruction 16,vex_mp#_W1,opcode,@src2,@dest.rm,@src.rm
\r
49 AVX.store_instruction 16,vex_mp#_W0,opcode,@src2,@dest.rm,@src.rm
\r
52 err 'invalid combination of operands'
\r
58 macro rorx? dest*,src*,src2*
\r
59 x86.parse_operand @dest,dest
\r
60 x86.parse_operand @src,src
\r
61 x86.parse_operand @src2,src2
\r
62 if @dest.type = 'reg' & (@src.type = 'mem' | @src.type = 'reg') & @src2.type = 'imm'
\r
63 if @dest.size < 4 | @src2.size and not 1
\r
64 err 'invalid operand size'
\r
65 else if @src.size and not @dest.size
\r
66 err 'operand sizes do not match'
\r
70 err 'instruction requires long mode'
\r
72 AVX.store_instruction 16,VEX_F2_0F3A_W1,0F0h,@src,@dest.rm,,1,@src2.imm
\r
74 AVX.store_instruction 16,VEX_F2_0F3A_W0,0F0h,@src,@dest.rm,,1,@src2.imm
\r
77 err 'invalid combination of operands'
\r
81 iterate <instr,vex_mp,opcode>, sarx,VEX_F3_0F38,0F7h, shlx,VEX_66_0F38,0F7h, shrx,VEX_F2_0F38,0F7h
\r
83 macro instr? dest*,src*,src2*
\r
84 x86.parse_operand @dest,dest
\r
85 x86.parse_operand @src,src
\r
86 x86.parse_operand @src2,src2
\r
87 if @dest.type = 'reg' & (@src.type = 'mem' | @src.type = 'reg') & @src2.type = 'reg'
\r
89 err 'invalid operand size'
\r
90 else if @src.size and not @dest.size | @src2.size <> @dest.size
\r
91 err 'operand sizes do not match'
\r
95 err 'instruction requires long mode'
\r
97 AVX.store_instruction 16,vex_mp#_W1,opcode,@src,@dest.rm,@src2.rm
\r
99 AVX.store_instruction 16,vex_mp#_W0,opcode,@src,@dest.rm,@src2.rm
\r
102 err 'invalid combination of operands'
\r