aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-01-15 12:06:03 +0000
committerAlan Modra <amodra@gmail.com>2000-01-15 12:06:03 +0000
commitadd0c677654a372f4d8e476554e01c8b85f6879d (patch)
treec856184f20457766f7d71f9de109295836c1d4ce /gas/config
parenta8de59980ce49347af4938053a4fad69ba3270ad (diff)
downloadgdb-add0c677654a372f4d8e476554e01c8b85f6879d.zip
gdb-add0c677654a372f4d8e476554e01c8b85f6879d.tar.gz
gdb-add0c677654a372f4d8e476554e01c8b85f6879d.tar.bz2
Cosmetic changes to tc-i386.[ch] + extend x86 gas testsuite jmp and
call tests + tweak intel mode far call and jmp.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c27
-rw-r--r--gas/config/tc-i386.h3
2 files changed, 13 insertions, 17 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 2aba752..943aea8 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -232,7 +232,8 @@ static int allow_naked_reg = 0; /* 1 if register prefix % not required */
static char stackop_size = '\0'; /* Used in 16 bit gcc mode to add an l
suffix to call, ret, enter, leave, push,
- and pop instructions. */
+ and pop instructions so that gcc has the
+ same stack frame as in 32 bit mode. */
/* Interface to relax_segment.
There are 2 relax states for 386 jump insns: one for conditional &
@@ -1093,20 +1094,17 @@ md_assemble (line)
/* See if we can get a match by trimming off a suffix. */
switch (mnem_p[-1])
{
- case DWORD_MNEM_SUFFIX:
case WORD_MNEM_SUFFIX:
case BYTE_MNEM_SUFFIX:
case SHORT_MNEM_SUFFIX:
-#if LONG_MNEM_SUFFIX != DWORD_MNEM_SUFFIX
case LONG_MNEM_SUFFIX:
-#endif
i.suffix = mnem_p[-1];
mnem_p[-1] = '\0';
current_templates = hash_find (op_hash, mnemonic);
break;
/* Intel Syntax */
- case INTEL_DWORD_MNEM_SUFFIX:
+ case DWORD_MNEM_SUFFIX:
if (intel_syntax)
{
i.suffix = mnem_p[-1];
@@ -1359,7 +1357,7 @@ md_assemble (line)
? No_sSuf
: (i.suffix == LONG_MNEM_SUFFIX
? No_lSuf
- : (i.suffix == INTEL_DWORD_MNEM_SUFFIX
+ : (i.suffix == DWORD_MNEM_SUFFIX
? No_dSuf
: (i.suffix == LONG_DOUBLE_MNEM_SUFFIX ? No_xSuf : 0))))));
@@ -1518,7 +1516,7 @@ md_assemble (line)
if (i.tm.opcode_modifier & Size16)
i.suffix = WORD_MNEM_SUFFIX;
else
- i.suffix = DWORD_MNEM_SUFFIX;
+ i.suffix = LONG_MNEM_SUFFIX;
}
else if (i.reg_operands)
{
@@ -1535,7 +1533,7 @@ md_assemble (line)
{
i.suffix = ((i.types[op] & Reg8) ? BYTE_MNEM_SUFFIX :
(i.types[op] & Reg16) ? WORD_MNEM_SUFFIX :
- DWORD_MNEM_SUFFIX);
+ LONG_MNEM_SUFFIX);
break;
}
}
@@ -1590,7 +1588,7 @@ md_assemble (line)
}
}
}
- else if (i.suffix == DWORD_MNEM_SUFFIX)
+ else if (i.suffix == LONG_MNEM_SUFFIX)
{
int op;
for (op = i.operands; --op >= 0; )
@@ -1744,8 +1742,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 == INTEL_DWORD_MNEM_SUFFIX))
- || i.suffix == DWORD_MNEM_SUFFIX
+ if (((intel_syntax && (i.suffix == DWORD_MNEM_SUFFIX))
|| i.suffix == LONG_MNEM_SUFFIX) == flag_16bit_code
&& !(i.tm.opcode_modifier & IgnoreSize))
{
@@ -1758,7 +1755,7 @@ md_assemble (line)
}
/* Size floating point instruction. */
if (i.suffix == LONG_MNEM_SUFFIX
- || (intel_syntax && i.suffix == INTEL_DWORD_MNEM_SUFFIX))
+ || (intel_syntax && i.suffix == DWORD_MNEM_SUFFIX))
{
if (i.tm.opcode_modifier & FloatMF)
i.tm.base_opcode ^= 4;
@@ -2578,7 +2575,7 @@ i386_immediate (imm_start)
i.types[this_operand] |=
(bigimm | smallest_imm_type ((long) exp->X_add_number));
- /* If a suffix is given, this operand may be shortended. */
+ /* If a suffix is given, this operand may be shortened. */
switch (i.suffix)
{
case WORD_MNEM_SUFFIX:
@@ -2863,14 +2860,14 @@ i386_operand_modifier (op_string, got_a_float)
if (got_a_float)
i.suffix = SHORT_MNEM_SUFFIX;
else
- i.suffix = DWORD_MNEM_SUFFIX;
+ i.suffix = LONG_MNEM_SUFFIX;
*op_string += 9;
return DWORD_PTR;
}
else if (!strncasecmp (*op_string, "QWORD PTR", 9))
{
- i.suffix = INTEL_DWORD_MNEM_SUFFIX;
+ i.suffix = DWORD_MNEM_SUFFIX;
*op_string += 9;
return QWORD_PTR;
}
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index 641ace9..f84b2f2 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -216,7 +216,6 @@ extern const char extra_symbol_chars[];
#define NO_BASE_REGISTER_16 6
/* these are the instruction mnemonic suffixes. */
-#define DWORD_MNEM_SUFFIX 'l'
#define WORD_MNEM_SUFFIX 'w'
#define BYTE_MNEM_SUFFIX 'b'
#define SHORT_MNEM_SUFFIX 's'
@@ -224,7 +223,7 @@ extern const char extra_symbol_chars[];
/* Intel Syntax */
#define LONG_DOUBLE_MNEM_SUFFIX 'x'
/* Intel Syntax */
-#define INTEL_DWORD_MNEM_SUFFIX 'd'
+#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 */