aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-03-19 11:28:20 +0000
committerAlan Modra <amodra@gmail.com>2001-03-19 11:28:20 +0000
commit2e98d2de04d92a7486ea1007f82c93510aed16b1 (patch)
treeaef9ee50dad5490c8658be525b09239606d847cd /gas
parentd394a3392ef4043d5d74ae5618e9c866fa1b185b (diff)
downloadgdb-2e98d2de04d92a7486ea1007f82c93510aed16b1.zip
gdb-2e98d2de04d92a7486ea1007f82c93510aed16b1.tar.gz
gdb-2e98d2de04d92a7486ea1007f82c93510aed16b1.tar.bz2
Fix register name printed in warning message.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-i386.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 3f41a18..054e911 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+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
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 74e5e13..585aa8d 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1996,7 +1996,10 @@ md_assemble (line)
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
@@ -2046,7 +2049,7 @@ md_assemble (line)
#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
@@ -2117,7 +2120,7 @@ md_assemble (line)
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