diff options
| author | iximeow <me@iximeow.net> | 2021-06-28 23:14:51 -0700 | 
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2021-06-28 23:14:51 -0700 | 
| commit | f718fca4dbe146d3abd3aba35751b37e85d64917 (patch) | |
| tree | 15d6720141999e5869be80080633ae552990ae73 /src/protected_mode | |
| parent | 7f0429ad45f748b58658ba41420ca1d0f3784f48 (diff) | |
remove a few operand cases
vex decoding is really intended to avoid explosions in code size more than anything...
Diffstat (limited to 'src/protected_mode')
| -rw-r--r-- | src/protected_mode/vex.rs | 5 | 
1 files changed, 2 insertions, 3 deletions
diff --git a/src/protected_mode/vex.rs b/src/protected_mode/vex.rs index d9802d0..424c6b6 100644 --- a/src/protected_mode/vex.rs +++ b/src/protected_mode/vex.rs @@ -108,7 +108,6 @@ pub(crate) fn three_byte_vex<T: Iterator<Item=u8>>(bytes: &mut T, vex_byte_one:          _ => { unreachable!("p is two bits"); }      };      let m = vex_byte_one & 0b11111; -//    println!("m: {:05b}", m);      let m = match m {          0b00001 => VEXOpcodeMap::Map0F,          0b00010 => VEXOpcodeMap::Map0F38, @@ -141,11 +140,12 @@ pub(crate) fn two_byte_vex<T: Iterator<Item=u8>>(bytes: &mut T, vex_byte: u8, in      };      instruction.vex_reg = RegSpec {          bank: RegisterBank::X, -        num: ((vex_byte >> 3) & 0b0111) ^ 0b0111, +        num: ((vex_byte >> 3) & 0b1111) ^ 0b1111,      };      instruction.prefixes.vex_from_c5(vex_byte);      read_vex_instruction(VEXOpcodeMap::Map0F, bytes, instruction, &mut length, p)?; +    instruction.vex_reg.num &= 0b0111; // ignore bit 4 in 32-bit mode      instruction.length = length;      Ok(())  } @@ -1349,7 +1349,6 @@ fn read_vex_operands<T: Iterator<Item=u8>>(bytes: &mut T, instruction: &mut Inst              }              instruction.operand_count = 4;              Ok(()) -          }      }  | 
