From 53a6a79595e100b16b85d75676bcfee56cbd40f0 Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 15 Jan 2020 01:49:42 -0800 Subject: add 660f6* series instructions as well as 660f70 this adds in some missing sse2 instructions in the alternate secondary opcode map. because these were missing, instructions were incorrectly decoded from the 0f opcode map, yielding mmx-operand versions of themselves (usually) there are undoubtedly more missing sse2 instructions from the 660f map. --- src/display.rs | 8 ++++++++ src/lib.rs | 50 +++++++++++++++++++++++++++++++++----------------- 2 files changed, 41 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/display.rs b/src/display.rs index 4c97d5c..f3400f6 100644 --- a/src/display.rs +++ b/src/display.rs @@ -278,6 +278,7 @@ impl fmt::Display for Opcode { match self { &Opcode::POPCNT => write!(f, "popcnt"), &Opcode::MOVDQU => write!(f, "movdqu"), + &Opcode::MOVDQA => write!(f, "movdqa"), &Opcode::MOVQ => write!(f, "movq"), &Opcode::CMPSS => write!(f, "cmpss"), &Opcode::CMPSD => write!(f, "cmpsd"), @@ -564,6 +565,7 @@ impl fmt::Display for Opcode { &Opcode::POR => write!(f, "por"), &Opcode::PSADBW => write!(f, "psadbw"), &Opcode::PSHUFW => write!(f, "pshufw"), + &Opcode::PSHUFD => write!(f, "pshufd"), &Opcode::PSLLD => write!(f, "pslld"), &Opcode::PSLLQ => write!(f, "psllq"), &Opcode::PSLLW => write!(f, "psllw"), @@ -586,6 +588,8 @@ impl fmt::Display for Opcode { &Opcode::PUNPCKLBW => write!(f, "punpcklbw"), &Opcode::PUNPCKLDQ => write!(f, "punpckldq"), &Opcode::PUNPCKLWD => write!(f, "punpcklwd"), + &Opcode::PUNPCKLQDQ => write!(f, "punpcklqdq"), + &Opcode::PUNPCKHQDQ => write!(f, "punpckhqdq"), &Opcode::PXOR => write!(f, "pxor"), &Opcode::RCPPS => write!(f, "rcpps"), &Opcode::RSM => write!(f, "rsm"), @@ -1306,6 +1310,7 @@ impl > Colorize> Colorize> Colorize>(decoder: &InstDecoder, mut bytes_iter: T, } } }, + OperandCode::G_E_xmm_Ib => { + let modrm = read_modrm(&mut bytes_iter, length)?; + + instruction.operands[1] = read_E_xmm(&mut bytes_iter, instruction, modrm, length)?; + instruction.modrm_rrr = RegSpec { bank: RegisterBank::X, num: (modrm >> 3) & 7 }; + instruction.operands[0] = OperandSpec::RegRRR; + instruction.imm = + read_num(&mut bytes_iter, 1)? as u8 as u64; + *length += 1; + instruction.operands[2] = OperandSpec::ImmI8; + instruction.operand_count = 3; + }, OperandCode::G_E_mm_Ib => { let modrm = read_modrm(&mut bytes_iter, length)?; -- cgit v1.1