aboutsummaryrefslogtreecommitdiff
path: root/src/shared/evex.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/evex.in')
-rw-r--r--src/shared/evex.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/evex.in b/src/shared/evex.in
index 58ec14a..a43a97e 100644
--- a/src/shared/evex.in
+++ b/src/shared/evex.in
@@ -2872,6 +2872,8 @@ pub(crate) fn read_evex_operands<
if mem_oper == OperandSpec::RegMMM {
instruction.mem_size = 0;
instruction.regs[1].bank = RegisterBank::K;
+ // only 8 mask registers, `xed` suggests that any invalid bits are masked out???
+ instruction.regs[1].num &= 0b111;
} else {
return Err(DecodeError::InvalidOperand);
}
@@ -2897,6 +2899,8 @@ pub(crate) fn read_evex_operands<
if mem_oper == OperandSpec::RegMMM {
instruction.mem_size = 0;
instruction.regs[1].bank = RegisterBank::K;
+ // only 8 mask registers, `xed` suggests that any invalid bits are masked out???
+ instruction.regs[1].num &= 0b111;
} else {
return Err(DecodeError::InvalidOperand);
}