aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/long_mode/mod.rs')
-rw-r--r--src/long_mode/mod.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs
index f9be9ab..909157b 100644
--- a/src/long_mode/mod.rs
+++ b/src/long_mode/mod.rs
@@ -6079,6 +6079,20 @@ fn read_operands<T: Iterator<Item=u8>>(decoder: &InstDecoder, mut bytes_iter: T,
}
1 => {
// Zv_AX
+ let opwidth = imm_width_from_prefixes_64(SizeCode::vqp, instruction.prefixes);
+ let bank = if opwidth == 4 {
+ RegisterBank::D
+ } else if opwidth == 2 {
+ RegisterBank::W
+ } else {
+ RegisterBank::Q
+ };
+ instruction.modrm_rrr =
+ RegSpec::from_parts(0, instruction.prefixes.rex().b(), bank);
+ instruction.operands[1] = OperandSpec::RegMMM;
+ instruction.modrm_mmm =
+ RegSpec::from_parts(reg, instruction.prefixes.rex().b(), bank);
+ instruction.operand_count = 2;
}
2 => {
// these are Zb_Ib_R