## disassembler-intel32.pkg
#
# intel32 (x86)
#
# At the C level we're now using the 'disasm' x86 disassembler library,
# which in Debian is supplied by the packages disasm0 + disasm-dev:
# See calls to x86_init()/x86_disasm()/x86_format_insn()/x86_cleanup()
# in src/c/heapcleaner/heap-debug-stuff.c
# So if we need this functionality at the Mythryl level I'd currently
# be inclined to export the disasm calls from the C to the Mythry level,
# rather than re-inventing this wheel in Mythryl. -- 2011-12-26 CrT
# Compiled by:
#
src/lib/std/standard.lib### "Be very, very careful what you put into that head,
### because you will never, ever get it out."
###
### -- Thomas Cardinal Woolsey, 1471-1530
package disassembler_intel32
: Disassembler_Intel32 # Disassembler_Intel32 is from
src/lib/src/disassembler-intel32.api{
Operand_Size
= SIZE_0 #
| B_SIZE
# Byte-size operand
| V_SIZE
# Variable-size operand
| W_SIZE
# Word-size operand
| D_SIZE
# Doubleword-size operand
| Q_SIZE
# Quadword-size operand
| T_SIZE
# Tenbyte-size operand
| X_SIZE
# XMM-size operand (16 bytes)
| M_SIZE
# D_SIZE in 32bit, Q_SIZE in 64bit
| F_SIZE
# 4-6 byte pointer
| CONDITIONAL_JUMP
#
| LOOP_JCXZ
#
| CONSTANT_1
#
| STACK_V
#
| AL_REG
#
| CL_REG
#
| DL_REG
#
| BL_REG
#
| AH_REG
#
| CH_REG
#
| DH_REG
#
| BH_REG
#
| CS_REG
#
| DS_REG
#
| ES_REG
#
| FS_REG
#
| GS_REG
#
| SS_REG
#
| EAX_REG
#
| EBX_REG
#
| ECX_REG
#
| EDX_REG
#
| ESP_REG
#
| EBP_REG
#
| ESI_REG
#
| EDI_REG
#
| RAX_REG
#
| RBX_REG
#
| RCX_REG
#
| RDX_REG
#
| RSP_REG
#
| RBP_REG
#
| RSI_REG
#
| RDI_REG
#
| INDIR_DX_REG
#
;
Print_Mode
= A_PRINT # Print 'b' if no register operands or suffix_always
| B_PRINT
# Print 'b' if suffix_always
| C_PRINT
# Print 's' or 'l' ('w' or 'd' in Intel mode) depending upon operand
| F_PRINT
# Print 'w' or 'l' depending on address size prefix (loop instructions)
| FH_PRINT
# Print F_PRINT, then H_PRINT
| H_PRINT
# Print ",pt" or ",pn" branch hint
| P_PRINT
# Print 'w', 'l' or 'q' if instruction has an operand size prefix, or suffix_always is true. print 'q' if rex prefix is present.
| Q_PRINT
# Print 'w', 'l' or 'q' if no register operands or suffix_always is true.
| R_PRINT
# Print 'w', 'l' or 'q' ("wd" or "dq" in intel mode)
| S_PRINT
# Print 'w', 'l' or 'q' if suffix_always is true
| T_PRINT
# Print 'q' in 64bit mode and behave as 'P' otherwise
| U_PRINT
# Print 'q' in 64bit mode and behave as 'Q' otherwise
| V_PRINT
# Print 'q' in 64bit mode and behave as 'S' otherwise
| W_PRINT
# Print 'b' or 'w' ("w" or "de" in intel mode)
| PRINT_0
# Null mode.
;
fun op_e (bytemode, sizeflat) = ();
fun op_g (bytemode, sizeflat) = ();
fun op_i (bytemode, sizeflat) = ();
fun op_i64 (bytemode, sizeflat) = ();
fun op_j (bytemode, sizeflat) = ();
fun op_m (bytemode, sizeflat) = ();
fun op_si (bytemode, sizeflat) = ();
fun op_ds (bytemode, sizeflat) = ();
fun op_es (bytemode, sizeflat) = ();
fun op_reg (bytemode, sizeflat) = ();
fun op_seg (bytemode, sizeflat) = ();
fun op_dir (bytemode, sizeflat) = ();
fun op_indir_e (bytemode, sizeflat) = ();
fun op_nop1 (bytemode, sizeflat) = ();
fun op_nop2 (bytemode, sizeflat) = ();
fun op_null (bytemode, sizeflat) = ();
fun op_imreg (bytemode, sizeflat) = ();
fun op_off64 (bytemode, sizeflat) = ();
fun op_seg_fixup (bytemode, sizeflat) = ();
fun op_rep_fixup (bytemode, sizeflat) = ();
Operand
=
( (Int,Int) -> Void, Operand_Size );
a_p = (op_dir, SIZE_0);
e_b = (op_e, B_SIZE);
e_v = (op_e, V_SIZE);
e_w = (op_e, W_SIZE);
e_stackv = (op_e, STACK_V);
m = (op_m, SIZE_0);
m_a = (op_e, V_SIZE); # Why this duplication? Is this a typo for (op_m, V_SIZE)? XXX BUGGO FIXME
m_p = (op_e, F_SIZE);
g_b = (op_g, B_SIZE);
g_v = (op_g, V_SIZE);
i_1 = (op_i, CONSTANT_1);
i_b = (op_i, B_SIZE);
i_q = (op_i, Q_SIZE);
i_v = (op_i, V_SIZE);
i_w = (op_i, W_SIZE);
i_v64 = (op_i64, V_SIZE);
j_b = (op_j, B_SIZE);
j_v = (op_j, V_SIZE);
rm_al = (op_reg, AL_REG);
rm_cl = (op_reg, CL_REG);
rm_dl = (op_reg, DL_REG);
rm_bl = (op_reg, BL_REG);
rm_ah = (op_reg, AH_REG);
rm_ch = (op_reg, CH_REG);
rm_dh = (op_reg, DH_REG);
rm_bh = (op_reg, BH_REG);
al = (op_imreg, AL_REG);
cl = (op_imreg, CL_REG);
dl = (op_imreg, DL_REG);
bl = (op_imreg, BL_REG);
ah = (op_imreg, AH_REG);
ch = (op_imreg, CH_REG);
dh = (op_imreg, DH_REG);
bh = (op_imreg, BH_REG);
si_b = (op_si, B_SIZE); # Sign-extended byte.
o_b = (op_off64, B_SIZE);
o_v = (op_off64, V_SIZE);
s_v = (op_seg_fixup, V_SIZE);
s_w = (op_seg_fixup, W_SIZE);
x_b = (op_ds, ESI_REG);
x_v = (op_ds, ESI_REG); # Is this duplication a bug?
y_b = (op_es, EDI_REG);
y_v = (op_es, EDI_REG); # Is this duplication a bug?
dsbx = (op_ds, EBX_REG);
alr = (op_rep_fixup, AL_REG);
eaxr = (op_rep_fixup, EAX_REG);
xbr = (op_rep_fixup, ESI_REG);
xvr = (op_rep_fixup, ESI_REG); # Is this duplication a bug?
ybr = (op_rep_fixup, EDI_REG);
yvr = (op_rep_fixup, EDI_REG); # Is this duplication a bug?
indir_ev = (op_indir_e, STACK_V);
indir_ep = (op_indir_e, F_SIZE);
indir_dx = (op_imreg, INDIR_DX_REG);
nop1 = (op_nop1, EAX_REG);
nop2 = (op_nop2, EAX_REG);
eax = (op_imreg, EAX_REG);
cs = (op_reg, CS_REG);
ds = (op_reg, DS_REG);
es = (op_reg, ES_REG);
fs = (op_reg, FS_REG);
gs = (op_reg, GS_REG);
ss = (op_reg, SS_REG);
conditional_jump = (op_null, CONDITIONAL_JUMP);
loop_jcxz_flag = (op_null, LOOP_JCXZ);
rm_eax = (op_reg, EAX_REG);
rm_ebx = (op_reg, EBX_REG);
rm_ecx = (op_reg, ECX_REG);
rm_edx = (op_reg, EDX_REG);
rm_esp = (op_reg, ESP_REG);
rm_ebp = (op_reg, EBP_REG);
rm_esi = (op_reg, ESI_REG);
rm_edi = (op_reg, EDI_REG);
rm_rax = (op_reg, RAX_REG);
rm_rbx = (op_reg, RBX_REG);
rm_rcx = (op_reg, RCX_REG);
rm_rdx = (op_reg, RDX_REG);
rm_rsp = (op_reg, RSP_REG);
rm_rbp = (op_reg, RBP_REG);
rm_rsi = (op_reg, RSI_REG);
rm_rdi = (op_reg, RDI_REG);
Instruction
=
INSTRUCTION (String, Print_Mode, List Operand, Vector Instruction );
base_ops
=
#[ # 00
INSTRUCTION ("add", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("add", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("add", B_PRINT, [ g_b, e_b ], #[]),
INSTRUCTION ("add", S_PRINT, [ g_v, e_v ], #[]),
INSTRUCTION ("add", B_PRINT, [ al, i_b ], #[]),
INSTRUCTION ("add", S_PRINT, [ eax, i_v ], #[]),
INSTRUCTION ("push", T_PRINT, [ es ], #[]),
INSTRUCTION ("pop", T_PRINT, [ es ], #[]),
# 08
INSTRUCTION ("or", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("or", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("or", B_PRINT, [ g_b, e_b ], #[]),
INSTRUCTION ("or", S_PRINT, [ g_v, e_v ], #[]),
INSTRUCTION ("or", B_PRINT, [ al, i_b ], #[]),
INSTRUCTION ("or", S_PRINT, [ eax, i_v ], #[]),
INSTRUCTION ("push", T_PRINT, [ cs ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # 0x0f extended opcode escape
# 10
INSTRUCTION ("adc", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("adc", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("adc", B_PRINT, [ g_b, e_b ], #[]),
INSTRUCTION ("adc", S_PRINT, [ g_v, e_v ], #[]),
INSTRUCTION ("adc", B_PRINT, [ al, i_b ], #[]),
INSTRUCTION ("adc", S_PRINT, [ eax, i_v ], #[]),
INSTRUCTION ("push", T_PRINT, [ ss ], #[]),
INSTRUCTION ("pop", T_PRINT, [ ss ], #[]),
# 18
INSTRUCTION ("sbb", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("sbb", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("sbb", B_PRINT, [ g_b, e_b ], #[]),
INSTRUCTION ("sbb", S_PRINT, [ g_v, e_v ], #[]),
INSTRUCTION ("sbb", B_PRINT, [ al, i_b ], #[]),
INSTRUCTION ("sbb", S_PRINT, [ eax, i_v ], #[]),
INSTRUCTION ("push", T_PRINT, [ ds ], #[]),
INSTRUCTION ("pop", T_PRINT, [ ds ], #[]),
# 20
INSTRUCTION ("and", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("and", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("and", B_PRINT, [ g_b, e_b ], #[]),
INSTRUCTION ("and", S_PRINT, [ g_v, e_v ], #[]),
INSTRUCTION ("and", B_PRINT, [ al, i_b ], #[]),
INSTRUCTION ("and", S_PRINT, [ eax, i_v ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # SEG ES prefix
INSTRUCTION ("daa", PRINT_0, [ ], #[]),
# 28
INSTRUCTION ("sub", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("sub", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("sub", B_PRINT, [ g_b, e_b ], #[]),
INSTRUCTION ("sub", S_PRINT, [ g_v, e_v ], #[]),
INSTRUCTION ("sub", B_PRINT, [ al, i_b ], #[]),
INSTRUCTION ("sub", S_PRINT, [ eax, i_v ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # SEG CS prefix
INSTRUCTION ("das", PRINT_0, [ ], #[]),
# 30
INSTRUCTION ("xor", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("xor", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("xor", B_PRINT, [ g_b, e_b ], #[]),
INSTRUCTION ("xor", S_PRINT, [ g_v, e_v ], #[]),
INSTRUCTION ("xor", B_PRINT, [ al, i_b ], #[]),
INSTRUCTION ("xor", S_PRINT, [ eax, i_v ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # SEG CS prefix
INSTRUCTION ("aaa", PRINT_0, [ ], #[]),
# 38
INSTRUCTION ("cmp", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("cmp", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("cmp", B_PRINT, [ g_b, e_b ], #[]),
INSTRUCTION ("cmp", S_PRINT, [ g_v, e_v ], #[]),
INSTRUCTION ("cmp", B_PRINT, [ al, i_b ], #[]),
INSTRUCTION ("cmp", S_PRINT, [ eax, i_v ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # SEG DS prefix
INSTRUCTION ("aas", PRINT_0, [ ], #[]),
# 40
INSTRUCTION ("inc", S_PRINT, [ rm_eax ], #[]),
INSTRUCTION ("inc", S_PRINT, [ rm_ecx ], #[]),
INSTRUCTION ("inc", S_PRINT, [ rm_edx ], #[]),
INSTRUCTION ("inc", S_PRINT, [ rm_ebx ], #[]),
INSTRUCTION ("inc", S_PRINT, [ rm_esp ], #[]),
INSTRUCTION ("inc", S_PRINT, [ rm_ebp ], #[]),
INSTRUCTION ("inc", S_PRINT, [ rm_esi ], #[]),
INSTRUCTION ("inc", S_PRINT, [ rm_edi ], #[]),
# 48
INSTRUCTION ("dec", S_PRINT, [ rm_eax ], #[]),
INSTRUCTION ("dec", S_PRINT, [ rm_ecx ], #[]),
INSTRUCTION ("dec", S_PRINT, [ rm_edx ], #[]),
INSTRUCTION ("dec", S_PRINT, [ rm_ebx ], #[]),
INSTRUCTION ("dec", S_PRINT, [ rm_esp ], #[]),
INSTRUCTION ("dec", S_PRINT, [ rm_ebp ], #[]),
INSTRUCTION ("dec", S_PRINT, [ rm_esi ], #[]),
INSTRUCTION ("dec", S_PRINT, [ rm_edi ], #[]),
# 50
INSTRUCTION ("push", V_PRINT, [ rm_rax ], #[]),
INSTRUCTION ("push", V_PRINT, [ rm_rcx ], #[]),
INSTRUCTION ("push", V_PRINT, [ rm_rdx ], #[]),
INSTRUCTION ("push", V_PRINT, [ rm_rbx ], #[]),
INSTRUCTION ("push", V_PRINT, [ rm_rsp ], #[]),
INSTRUCTION ("push", V_PRINT, [ rm_rbp ], #[]),
INSTRUCTION ("push", V_PRINT, [ rm_rsi ], #[]),
INSTRUCTION ("push", V_PRINT, [ rm_rdi ], #[]),
# 58
INSTRUCTION ("pop", V_PRINT, [ rm_rax ], #[]),
INSTRUCTION ("pop", V_PRINT, [ rm_rcx ], #[]),
INSTRUCTION ("pop", V_PRINT, [ rm_rdx ], #[]),
INSTRUCTION ("pop", V_PRINT, [ rm_rbx ], #[]),
INSTRUCTION ("pop", V_PRINT, [ rm_rsp ], #[]),
INSTRUCTION ("pop", V_PRINT, [ rm_rbp ], #[]),
INSTRUCTION ("pop", V_PRINT, [ rm_rsi ], #[]),
INSTRUCTION ("pop", V_PRINT, [ rm_rdi ], #[]),
# 60
INSTRUCTION ("pusha", P_PRINT, [ ], #[]),
INSTRUCTION ("popa", P_PRINT, [ ], #[]),
INSTRUCTION ("bound", S_PRINT, [ g_v, m_a ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # "X86_64_0"
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # fs seg
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # gs seg
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # operand-size prefix
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # address-size prefix
# 68
INSTRUCTION ("push", T_PRINT, [ i_q ], #[]),
INSTRUCTION ("imul", S_PRINT, [ g_v, e_v, i_v ], #[]),
INSTRUCTION ("push", T_PRINT, [ si_b ], #[]),
INSTRUCTION ("imul", S_PRINT, [ g_v, e_v, si_b ], #[]),
INSTRUCTION ("insb", PRINT_0, [ ], #[]), # XXX BUGGO FIXME incomplete -- but I doubt we ever generate this.
INSTRUCTION ("ins", R_PRINT, [ ], #[]), # XXX BUGGO FIXME incomplete -- but I doubt we ever generate this.
INSTRUCTION ("outsb", PRINT_0, [ ], #[]), # XXX BUGGO FIXME incomplete -- but I doubt we ever generate this.
INSTRUCTION ("outs", R_PRINT, [ ], #[]), # XXX BUGGO FIXME incomplete -- but I doubt we ever generate this.
# 70
INSTRUCTION ("jo", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("jno", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("jb", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("jae", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("je", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("jne", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("jbe", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("ja", H_PRINT, [ j_b, conditional_jump ], #[]),
# 78
INSTRUCTION ("js", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("jns", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("jp", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("jnp", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("jl", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("jge", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("jle", H_PRINT, [ j_b, conditional_jump ], #[]),
INSTRUCTION ("jg", H_PRINT, [ j_b, conditional_jump ], #[]),
# 80
INSTRUCTION ("(group_1b)", PRINT_0, [ ], #[
INSTRUCTION ("add", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("or", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("adc", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("sbb", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("and", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("sub", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("xor", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("cmp", A_PRINT, [ e_b, i_b ], #[])
] ),
INSTRUCTION ("(group_1S)", PRINT_0, [ ], #[
INSTRUCTION ("add", Q_PRINT, [ e_v, i_v ], #[]),
INSTRUCTION ("or", Q_PRINT, [ e_v, i_v ], #[]),
INSTRUCTION ("adc", Q_PRINT, [ e_v, i_v ], #[]),
INSTRUCTION ("sbb", Q_PRINT, [ e_v, i_v ], #[]),
INSTRUCTION ("and", Q_PRINT, [ e_v, i_v ], #[]),
INSTRUCTION ("sub", Q_PRINT, [ e_v, i_v ], #[]),
INSTRUCTION ("xor", Q_PRINT, [ e_v, i_v ], #[]),
INSTRUCTION ("cmp", Q_PRINT, [ e_v, i_v ], #[])
] ),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(group_1Ss)", PRINT_0, [ ], #[
INSTRUCTION ("add", Q_PRINT, [ e_v, si_b ], #[]),
INSTRUCTION ("or", Q_PRINT, [ e_v, si_b ], #[]),
INSTRUCTION ("adc", Q_PRINT, [ e_v, si_b ], #[]),
INSTRUCTION ("sbb", Q_PRINT, [ e_v, si_b ], #[]),
INSTRUCTION ("and", Q_PRINT, [ e_v, si_b ], #[]),
INSTRUCTION ("sub", Q_PRINT, [ e_v, si_b ], #[]),
INSTRUCTION ("xor", Q_PRINT, [ e_v, si_b ], #[]),
INSTRUCTION ("cmp", Q_PRINT, [ e_v, si_b ], #[])
] ),
INSTRUCTION ("test", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("test", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("xchg", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("xchg", S_PRINT, [ e_v, g_v ], #[]),
# 88
INSTRUCTION ("mov", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("mov", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("mov", B_PRINT, [ g_b, e_b ], #[]),
INSTRUCTION ("mov", S_PRINT, [ g_v, e_v ], #[]),
INSTRUCTION ("mov", Q_PRINT, [ s_v, s_w ], #[]),
INSTRUCTION ("lea", S_PRINT, [ g_v, m ], #[]),
INSTRUCTION ("mov", Q_PRINT, [ s_w, s_v ], #[]),
INSTRUCTION ("pop", U_PRINT, [ e_stackv ], #[]),
# 90
INSTRUCTION ("xchg", S_PRINT, [ nop1, nop2 ], #[]),
INSTRUCTION ("xchg", S_PRINT, [ rm_ecx, eax ], #[]),
INSTRUCTION ("xchg", S_PRINT, [ rm_edx, eax ], #[]),
INSTRUCTION ("xchg", S_PRINT, [ rm_ebx, eax ], #[]),
INSTRUCTION ("xchg", S_PRINT, [ rm_esp, eax ], #[]),
INSTRUCTION ("xchg", S_PRINT, [ rm_ebp, eax ], #[]),
INSTRUCTION ("xchg", S_PRINT, [ rm_esi, eax ], #[]),
INSTRUCTION ("xchg", S_PRINT, [ rm_edi, eax ], #[]),
# 98
INSTRUCTION ("c", W_PRINT, [ ], #[]),
INSTRUCTION ("c", R_PRINT, [ ], #[]),
INSTRUCTION ("lcall", T_PRINT, [ a_p ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # (fwait)
INSTRUCTION ("pushf", T_PRINT, [ ], #[]), # (fwait)
INSTRUCTION ("popf", T_PRINT, [ ], #[]), # (fwait)
INSTRUCTION ("sahf", PRINT_0, [ ], #[]), # (fwait)
INSTRUCTION ("lahf", PRINT_0, [ ], #[]), # (fwait)
# a0
INSTRUCTION ("mov", B_PRINT, [ al, o_b ], #[]),
INSTRUCTION ("mov", S_PRINT, [ eax, o_v ], #[]),
INSTRUCTION ("mov", B_PRINT, [ o_b, al ], #[]),
INSTRUCTION ("mov", S_PRINT, [ o_v, eax ], #[]),
INSTRUCTION ("movs", PRINT_0, [ ybr, x_b ], #[]),
INSTRUCTION ("movs", PRINT_0, [ yvr, x_v ], #[]),
INSTRUCTION ("cmps", PRINT_0, [ x_b, y_b ], #[]),
INSTRUCTION ("cmps", PRINT_0, [ x_v, y_v ], #[]),
# a8
INSTRUCTION ("test", B_PRINT, [ al, i_b ], #[]),
INSTRUCTION ("test", S_PRINT, [ eax, i_v ], #[]),
INSTRUCTION ("stos", B_PRINT, [ ybr, al ], #[]),
INSTRUCTION ("stos", S_PRINT, [ yvr, eax ], #[]),
INSTRUCTION ("lods", B_PRINT, [ alr, x_b ], #[]),
INSTRUCTION ("lods", S_PRINT, [eaxr, x_v ], #[]),
INSTRUCTION ("scas", B_PRINT, [ al, y_b ], #[]),
INSTRUCTION ("scas", S_PRINT, [ eax, y_v ], #[]),
# b0
INSTRUCTION ("mov", B_PRINT, [ rm_al, i_b ], #[]),
INSTRUCTION ("mov", B_PRINT, [ rm_cl, i_b ], #[]),
INSTRUCTION ("mov", B_PRINT, [ rm_dl, i_b ], #[]),
INSTRUCTION ("mov", B_PRINT, [ rm_bl, i_b ], #[]),
INSTRUCTION ("mov", B_PRINT, [ rm_ah, i_b ], #[]),
INSTRUCTION ("mov", B_PRINT, [ rm_ch, i_b ], #[]),
INSTRUCTION ("mov", B_PRINT, [ rm_dh, i_b ], #[]),
INSTRUCTION ("mov", B_PRINT, [ rm_bh, i_b ], #[]),
# b8
INSTRUCTION ("mov", S_PRINT, [ rm_eax, i_v64 ], #[]),
INSTRUCTION ("mov", S_PRINT, [ rm_ecx, i_v64 ], #[]),
INSTRUCTION ("mov", S_PRINT, [ rm_edx, i_v64 ], #[]),
INSTRUCTION ("mov", S_PRINT, [ rm_ebx, i_v64 ], #[]),
INSTRUCTION ("mov", S_PRINT, [ rm_esp, i_v64 ], #[]),
INSTRUCTION ("mov", S_PRINT, [ rm_ebp, i_v64 ], #[]),
INSTRUCTION ("mov", S_PRINT, [ rm_esi, i_v64 ], #[]),
INSTRUCTION ("mov", S_PRINT, [ rm_edi, i_v64 ], #[]),
# c0
INSTRUCTION ("(group_2b)", PRINT_0, [ ], #[
INSTRUCTION ("rol", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("ror", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("rcl", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("rcr", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("shl", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("shr", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("sar", A_PRINT, [ e_b, i_b ], #[])
] ),
INSTRUCTION ("(group_2S)", PRINT_0, [ ], #[
INSTRUCTION ("rol", Q_PRINT, [ e_v, i_b ], #[]),
INSTRUCTION ("ror", Q_PRINT, [ e_v, i_b ], #[]),
INSTRUCTION ("rcl", Q_PRINT, [ e_v, i_b ], #[]),
INSTRUCTION ("rcr", Q_PRINT, [ e_v, i_b ], #[]),
INSTRUCTION ("shl", Q_PRINT, [ e_v, i_b ], #[]),
INSTRUCTION ("shr", Q_PRINT, [ e_v, i_b ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("sar", Q_PRINT, [ e_b, i_b ], #[])
] ),
INSTRUCTION ("ret", T_PRINT, [ i_w ], #[]),
INSTRUCTION ("ret", T_PRINT, [ ], #[]),
INSTRUCTION ("les", S_PRINT, [ g_v, m_p ], #[]),
INSTRUCTION ("lds", S_PRINT, [ g_v, m_p ], #[]),
INSTRUCTION ("(group_11_c6)", PRINT_0, [ ], #[
INSTRUCTION ("mov", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[])
] ),
INSTRUCTION ("(group_11_c7)", PRINT_0, [ ], #[
INSTRUCTION ("mov", Q_PRINT, [ e_v, i_v ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[])
] ),
# c8
INSTRUCTION ("enter", T_PRINT, [ i_w, i_b ], #[]),
INSTRUCTION ("leave", T_PRINT, [ ], #[]),
INSTRUCTION ("lret", P_PRINT, [ i_w ], #[]),
INSTRUCTION ("lret", P_PRINT, [ ], #[]),
INSTRUCTION ("int3", PRINT_0, [ ], #[]),
INSTRUCTION ("int", PRINT_0, [ i_b ], #[]),
INSTRUCTION ("into", PRINT_0, [ i_b ], #[]),
INSTRUCTION ("iret", P_PRINT, [ ], #[]),
# d0
INSTRUCTION ("(group_2b_one)", PRINT_0, [ ], #[
INSTRUCTION ("rol", A_PRINT, [ e_b, i_1 ], #[]),
INSTRUCTION ("ror", A_PRINT, [ e_b, i_1 ], #[]),
INSTRUCTION ("rcl", A_PRINT, [ e_b, i_1 ], #[]),
INSTRUCTION ("rcr", A_PRINT, [ e_b, i_1 ], #[]),
INSTRUCTION ("shl", A_PRINT, [ e_b, i_1 ], #[]),
INSTRUCTION ("shr", A_PRINT, [ e_b, i_1 ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("sar", A_PRINT, [ e_b, i_1 ], #[])
] ),
INSTRUCTION ("(group_2S_one)", PRINT_0, [ ], #[
INSTRUCTION ("rol", Q_PRINT, [ e_v, i_1 ], #[]),
INSTRUCTION ("ror", Q_PRINT, [ e_v, i_1 ], #[]),
INSTRUCTION ("rcl", Q_PRINT, [ e_v, i_1 ], #[]),
INSTRUCTION ("rcr", Q_PRINT, [ e_v, i_1 ], #[]),
INSTRUCTION ("shl", Q_PRINT, [ e_v, i_1 ], #[]),
INSTRUCTION ("shr", Q_PRINT, [ e_v, i_1 ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("sar", Q_PRINT, [ e_v, i_1 ], #[])
] ),
INSTRUCTION ("(group_2b_cl)", PRINT_0, [ ], #[
INSTRUCTION ("rol", A_PRINT, [ e_b, cl ], #[]),
INSTRUCTION ("ror", A_PRINT, [ e_b, cl ], #[]),
INSTRUCTION ("rcl", A_PRINT, [ e_b, cl ], #[]),
INSTRUCTION ("rcr", A_PRINT, [ e_b, cl ], #[]),
INSTRUCTION ("shl", A_PRINT, [ e_b, cl ], #[]),
INSTRUCTION ("shr", A_PRINT, [ e_b, cl ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("sar", A_PRINT, [ e_b, cl ], #[])
] ),
INSTRUCTION ("(group_2S_cl)", PRINT_0, [ ], #[
INSTRUCTION ("rol", Q_PRINT, [ e_v, cl ], #[]),
INSTRUCTION ("ror", Q_PRINT, [ e_v, cl ], #[]),
INSTRUCTION ("rcl", Q_PRINT, [ e_v, cl ], #[]),
INSTRUCTION ("rcr", Q_PRINT, [ e_v, cl ], #[]),
INSTRUCTION ("shl", Q_PRINT, [ e_v, cl ], #[]),
INSTRUCTION ("shr", Q_PRINT, [ e_v, cl ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("sar", Q_PRINT, [ e_v, cl ], #[])
] ),
INSTRUCTION ("aam", PRINT_0, [ si_b ], #[]),
INSTRUCTION ("aad", PRINT_0, [ si_b ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("xlat", PRINT_0, [ dsbx ], #[]),
# d8
INSTRUCTION ("(float)", PRINT_0, [ ], #[]),
INSTRUCTION ("(float)", PRINT_0, [ ], #[]),
INSTRUCTION ("(float)", PRINT_0, [ ], #[]),
INSTRUCTION ("(float)", PRINT_0, [ ], #[]),
INSTRUCTION ("(float)", PRINT_0, [ ], #[]),
INSTRUCTION ("(float)", PRINT_0, [ ], #[]),
INSTRUCTION ("(float)", PRINT_0, [ ], #[]),
INSTRUCTION ("(float)", PRINT_0, [ ], #[]),
# e0
INSTRUCTION ("loopne", FH_PRINT, [ j_b, loop_jcxz_flag ], #[]),
INSTRUCTION ("loope", FH_PRINT, [ j_b, loop_jcxz_flag ], #[]),
INSTRUCTION ("loop", FH_PRINT, [ j_b, loop_jcxz_flag ], #[]),
INSTRUCTION ("jecxz", H_PRINT, [ j_b, loop_jcxz_flag ], #[]), # Should be "jcxz" for 16-bit version, not that we'd ever use it...
INSTRUCTION ("in", B_PRINT, [ al, i_b ], #[]),
INSTRUCTION ("in", S_PRINT, [ eax, i_b ], #[]),
INSTRUCTION ("out", B_PRINT, [ i_b, al ], #[]),
INSTRUCTION ("out", S_PRINT, [ i_b, eax ], #[]),
# e8
INSTRUCTION ("call", T_PRINT, [ j_v ], #[]),
INSTRUCTION ("jmp", T_PRINT, [ j_v ], #[]),
INSTRUCTION ("ljmp", T_PRINT, [ a_p ], #[]),
INSTRUCTION ("jmp", T_PRINT, [ j_b ], #[]),
INSTRUCTION ("in", B_PRINT, [ al, indir_dx ], #[]),
INSTRUCTION ("in", S_PRINT, [ eax, indir_dx ], #[]),
INSTRUCTION ("out", B_PRINT, [ indir_dx, al ], #[]),
INSTRUCTION ("out", S_PRINT, [ indir_dx, eax ], #[]),
# f0
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # lock prefix
INSTRUCTION ("icebp", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # repne prefix
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]), # repz prefix
INSTRUCTION ("hlt", PRINT_0, [ ], #[]),
INSTRUCTION ("cmc", PRINT_0, [ ], #[]),
INSTRUCTION ("(group_3b)", PRINT_0, [ ], #[
INSTRUCTION ("test", A_PRINT, [ e_b, i_b ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("not", A_PRINT, [ e_b ], #[]),
INSTRUCTION ("neg", A_PRINT, [ e_b ], #[]),
INSTRUCTION ("mul", A_PRINT, [ e_b ], #[]),
INSTRUCTION ("imul", A_PRINT, [ e_b ], #[]),
INSTRUCTION ("div", A_PRINT, [ e_b ], #[]),
INSTRUCTION ("idiv", A_PRINT, [ e_b ], #[])
] ),
INSTRUCTION ("(group_3S)", PRINT_0, [ ], #[
INSTRUCTION ("test", Q_PRINT, [ e_v, i_v ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("not", Q_PRINT, [ e_v ], #[]),
INSTRUCTION ("neg", Q_PRINT, [ e_v ], #[]),
INSTRUCTION ("mul", Q_PRINT, [ e_v ], #[]),
INSTRUCTION ("imul", Q_PRINT, [ e_v ], #[]),
INSTRUCTION ("div", Q_PRINT, [ e_v ], #[]),
INSTRUCTION ("idiv", Q_PRINT, [ e_v ], #[])
] ),
# f8
INSTRUCTION ("clc", PRINT_0, [ ], #[]),
INSTRUCTION ("stc", PRINT_0, [ ], #[]),
INSTRUCTION ("cli", PRINT_0, [ ], #[]),
INSTRUCTION ("sti", PRINT_0, [ ], #[]),
INSTRUCTION ("cld", PRINT_0, [ ], #[]),
INSTRUCTION ("std", PRINT_0, [ ], #[]),
INSTRUCTION ("(group_4)", PRINT_0, [ ], #[
INSTRUCTION ("inc", A_PRINT, [ e_b ], #[]),
INSTRUCTION ("dec", A_PRINT, [ e_b ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[])
] ),
INSTRUCTION ("(group_5)", PRINT_0, [ ], #[
INSTRUCTION ("inc", Q_PRINT, [ e_v ], #[]),
INSTRUCTION ("dec", Q_PRINT, [ e_v ], #[]),
INSTRUCTION ("call", T_PRINT, [ indir_ev ], #[]),
INSTRUCTION ("lcall", T_PRINT, [ indir_ep ], #[]),
INSTRUCTION ("jmp", T_PRINT, [ indir_ev ], #[]),
INSTRUCTION ("ljmp", T_PRINT, [ indir_ep ], #[]),
INSTRUCTION ("push", U_PRINT, [ e_stackv ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[])
] )
];
prefix_0f_instructions
=
#[ # 00
INSTRUCTION ("(group_6)", PRINT_0, [ ], #[
INSTRUCTION ("sldt", PRINT_0, [ e_v ], #[]),
INSTRUCTION ("str", PRINT_0, [ e_v ], #[]),
INSTRUCTION ("lldt", PRINT_0, [ e_w ], #[]),
INSTRUCTION ("ltr", PRINT_0, [ e_w ], #[]),
INSTRUCTION ("verr", PRINT_0, [ e_w ], #[]),
INSTRUCTION ("verw", PRINT_0, [ e_w ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[])
] ),
INSTRUCTION ("(group_7)", PRINT_0, [ ], #[
INSTRUCTION ("sgdt", Q_PRINT, [ ], #[]), # XXX BUGGO FIXME args for this not implements.
INSTRUCTION ("sidt", Q_PRINT, [ ], #[]), # XXX BUGGO FIXME args for this not implements.
INSTRUCTION ("lgdt", Q_PRINT, [ m ], #[]),
INSTRUCTION ("lidt", Q_PRINT, [ ], #[]), # XXX BUGGO FIXME args for this not implements.
INSTRUCTION ("smsw", PRINT_0, [ e_v ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("lmsw", PRINT_0, [ e_w ], #[]),
INSTRUCTION ("invlpg", PRINT_0, [ ], #[]) # XXX BUGGO FIXME args for this not implements.
] ),
INSTRUCTION ("lar", S_PRINT, [ g_v, e_w ], #[]),
INSTRUCTION ("lsl", S_PRINT, [ g_v, e_w ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("syscall", PRINT_0, [ ], #[]),
INSTRUCTION ("clts", PRINT_0, [ ], #[]),
INSTRUCTION ("sysret", P_PRINT, [ ], #[]),
# 08
INSTRUCTION ("invd", PRINT_0, [ ], #[]),
INSTRUCTION ("wbinvd", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("ud2a", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(GRPAMD)", PRINT_0, [ ], #[]),
INSTRUCTION ("femms", PRINT_0, [ ], #[]),
INSTRUCTION ("(3DNow)", PRINT_0, [ ], #[]),
# 10
INSTRUCTION ("(PREGRP8)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP9)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP30)", PRINT_0, [ ], #[]),
INSTRUCTION ("(movlpX)", PRINT_0, [ ], #[]),
INSTRUCTION ("(unpcklpX)", PRINT_0, [ ], #[]),
INSTRUCTION ("(unpckhpX)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP31)", PRINT_0, [ ], #[]),
INSTRUCTION ("(movhpX)", PRINT_0, [ ], #[]),
# 18
INSTRUCTION ("(GRP16)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("nop", Q_PRINT, [ e_v ], #[]),
# 20
INSTRUCTION ("(mov)", PRINT_0, [ ], #[]),
INSTRUCTION ("(mov)", PRINT_0, [ ], #[]),
INSTRUCTION ("(mov)", PRINT_0, [ ], #[]),
INSTRUCTION ("(mov)", PRINT_0, [ ], #[]),
INSTRUCTION ("(mov)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(mov)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
# 28
INSTRUCTION ("(movap)", PRINT_0, [ ], #[]),
INSTRUCTION ("(movap)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP2)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP33", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP4)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP3)", PRINT_0, [ ], #[]),
INSTRUCTION ("(ucomis)", PRINT_0, [ ], #[]),
INSTRUCTION ("(comis)", PRINT_0, [ ], #[]),
# 30
INSTRUCTION ("wrmsr", PRINT_0, [ ], #[]),
INSTRUCTION ("rdtsc", PRINT_0, [ ], #[]),
INSTRUCTION ("rdmsr", PRINT_0, [ ], #[]),
INSTRUCTION ("rdpmc", PRINT_0, [ ], #[]),
INSTRUCTION ("sysenter", PRINT_0, [ ], #[]),
INSTRUCTION ("sysexit", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
# 38
INSTRUCTION ("(3-byte 0)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(3-byte 1)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
# 40
INSTRUCTION ("cmovo", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmovno", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmovb", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmovae", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmove", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmovne", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmovbe", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmova", PRINT_0, [ g_v, e_v ], #[]),
# 48
INSTRUCTION ("cmovs", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmovns", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmovp", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmovnp", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmovl", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmovge", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmovle", PRINT_0, [ g_v, e_v ], #[]),
INSTRUCTION ("cmovg", PRINT_0, [ g_v, e_v ], #[]),
# 50
INSTRUCTION ("(movmskp)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP13)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP12)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP11)", PRINT_0, [ ], #[]),
INSTRUCTION ("(andp)", PRINT_0, [ ], #[]),
INSTRUCTION ("(andnp)", PRINT_0, [ ], #[]),
INSTRUCTION ("(orp)", PRINT_0, [ ], #[]),
INSTRUCTION ("(xorp)", PRINT_0, [ ], #[]),
# 58
INSTRUCTION ("(PREGRP0)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP10)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP17)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP16)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP14)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP7)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP5)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP6)", PRINT_0, [ ], #[]),
# 60
INSTRUCTION ("(punpcklbw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(punpcklwd)", PRINT_0, [ ], #[]),
INSTRUCTION ("(punpckldq)", PRINT_0, [ ], #[]),
INSTRUCTION ("(packsswb)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pcmpgtb)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pcmpgtw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pcmpgtd)", PRINT_0, [ ], #[]),
INSTRUCTION ("(packuswb)", PRINT_0, [ ], #[]),
# 68
INSTRUCTION ("(punpckhbw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(punpckhwd)", PRINT_0, [ ], #[]),
INSTRUCTION ("(punpckhdq)", PRINT_0, [ ], #[]),
INSTRUCTION ("(packssdw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP26)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP24)", PRINT_0, [ ], #[]),
INSTRUCTION ("(movd)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP19)", PRINT_0, [ ], #[]),
# 70
INSTRUCTION ("(PREGRP22)", PRINT_0, [ ], #[]),
INSTRUCTION ("(GRP12)", PRINT_0, [ ], #[]),
INSTRUCTION ("(GRP13)", PRINT_0, [ ], #[]),
INSTRUCTION ("(GRP14)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pcmpeqb)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pcmpeqw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pcmpeqd)", PRINT_0, [ ], #[]),
INSTRUCTION ("(emms)", PRINT_0, [ ], #[]),
# 78
INSTRUCTION ("(PREGRP34)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP35)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP28)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP29)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP23)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP20)", PRINT_0, [ ], #[]),
# 80
INSTRUCTION ("jo", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("jno", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("jb", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("jae", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("je", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("jne", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("jbe", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("ja", H_PRINT, [ j_v, conditional_jump ], #[]),
# 88
INSTRUCTION ("js", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("jns", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("jp", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("jnp", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("jl", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("jge", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("jle", H_PRINT, [ j_v, conditional_jump ], #[]),
INSTRUCTION ("jg", H_PRINT, [ j_v, conditional_jump ], #[]),
# 90
INSTRUCTION ("seto", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("setno", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("setb", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("setae", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("sete", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("setne", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("setbe", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("seta", H_PRINT, [ e_b ], #[]),
# 98
INSTRUCTION ("sets", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("setns", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("setp", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("setnp", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("setl", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("setge", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("setle", H_PRINT, [ e_b ], #[]),
INSTRUCTION ("setg", H_PRINT, [ e_b ], #[]),
# a0
INSTRUCTION ("push", T_PRINT, [ fs ], #[]),
INSTRUCTION ("pop", T_PRINT, [ fs ], #[]),
INSTRUCTION ("cpuid", PRINT_0, [ ], #[]),
INSTRUCTION ("bt", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("shld", S_PRINT, [ e_v, g_v, i_b ], #[]),
INSTRUCTION ("shld", S_PRINT, [ e_v, g_v, cl ], #[]),
INSTRUCTION ("(GRPPADLCK2)", PRINT_0, [ ], #[]),
INSTRUCTION ("(GRPPADLCK1)", PRINT_0, [ ], #[]),
# a8
INSTRUCTION ("push", T_PRINT, [ gs ], #[]),
INSTRUCTION ("pop", T_PRINT, [ gs ], #[]),
INSTRUCTION ("rsm", PRINT_0, [ ], #[]),
INSTRUCTION ("bts", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("shrd", S_PRINT, [ e_v, g_v, i_b ], #[]),
INSTRUCTION ("shrd", S_PRINT, [ e_v, g_v, cl ], #[]),
INSTRUCTION ("(GRP15)", PRINT_0, [ ], #[]),
INSTRUCTION ("imul", S_PRINT, [ g_v, e_v ], #[]),
# b0
INSTRUCTION ("cmpxchg", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("cmpxchg", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("lss", S_PRINT, [ g_v, m_p ], #[]),
INSTRUCTION ("btr", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("lfs", S_PRINT, [ g_v, m_p ], #[]),
INSTRUCTION ("lgs", S_PRINT, [ g_v, m_p ], #[]),
INSTRUCTION ("movzb", R_PRINT, [ g_v, e_b ], #[]),
INSTRUCTION ("movzw", R_PRINT, [ g_v, e_w ], #[]),
# b8
INSTRUCTION ("(PREGRP37)", PRINT_0, [ ], #[]),
INSTRUCTION ("ud2b", PRINT_0, [ ], #[]),
INSTRUCTION ("(GRP8)", PRINT_0, [ ], #[]),
INSTRUCTION ("btc", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("bsf", S_PRINT, [ g_v, e_v ], #[]),
INSTRUCTION ("(PREGRP36)", PRINT_0, [ ], #[]),
INSTRUCTION ("movsb", R_PRINT, [ g_v, e_b ], #[]),
INSTRUCTION ("movsw", R_PRINT, [ g_v, e_w ], #[]),
# c0
INSTRUCTION ("xadd", B_PRINT, [ e_b, g_b ], #[]),
INSTRUCTION ("xadd", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("(PREGRP1)", PRINT_0, [ ], #[]),
INSTRUCTION ("movnti", S_PRINT, [ e_v, g_v ], #[]),
INSTRUCTION ("(pinsrw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pextrw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(shufp)", PRINT_0, [ ], #[]),
INSTRUCTION ("(GRP9)", PRINT_0, [ ], #[]),
# c8
INSTRUCTION ("bswap", PRINT_0, [ rm_eax ], #[]),
INSTRUCTION ("bswap", PRINT_0, [ rm_ecx ], #[]),
INSTRUCTION ("bswap", PRINT_0, [ rm_edx ], #[]),
INSTRUCTION ("bswap", PRINT_0, [ rm_ebx ], #[]),
INSTRUCTION ("bswap", PRINT_0, [ rm_esp ], #[]),
INSTRUCTION ("bswap", PRINT_0, [ rm_ebp ], #[]),
INSTRUCTION ("bswap", PRINT_0, [ rm_esi ], #[]),
INSTRUCTION ("bswap", PRINT_0, [ rm_edi ], #[]),
# d0
INSTRUCTION ("(PREGRP27)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psrlw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psrld)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psrlq)", PRINT_0, [ ], #[]),
INSTRUCTION ("(paddq)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pmullq)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP21)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pmovmskb)", PRINT_0, [ ], #[]),
# d8
INSTRUCTION ("(psubusb)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psubusw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pminub)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pand)", PRINT_0, [ ], #[]),
INSTRUCTION ("(paddusb)", PRINT_0, [ ], #[]),
INSTRUCTION ("(paddusw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pmaxub)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pandn)", PRINT_0, [ ], #[]),
# e0
INSTRUCTION ("(pavgb)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psraw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psrad)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pavgw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pmulhuw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pmulhw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP15)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP25)", PRINT_0, [ ], #[]),
# e8
INSTRUCTION ("(psubsb)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psubsw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pminsw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(por)", PRINT_0, [ ], #[]),
INSTRUCTION ("(paddsb)", PRINT_0, [ ], #[]),
INSTRUCTION ("(paddsw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pmaxsw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pxor)", PRINT_0, [ ], #[]),
# f0
INSTRUCTION ("(PREGRP32)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psllw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pslld)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psllq)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pmuludq)", PRINT_0, [ ], #[]),
INSTRUCTION ("(pmaddwd)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psaddbw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(PREGRP18)", PRINT_0, [ ], #[]),
# f0
INSTRUCTION ("(psubb)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psubw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psubd)", PRINT_0, [ ], #[]),
INSTRUCTION ("(psubq)", PRINT_0, [ ], #[]),
INSTRUCTION ("(paddb)", PRINT_0, [ ], #[]),
INSTRUCTION ("(paddw)", PRINT_0, [ ], #[]),
INSTRUCTION ("(paddd)", PRINT_0, [ ], #[]),
INSTRUCTION ("(bad)", PRINT_0, [ ], #[])
];
fun disassemble byte_vector
=
"intel32 disassembly:\n";
};