fix: correctly parse word instead of byte for GPR

This commit is contained in:
2025-05-13 12:35:38 +09:00
parent 47a002cd79
commit 27b39ee94a
2 changed files with 7 additions and 3 deletions

View File

@@ -204,6 +204,8 @@ impl Disassembler {
}
/// Match the modrm reg bits to the GPR1 mnemonics.
/// GPR always has an imm value as second operand, but is available in both
/// Byte and Word length.
pub fn modrm_reg_to_mnemonic(reg: u8, target: ModRmTarget, imm: OperandWidth) -> Mnemonic {
match imm {
OperandWidth::Byte(b) => match reg {