aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-07-21 18:18:04 +0000
committerNick Clifton <nickc@redhat.com>2004-07-21 18:18:04 +0000
commit543613e9336603e177592f09ec42df2f99a2ed37 (patch)
tree1365ecdef2e5794bde271c8524e3e45bd15d3039 /gas/config
parenta35b6b049e653973939a56ad0ba656dffad60a0e (diff)
downloadgdb-543613e9336603e177592f09ec42df2f99a2ed37.zip
gdb-543613e9336603e177592f09ec42df2f99a2ed37.tar.gz
gdb-543613e9336603e177592f09ec42df2f99a2ed37.tar.bz2
For DefaultSize instructions, don't guess a 'q' suffix if the instruction
doesn't support it.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index e73aa95..db2ec7e 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2194,7 +2194,7 @@ check_string ()
}
static int
-process_suffix ()
+process_suffix (void)
{
/* If matched instruction specifies an explicit instruction mnemonic
suffix, use it. */
@@ -2217,6 +2217,7 @@ process_suffix ()
Destination register type is more significant than source
register type. */
int op;
+
for (op = i.operands; --op >= 0;)
if ((i.types[op] & Reg)
&& !(i.tm.operand_types[op] & InOutPortReg))
@@ -2257,11 +2258,13 @@ process_suffix ()
else if ((i.tm.opcode_modifier & DefaultSize) && !i.suffix)
{
i.suffix = stackop_size;
+ if (i.suffix == QWORD_MNEM_SUFFIX
+ && (i.tm.opcode_modifier & No_qSuf))
+ i.suffix = LONG_MNEM_SUFFIX;
}
/* Change the opcode based on the operand size given by i.suffix;
We need not change things for byte insns. */
-
if (!i.suffix && (i.tm.opcode_modifier & W))
{
as_bad (_("no instruction mnemonic suffix given and no register operands; can't size instruction"));
@@ -2289,6 +2292,7 @@ process_suffix ()
&& (i.tm.opcode_modifier & JumpByte))))
{
unsigned int prefix = DATA_PREFIX_OPCODE;
+
if (i.tm.opcode_modifier & JumpByte) /* jcxz, loop */
prefix = ADDR_PREFIX_OPCODE;
@@ -2304,19 +2308,18 @@ process_suffix ()
/* Size floating point instruction. */
if (i.suffix == LONG_MNEM_SUFFIX)
- {
- if (i.tm.opcode_modifier & FloatMF)
- i.tm.base_opcode ^= 4;
- }
+ if (i.tm.opcode_modifier & FloatMF)
+ i.tm.base_opcode ^= 4;
}
return 1;
}
static int
-check_byte_reg ()
+check_byte_reg (void)
{
int op;
+
for (op = i.operands; --op >= 0;)
{
/* If this is an eight bit register, it's OK. If it's the 16 or