4 iterate <instr,opcode>, loadall,<0Fh,05h>, clts,<0Fh,06h>
\r
6 define x86.instr? db opcode
\r
8 calminstruction instr?
\r
14 calminstruction arpl? dest*,src*
\r
15 asmcmd =x86.=parse_operand =@dest,dest
\r
16 asmcmd =x86.=parse_operand =@src,src
\r
17 check @src.type = 'reg' & (@dest.type = 'mem' | @dest.type = 'reg')
\r
18 jno invalid_combination_of_operands
\r
20 jno invalid_operand_size
\r
21 check @dest.size and not @src.size
\r
23 asmcmd =err 'operand sizes do not match'
\r
25 invalid_operand_size:
\r
26 asmcmd =err 'invalid operand size'
\r
28 asmcmd =x86.=store_instruction 63h,=@dest,=@src.=rm
\r
30 invalid_combination_of_operands:
\r
31 asmcmd =err 'invalid combination of operands'
\r
34 iterate <instr,ext,postbyte>, sldt,0,0, str,0,1, lldt,0,2, ltr,0,3, verr,0,4, verw,0,5, smsw,1,4, lmsw,1,6
\r
36 calminstruction instr? dest*
\r
37 asmcmd =x86.=parse_operand =@dest,dest
\r
38 check @dest.size and not 2
\r
40 asmcmd =err 'invalid operand size'
\r
42 check @dest.type = 'reg' | @dest.type = 'mem'
\r
44 asmcmd =err 'invalid operand'
\r
47 asmcmd =x86.=store_instruction <0Fh,ext>,=@dest,postbyte
\r
52 iterate <instr,postbyte>, lgdt,2, lidt,3, sgdt,0, sidt,1
\r
54 calminstruction instr? dest*
\r
55 asmcmd =x86.=parse_operand =@dest,dest
\r
56 check @dest.type = 'mem'
\r
58 asmcmd =err 'invalid operand'
\r
61 check @dest.size and not 5
\r
62 jno store_instruction
\r
63 asmcmd =err 'invalid operand size'
\r
65 asmcmd =x86.=store_instruction <0Fh,1>,=@dest,postbyte
\r
71 iterate <instr,ext>, lar,2, lsl,3
\r
73 calminstruction instr? dest*,src*
\r
74 asmcmd =x86.=parse_operand =@dest,dest
\r
75 asmcmd =x86.=parse_operand =@src,src
\r
76 check @dest.type = 'reg' & (@src.type = 'mem' | @src.type = 'reg')
\r
77 jno invalid_combination_of_operands
\r
78 check @src.size and not 2
\r
80 asmcmd =err 'invalid operand size'
\r
82 asmcmd =x86.=store_instruction <0Fh,ext>,=@src,=@dest.=rm
\r
84 invalid_combination_of_operands:
\r
85 asmcmd =err 'invalid combination of operands'
\r