aboutsummaryrefslogtreecommitdiff
path: root/src/shared/evex.in
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2023-12-16 15:05:08 -0800
committeriximeow <me@iximeow.net>2023-12-16 15:05:08 -0800
commitd7d84b3be6c929ee9d1b425a82b7121936a7cd34 (patch)
tree83dffdbf52d2ee3b19eba1cef44ea1f06bb86360 /src/shared/evex.in
parent2d303b6121e318e30572dd1134ddb0cf12bd0776 (diff)
fix incorrect register selection for `vpmov*2m` with `rex.r` set
Diffstat (limited to 'src/shared/evex.in')
-rw-r--r--src/shared/evex.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/evex.in b/src/shared/evex.in
index 837b867..58ec14a 100644
--- a/src/shared/evex.in
+++ b/src/shared/evex.in
@@ -2810,6 +2810,9 @@ pub(crate) fn read_evex_operands<
if mem_oper == OperandSpec::RegMMM {
instruction.mem_size = 0;
instruction.regs[0].bank = RegisterBank::K;
+ if instruction.regs[0].num > 7 {
+ return Err(DecodeError::InvalidOperand);
+ }
} else {
return Err(DecodeError::InvalidOperand);
}