Skip to content

Commit

Permalink
missing macro in advanced x86 encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
tgrysztar committed Jul 11, 2023
1 parent 01de57c commit 884bc5e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/x86-2/iset/avx.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,25 @@ macro AVX_512.single_source_instruction vex_mpw,evex_f,opcode,unit,dest,src
end if
end macro

macro AVX_512.single_source_instruction_imm8 vex_mpw,evex_f,opcode,unit,dest,src,aux
AVX_512.parse_k1z_operand@dest dest
AVX_512.parse_operand@src src
x86.parse_operand@aux aux
if @dest.type = 'mmreg' & (@src.type = 'mem' | @src.type = 'mmreg')
if @aux.size and not 1
err 'invalid operand size'
else if unit & ( @dest.size <> (unit-1) and not 15 + 16 | (@src.type = 'mem' & @src.size and not unit) )
err 'invalid operand size'
else if @src.size and not @dest.size & (unit = 0 | @src.type = 'mmreg')
err 'operand sizes do not match'
end if
@src.memsize = unit
AVX_512.store_instruction@src @dest.size,vex_mpw,evex_f,opcode,@dest.mask,@dest.rm,,1,@aux.imm
else
err 'invalid combination of operands'
end if
end macro

iterate <instr,opcode>, add,58h, mul,59h, sub,5Ch, div,5Eh

macro v#instr#pd? dest*,src*,src2*&
Expand Down

0 comments on commit 884bc5e

Please sign in to comment.