+2001-03-19 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c (md_assemble <REGISTER_WARNINGS>): Correct
+ used register name.
+
2001-03-18 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* config/tc-m68hc11.c (md_pseudo_table): Recognize xrefb to comply
if (!quiet_warnings
&& (i.tm.operand_types[op] & InOutPortReg) == 0)
as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"),
- (i.op[op].regs - (i.types[op] & Reg16 ? 8 : 16))->reg_name,
+ (i.op[op].regs
+ + (i.types[op] & Reg16
+ ? REGNAM_AL - REGNAM_AX
+ : REGNAM_AL - REGNAM_EAX))->reg_name,
i.op[op].regs->reg_name,
i.suffix);
#endif
#if REGISTER_WARNINGS
else
as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"),
- (i.op[op].regs + 8)->reg_name,
+ (i.op[op].regs + REGNAM_EAX - REGNAM_AX)->reg_name,
i.op[op].regs->reg_name,
i.suffix);
#endif
else
#if REGISTER_WARNINGS
as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"),
- (i.op[op].regs - 8)->reg_name,
+ (i.op[op].regs + REGNAM_AX - REGNAM_EAX)->reg_name,
i.op[op].regs->reg_name,
i.suffix);
#endif
+2001-03-19 Alan Modra <alan@linuxcare.com.au>
+
+ * i386.h (REGNAM_AL, REGNAM_AX, REGNAM_EAX): Define.
+
2001-02-28 Igor Shevlyakov <igor@windriver.com>
* m68k.h: new defines for Coldfire V4. Update mcf to know
/* make %st first as we test for it */
{"st", FloatReg|FloatAcc, 0, 0},
/* 8 bit regs */
+#define REGNAM_AL 1 /* Entry in i386_regtab. */
{"al", Reg8|Acc, 0, 0},
{"cl", Reg8|ShiftCount, 0, 1},
{"dl", Reg8, 0, 2},
{"r14b", Reg8, RegRex64|RegRex, 6},
{"r15b", Reg8, RegRex64|RegRex, 7},
/* 16 bit regs */
+#define REGNAM_AX 25
{"ax", Reg16|Acc, 0, 0},
{"cx", Reg16, 0, 1},
{"dx", Reg16|InOutPortReg, 0, 2},
{"r14w", Reg16, RegRex, 6},
{"r15w", Reg16, RegRex, 7},
/* 32 bit regs */
+#define REGNAM_EAX 41
{"eax", Reg32|BaseIndex|Acc, 0, 0}, /* Must be in ax + 16 slot */
{"ecx", Reg32|BaseIndex, 0, 1},
{"edx", Reg32|BaseIndex, 0, 2},