aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-04-22 00:43:38 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-04-22 00:43:38 +0000
commit8d46fc7c2f33d8cde8413f04269a4a42252b0db9 (patch)
tree7dbc3fa2ca6600b42f43eb6f2319487afbad8b51 /gas
parentf9bdfd293edb98758164839d762448433ebdafae (diff)
downloadgdb-8d46fc7c2f33d8cde8413f04269a4a42252b0db9.zip
gdb-8d46fc7c2f33d8cde8413f04269a4a42252b0db9.tar.gz
gdb-8d46fc7c2f33d8cde8413f04269a4a42252b0db9.tar.bz2
Remove is_intel_syntax from i386_is_register.
2010-04-21 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (i386_is_register): Remove is_intel_syntax. (x86_cons): Updated. (parse_register): Likewise. (tc_x86_parse_to_dw2regnum): Likewise. * config/tc-i386-intel.c (i386_intel_simplify): Likewise. (i386_intel_operand): Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog9
-rw-r--r--gas/config/tc-i386-intel.c8
-rw-r--r--gas/config/tc-i386.c15
3 files changed, 19 insertions, 13 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 2514b28..0418e6f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,14 @@
2010-04-21 H.J. Lu <hongjiu.lu@intel.com>
+ * config/tc-i386.c (i386_is_register): Remove is_intel_syntax.
+ (x86_cons): Updated.
+ (parse_register): Likewise.
+ (tc_x86_parse_to_dw2regnum): Likewise.
+ * config/tc-i386-intel.c (i386_intel_simplify): Likewise.
+ (i386_intel_operand): Likewise.
+
+2010-04-21 H.J. Lu <hongjiu.lu@intel.com>
+
PR gas/11509
* config/tc-i386-intel.c (i386_intel_simplify_register): New.
(i386_intel_simplify): Use i386_is_register and
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c
index cb99518..ed8d45c 100644
--- a/gas/config/tc-i386-intel.c
+++ b/gas/config/tc-i386-intel.c
@@ -347,8 +347,7 @@ static int i386_intel_simplify (expressionS *e)
intel_state.op_modifier = e->X_op;
/* FALLTHROUGH */
case O_short:
- if (i386_is_register (symbol_get_value_expression (e->X_add_symbol),
- 1))
+ if (i386_is_register (symbol_get_value_expression (e->X_add_symbol)))
{
as_bad (_("invalid use of register"));
return 0;
@@ -359,8 +358,7 @@ static int i386_intel_simplify (expressionS *e)
break;
case O_full_ptr:
- if (i386_is_register (symbol_get_value_expression (e->X_op_symbol),
- 1))
+ if (i386_is_register (symbol_get_value_expression (e->X_op_symbol)))
{
as_bad (_("invalid use of register"));
return 0;
@@ -859,7 +857,7 @@ i386_intel_operand (char *operand_string, int got_a_float)
break;
intel_state.seg = expP->X_add_symbol;
}
- if (!i386_is_register (expP, 1))
+ if (!i386_is_register (expP))
{
as_bad (_("segment register name expected"));
return 0;
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 1728e60..11abad1 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -3534,13 +3534,12 @@ swap_operands (void)
}
}
+/* The X_md field is set to register number plus 1 to indicate register
+ expression in Intel syntax. */
static int
-i386_is_register (const expressionS *e, int is_intel_syntax)
+i386_is_register (const expressionS *e)
{
- return (e->X_op == O_register
- || (is_intel_syntax
- && e->X_op == O_constant
- && e->X_md));
+ return e->X_op == O_register || e->X_md;
}
/* Try to ensure constant immediates are represented in the smallest
@@ -6487,7 +6486,7 @@ x86_cons (expressionS *exp, int size)
if (exp->X_op == O_constant
|| exp->X_op == O_absent
|| exp->X_op == O_illegal
- || i386_is_register (exp, intel_syntax)
+ || i386_is_register (exp)
|| exp->X_op == O_big)
{
char c = *input_line_pointer;
@@ -7966,7 +7965,7 @@ parse_register (char *reg_string, char **end_op)
{
const expressionS *e = symbol_get_value_expression (symbolP);
- know (i386_is_register (e, intel_syntax));
+ know (i386_is_register (e));
know (e->X_add_number >= 0
&& (valueT) e->X_add_number < i386_regtab_size);
r = i386_regtab + e->X_add_number;
@@ -8873,7 +8872,7 @@ tc_x86_parse_to_dw2regnum (expressionS *exp)
register_chars['.'] = saved_register_dot;
allow_naked_reg = saved_naked_reg;
- if (i386_is_register (exp, intel_syntax) && exp->X_add_number >= 0)
+ if (i386_is_register (exp) && exp->X_add_number >= 0)
{
if ((addressT) exp->X_add_number < i386_regtab_size)
{