[PATCH] x86: adjust which Dwarf2 register numbers to use
Jan Beulich
jbeulich@suse.com
Fri Feb 9 08:11:19 GMT 2024
Consumers can't know which execution mode is in effect for a certain
piece of code; they can only go from object file properties. Hence which
register numbers to encode ought to depend solely on object file type.
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -5409,7 +5409,7 @@ ginsn_dw2_regnum (const reg_entry *ireg)
if (ireg->reg_num == RegIP || ireg->reg_num == RegIZ)
return GINSN_DW2_REGNUM_RSI_DUMMY;
- dwarf_reg = ireg->dw2_regnum[flag_code >> 1];
+ dwarf_reg = ireg->dw2_regnum[object_64bit];
if (dwarf_reg == Dw2Inval)
{
@@ -17461,7 +17461,7 @@ tc_x86_parse_to_dw2regnum (expressionS *
if ((addressT) exp->X_add_number < i386_regtab_size)
{
exp->X_add_number = i386_regtab[exp->X_add_number]
- .dw2_regnum[flag_code >> 1];
+ .dw2_regnum[object_64bit];
if (exp->X_add_number != Dw2Inval)
exp->X_op = O_constant;
}
More information about the Binutils
mailing list