aboutsummaryrefslogtreecommitdiff
path: root/gas
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
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')
-rw-r--r--gas/ChangeLog15
-rw-r--r--gas/config/tc-i386.c41
-rw-r--r--gas/config/tc-i386.h17
3 files changed, 50 insertions, 23 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 519e710..84dd698 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,18 @@
+Mon Dec 11 14:35:42 MET 2000 Jan hubicka <jh@suse.cz>
+
+ * 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.
+
2000-12-06 Mark Elbrecht <snowball3@bigfoot.com>
* config/tc-i386.c (T_SHORT): Undefine before defining.
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;
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index 1c62e70..5d48102 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -231,8 +231,6 @@ extern const char extra_symbol_chars[];
#define LONG_MNEM_SUFFIX 'l'
/* Intel Syntax */
#define LONG_DOUBLE_MNEM_SUFFIX 'x'
-/* Intel Syntax */
-#define DWORD_MNEM_SUFFIX 'd'
/* modrm.mode = REGMEM_FIELD_HAS_REG when a register is in there */
#define REGMEM_FIELD_HAS_REG 0x3/* always = 0x3 */
@@ -313,14 +311,13 @@ typedef struct
#define No_wSuf 0x40000 /* w suffix on instruction illegal */
#define No_lSuf 0x80000 /* l suffix on instruction illegal */
#define No_sSuf 0x100000 /* s suffix on instruction illegal */
-#define No_dSuf 0x200000 /* d suffix on instruction illegal */
-#define No_xSuf 0x400000 /* x suffix on instruction illegal */
-#define FWait 0x800000 /* instruction needs FWAIT */
-#define IsString 0x1000000 /* quick test for string instructions */
-#define regKludge 0x2000000 /* fake an extra reg operand for clr, imul */
-#define IsPrefix 0x4000000 /* opcode is a prefix */
-#define ImmExt 0x8000000 /* instruction has extension in 8 bit imm */
-#define Ugh 0x80000000 /* deprecated fp insn, gets a warning */
+#define No_xSuf 0x200000 /* x suffix on instruction illegal */
+#define FWait 0x400000 /* instruction needs FWAIT */
+#define IsString 0x800000 /* quick test for string instructions */
+#define regKludge 0x1000000 /* fake an extra reg operand for clr, imul */
+#define IsPrefix 0x2000000 /* opcode is a prefix */
+#define ImmExt 0x4000000 /* instruction has extension in 8 bit imm */
+#define Ugh 0x8000000 /* deprecated fp insn, gets a warning */
/* operand_types[i] describes the type of operand i. This is made
by OR'ing together all of the possible type masks. (e.g.