aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2018-04-26 08:45:35 +0200
committerJan Beulich <jbeulich@suse.com>2018-04-26 08:45:35 +0200
commit0e0eea782025d92f894f6d132aae2507c6a90a7b (patch)
tree5f39ceb89a86e72bcaf7f14070e8749f9f119b13 /gas/config/tc-i386.c
parentbed3d976b7a4fd111f3e291f1bd896cf441b3479 (diff)
downloadgdb-0e0eea782025d92f894f6d132aae2507c6a90a7b.zip
gdb-0e0eea782025d92f894f6d132aae2507c6a90a7b.tar.gz
gdb-0e0eea782025d92f894f6d132aae2507c6a90a7b.tar.bz2
x86: x87-related adjustments
Neither 287 wrt 8087 nor 387 wrt 287 are proper supersets - in each case some insns get removed from the ISA (they become NOPs, but code intended for newer co-processors should not use them). Furthermore with .no87, ST should not be recognized as a register name.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r--gas/config/tc-i386.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 42186ff..fcd40e2 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -10109,6 +10109,11 @@ parse_real_register (char *reg_string, char **end_op)
/* Handle floating point regs, allowing spaces in the (i) part. */
if (r == i386_regtab /* %st is first entry of table */)
{
+ if (!cpu_arch_flags.bitfield.cpu8087
+ && !cpu_arch_flags.bitfield.cpu287
+ && !cpu_arch_flags.bitfield.cpu387)
+ return (const reg_entry *) NULL;
+
if (is_space_char (*s))
++s;
if (*s == '(')
@@ -10149,12 +10154,6 @@ parse_real_register (char *reg_string, char **end_op)
&& !cpu_arch_flags.bitfield.cpui386)
return (const reg_entry *) NULL;
- if (r->reg_type.bitfield.tbyte
- && !cpu_arch_flags.bitfield.cpu8087
- && !cpu_arch_flags.bitfield.cpu287
- && !cpu_arch_flags.bitfield.cpu387)
- return (const reg_entry *) NULL;
-
if (r->reg_type.bitfield.regmmx && !cpu_arch_flags.bitfield.cpuregmmx)
return (const reg_entry *) NULL;