aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-07-18 06:13:00 +0000
committerJan Beulich <jbeulich@novell.com>2005-07-18 06:13:00 +0000
commit2dd88dcacfb76d8d119e952beb4fda883fd4afa4 (patch)
tree644eed6a10a252eb9650dff17ddd8061f3869ba3 /gas/config
parent9a145ce60d6aaee89ae305e4f952c72ec54da4d1 (diff)
downloadgdb-2dd88dcacfb76d8d119e952beb4fda883fd4afa4.zip
gdb-2dd88dcacfb76d8d119e952beb4fda883fd4afa4.tar.gz
gdb-2dd88dcacfb76d8d119e952beb4fda883fd4afa4.tar.bz2
gas/
2005-07-18 Jan Beulich <jbeulich@novell.com> * config/tc-i386.c (parse_insn): Reject prefix if unavailable in current mode.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index f5c42df..3917b84 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))