diff options
author | iximeow <me@iximeow.net> | 2023-12-16 15:24:26 -0800 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2023-12-16 15:24:26 -0800 |
commit | 2db223a16d1559c152170fe2a602c827a5a95fb3 (patch) | |
tree | 140e01f696a180b874c0705cb8c60a236ba9458c /src/shared/evex.in | |
parent | d7d84b3be6c929ee9d1b425a82b7121936a7cd34 (diff) |
fix incorrect register selection for `vpbroadcastm{b2q,w2d}` with `rex.b` set
Diffstat (limited to 'src/shared/evex.in')
-rw-r--r-- | src/shared/evex.in | 4 |
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); } |