diff options
author | Alan Modra <amodra@gmail.com> | 2006-04-07 06:40:57 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2006-04-07 06:40:57 +0000 |
commit | 45aa61fe2eaaa8c5ce5a56f159a9d70ea282616b (patch) | |
tree | c962d0db720f145d96f66927dbd725d4f314db62 /gas | |
parent | 35520cb7088b85e939a2c72b4aab8ee6c9f872ca (diff) | |
download | fsf-binutils-gdb-45aa61fe2eaaa8c5ce5a56f159a9d70ea282616b.zip fsf-binutils-gdb-45aa61fe2eaaa8c5ce5a56f159a9d70ea282616b.tar.gz fsf-binutils-gdb-45aa61fe2eaaa8c5ce5a56f159a9d70ea282616b.tar.bz2 |
PR 2512.
* config/tc-i386.c (match_template): Move 64-bit operand tests
inside loop.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 27 |
2 files changed, 20 insertions, 13 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index f3a22a3..aab0c09 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2006-04-07 Alan Modra <amodra@bigpond.net.au> + + PR 2512. + * config/tc-i386.c (match_template): Move 64-bit operand tests + inside loop. + 2006-04-06 Carlos O'Donell <carlos@codesourcery.com> * po/Make-in: Add install-html target. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index fe222da..be384bc 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2263,19 +2263,7 @@ match_template () : (i.suffix == LONG_DOUBLE_MNEM_SUFFIX ? No_xSuf : 0)))))); - t = current_templates->start; - if (i.suffix == QWORD_MNEM_SUFFIX - && flag_code != CODE_64BIT - && (intel_syntax - ? !(t->opcode_modifier & IgnoreSize) - && !intel_float_operand (t->name) - : intel_float_operand (t->name) != 2) - && (!(t->operand_types[0] & (RegMMX | RegXMM)) - || !(t->operand_types[t->operands > 1] & (RegMMX | RegXMM))) - && (t->base_opcode != 0x0fc7 - || t->extension_opcode != 1 /* cmpxchg8b */)) - t = current_templates->end; - for (; t < current_templates->end; t++) + for (t = current_templates->start; t < current_templates->end; t++) { /* Must have right number of operands. */ if (i.operands != t->operands) @@ -2287,6 +2275,19 @@ match_template () && (t->opcode_modifier & IgnoreSize))) continue; + /* In general, don't allow 64-bit operands in 32-bit mode. */ + if (i.suffix == QWORD_MNEM_SUFFIX + && flag_code != CODE_64BIT + && (intel_syntax + ? (!(t->opcode_modifier & IgnoreSize) + && !intel_float_operand (t->name)) + : intel_float_operand (t->name) != 2) + && (!(t->operand_types[0] & (RegMMX | RegXMM)) + || !(t->operand_types[t->operands > 1] & (RegMMX | RegXMM))) + && (t->base_opcode != 0x0fc7 + || t->extension_opcode != 1 /* cmpxchg8b */)) + continue; + /* Do not verify operands when there are none. */ else if (!t->operands) { |