aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2000-12-11 14:01:46 +0000
committerJan Hubicka <jh@suse.cz>2000-12-11 14:01:46 +0000
commitf16b83dfe5679113dbf58b41d4eed6e49ddcd9c6 (patch)
treee79d7c218eebe69e33e6acea5a94c3ec2182b7ba /gas/config/tc-i386.c
parentb8355149f824e4100852565efbe121f01800c664 (diff)
downloadgdb-f16b83dfe5679113dbf58b41d4eed6e49ddcd9c6.zip
gdb-f16b83dfe5679113dbf58b41d4eed6e49ddcd9c6.tar.gz
gdb-f16b83dfe5679113dbf58b41d4eed6e49ddcd9c6.tar.bz2
* tc-i386.c (md_assemble): Refuse 's' and 'l' suffixes in the intel
mode; convert 'd' suffix to 's' or 'l'; remove all DWORD_MNEM_SUFFIX references. (intel_e09_1): Convert QWORD to 'l' suffix for FP operations; refuse otherwise. * tc-i386.h (DWORD_MNEM_SUFFIX): Kill. (No_dSuf): Kill. * i386.h (*_Suf): Remove No_dSuf. (d_suf, wld_Suf,sld_Suf, sldx_Suf, bwld_Suf, d_FP, sld_FP, sldx_FP) Remove. (i386_optab): Remove 'd' in the suffixes.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r--gas/config/tc-i386.c41
1 files changed, 28 insertions, 13 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index eaecabc..2315916 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1182,22 +1182,32 @@ md_assemble (line)
{
case WORD_MNEM_SUFFIX:
case BYTE_MNEM_SUFFIX:
- case SHORT_MNEM_SUFFIX:
- case LONG_MNEM_SUFFIX:
i.suffix = mnem_p[-1];
mnem_p[-1] = '\0';
current_templates = hash_find (op_hash, mnemonic);
break;
+ case SHORT_MNEM_SUFFIX:
+ case LONG_MNEM_SUFFIX:
+ if (!intel_syntax)
+ {
+ i.suffix = mnem_p[-1];
+ mnem_p[-1] = '\0';
+ current_templates = hash_find (op_hash, mnemonic);
+ }
+ break;
/* Intel Syntax. */
- case DWORD_MNEM_SUFFIX:
+ case 'd':
if (intel_syntax)
{
- i.suffix = mnem_p[-1];
+ if (intel_float_operand (mnemonic))
+ i.suffix = SHORT_MNEM_SUFFIX;
+ else
+ i.suffix = LONG_MNEM_SUFFIX;
mnem_p[-1] = '\0';
current_templates = hash_find (op_hash, mnemonic);
- break;
}
+ break;
}
if (!current_templates)
{
@@ -1514,9 +1524,7 @@ md_assemble (line)
? No_sSuf
: (i.suffix == LONG_MNEM_SUFFIX
? No_lSuf
- : (i.suffix == DWORD_MNEM_SUFFIX
- ? No_dSuf
- : (i.suffix == LONG_DOUBLE_MNEM_SUFFIX ? No_xSuf : 0))))));
+ : (i.suffix == LONG_DOUBLE_MNEM_SUFFIX ? No_xSuf : 0)))));
for (t = current_templates->start;
t < current_templates->end;
@@ -1923,8 +1931,7 @@ md_assemble (line)
/* Now select between word & dword operations via the operand
size prefix, except for instructions that will ignore this
prefix anyway. */
- if (((intel_syntax && (i.suffix == DWORD_MNEM_SUFFIX))
- || i.suffix == LONG_MNEM_SUFFIX) == flag_16bit_code
+ if ((i.suffix == LONG_MNEM_SUFFIX) == flag_16bit_code
&& !(i.tm.opcode_modifier & IgnoreSize))
{
unsigned int prefix = DATA_PREFIX_OPCODE;
@@ -1935,8 +1942,7 @@ md_assemble (line)
return;
}
/* Size floating point instruction. */
- if (i.suffix == LONG_MNEM_SUFFIX
- || (intel_syntax && i.suffix == DWORD_MNEM_SUFFIX))
+ if (i.suffix == LONG_MNEM_SUFFIX)
{
if (i.tm.opcode_modifier & FloatMF)
i.tm.base_opcode ^= 4;
@@ -4554,7 +4560,16 @@ intel_e09_1 ()
}
else if (prev_token.code == T_QWORD)
- i.suffix = DWORD_MNEM_SUFFIX;
+ {
+ if (intel_parser.got_a_float == 1) /* "f..." */
+ i.suffix = LONG_MNEM_SUFFIX;
+ else
+ {
+ as_bad (_("operand modifier `%s' supported only for i387 operations\n"),
+ prev_token.str);
+ return 0;
+ }
+ }
else if (prev_token.code == T_XWORD)
i.suffix = LONG_DOUBLE_MNEM_SUFFIX;