Skip to content

Commit

Permalink
fix(archops-x86): Set REX.W for Quad registers in OpRegGeneral
Browse files Browse the repository at this point in the history
  • Loading branch information
chorman0773 committed Aug 1, 2023
1 parent 009e025 commit ea2c7a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch-ops/src/x86/insn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,10 @@ impl<W: InsnWrite> X86Encoder<W> {
| (X86RegisterClass::Double, X86Mode::Real | X86Mode::Virtual8086) => {
Some(0x66)
}
(X86RegisterClass::Quad, X86Mode::Long) => None,
(X86RegisterClass::Quad, X86Mode::Long) => {
*rex.get_or_insert(0x40) |= 0x8;
None
}
(class, mode) => {
panic!("Unsupported register class {:?} in mode {:?}", class, mode)
}
Expand Down

0 comments on commit ea2c7a1

Please sign in to comment.