From 6232e8b1daf7067cb2e8065687530d5f88ecb46d Mon Sep 17 00:00:00 2001 From: iximeow Date: Fri, 15 Jan 2021 18:40:31 -0800 Subject: support xchg AX/reg --- src/protected_mode/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/protected_mode') diff --git a/src/protected_mode/mod.rs b/src/protected_mode/mod.rs index 9327f64..6394de0 100644 --- a/src/protected_mode/mod.rs +++ b/src/protected_mode/mod.rs @@ -5933,6 +5933,17 @@ fn read_operands>(decoder: &InstDecoder, mut bytes_iter: T, } 1 => { // Zv_AX + let bank = if !instruction.prefixes.operand_size() { + RegisterBank::D + } else { + RegisterBank::W + }; + instruction.modrm_rrr = + RegSpec::from_parts(0, bank); + instruction.operands[1] = OperandSpec::RegMMM; + instruction.modrm_mmm = + RegSpec::from_parts(reg, bank); + instruction.operand_count = 2; } 2 => { // these are Zb_Ib_R -- cgit v1.1