diff options
author | Jan Beulich <jbeulich@novell.com> | 2005-07-18 06:13:00 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2005-07-18 06:13:00 +0000 |
commit | 57de1fadd1347e1ef67b170b99e8bedfe0accfbb (patch) | |
tree | 85f15a524ac75c5f38c971da2a1311b2bd1f115b | |
parent | 1f5dba3bd26007a5ab50362703018da8b3e1515f (diff) | |
download | binutils-redhat-57de1fadd1347e1ef67b170b99e8bedfe0accfbb.tar.gz |
gas/
2005-07-18 Jan Beulich <jbeulich@novell.com>
* config/tc-i386.c (parse_insn): Reject prefix if unavailable in
current mode.
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 87e89ff31c..fb902be67b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-07-18 Jan Beulich <jbeulich@novell.com> + + * config/tc-i386.c (parse_insn): Reject prefix if unavailable in + current mode. + 2005-07-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> * config/tc-hppa.c (pa_ip): Search entire mnemonic before considering diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index f5c42dfcc3..3917b84866 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1644,6 +1644,15 @@ parse_insn (line, mnemonic) && current_templates && (current_templates->start->opcode_modifier & IsPrefix)) { + if (current_templates->start->cpu_flags + & (flag_code != CODE_64BIT ? Cpu64 : CpuNo64)) + { + as_bad ((flag_code != CODE_64BIT + ? _("`%s' is only supported in 64-bit mode") + : _("`%s' is not supported in 64-bit mode")), + current_templates->start->name); + return NULL; + } /* If we are in 16-bit mode, do not allow addr16 or data16. Similarly, in 32-bit mode, do not allow addr32 or data32. */ if ((current_templates->start->opcode_modifier & (Size16 | Size32)) |