From: Alan Modra Date: Thu, 4 Oct 2001 18:06:41 +0000 (+0000) Subject: * config/tc-i386.c (parse_register): If not producing code for X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8acef892ea9f5f4786439b45f407c64426db7844;p=thirdparty%2Fbinutils-gdb.git * config/tc-i386.c (parse_register): If not producing code for x86_64, reject x86_64 register name matches. (md_assemble): Remove now redundant check for x86_64 regs. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index c400c24ce75..1079c792e24 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2001-10-05 Alan Modra + + * config/tc-i386.c (parse_register): If not producing code for + x86_64, reject x86_64 register name matches. + (md_assemble): Remove now redundant check for x86_64 regs. + 2001-09-30 Stephane Carrez * config/tc-m68hc11.c (cmp_opcode): Define prototype. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index c23541382b4..bbd4fc49a34 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1903,19 +1903,6 @@ md_assemble (line) } } - if (i.reg_operands && flag_code < CODE_64BIT) - { - int op; - for (op = i.operands; --op >= 0;) - if ((i.types[op] & Reg) - && (i.op[op].regs->reg_flags & (RegRex64|RegRex))) - { - as_bad (_("Extended register `%%%s' available only in 64bit mode."), - i.op[op].regs->reg_name); - return; - } - } - /* If matched instruction specifies an explicit instruction mnemonic suffix, use it. */ if (i.tm.opcode_modifier & (Size16 | Size32 | Size64)) @@ -4481,6 +4468,13 @@ parse_register (reg_string, end_op) } } + if (r != NULL + && r->reg_flags & (RegRex64|RegRex) + && flag_code != CODE_64BIT) + { + return (const reg_entry *) NULL; + } + return r; }