[binutils-gdb] x86/APX: fix disassembly of byte register operands

Jan Beulich jbeulich@sourceware.org
Fri Jun 21 06:36:30 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=87860ef6f4650d513530af4cb4e3e85a863139cf

commit 87860ef6f4650d513530af4cb4e3e85a863139cf
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Jun 21 08:36:03 2024 +0200

    x86/APX: fix disassembly of byte register operands
    
    Like for REX/REX2, EVEX-prefixed insns access the low bytes of all
    registers; %ah...%bh are inaccessible. Reflect this correctly in output,
    by leveraging REX machinery we already have to this effect.

Diff:
---
 opcodes/i386-dis.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 3a1afcc2fce..9c5063eb4cc 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -9004,6 +9004,7 @@ get_valid_dis386 (const struct dis386 *dp, instr_info *ins)
 	  ins->evex_type = evex_from_legacy;
 	  if (ins->address_mode != mode_64bit)
 	    return &bad_opcode;
+	  ins->rex |= REX_OPCODE;
 	  break;
 	case 0x5:
 	  vex_table_index = EVEX_MAP5;


More information about the Binutils-cvs mailing list