summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/gas/config/tc-i386.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/gas/config/tc-i386.c')
-rw-r--r--contrib/binutils/gas/config/tc-i386.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c
index c235413..bbd4fc4 100644
--- a/contrib/binutils/gas/config/tc-i386.c
+++ b/contrib/binutils/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;
}
OpenPOWER on IntegriCloud