summaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-10-04 18:01:46 +0000
committerAlan Modra <amodra@gmail.com>2001-10-04 18:01:46 +0000
commit1ae008798a8be59993e58f3ac0d5a0852cf2ca77 (patch)
tree8c9a7a79d2bac181aaeeb8996003c3878e45c27f /gas/config/tc-i386.c
parent8ea52284ab03f528b75c1eed839632e1f57ffc7b (diff)
downloadbinutils-gdb-1ae008798a8be59993e58f3ac0d5a0852cf2ca77.tar.gz
* 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.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r--gas/config/tc-i386.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 749d7c47de7..105bc8eae7c 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1935,19 +1935,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))
@@ -4531,6 +4518,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;
}