aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mn10200.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-mn10200.c')
-rw-r--r--gas/config/tc-mn10200.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/gas/config/tc-mn10200.c b/gas/config/tc-mn10200.c
index ebf7f94..4d4f482 100644
--- a/gas/config/tc-mn10200.c
+++ b/gas/config/tc-mn10200.c
@@ -181,13 +181,12 @@ data_register_name (expressionS *expressionP)
char c;
/* Find the spelling of the operand. */
- start = name = input_line_pointer;
-
- c = get_symbol_end ();
+ start = input_line_pointer;
+ c = get_symbol_name (&name);
reg_number = reg_name_search (data_registers, DATA_REG_NAME_CNT, name);
/* Put back the delimiting char. */
- *input_line_pointer = c;
+ (void) restore_line_pointer (c);
/* Look to see if it's in the register table. */
if (reg_number >= 0)
@@ -226,13 +225,12 @@ address_register_name (expressionS *expressionP)
char c;
/* Find the spelling of the operand. */
- start = name = input_line_pointer;
-
- c = get_symbol_end ();
+ start = input_line_pointer;
+ c = get_symbol_name (&name);
reg_number = reg_name_search (address_registers, ADDRESS_REG_NAME_CNT, name);
/* Put back the delimiting char. */
- *input_line_pointer = c;
+ (void) restore_line_pointer (c);
/* Look to see if it's in the register table. */
if (reg_number >= 0)
@@ -271,13 +269,12 @@ other_register_name (expressionS *expressionP)
char c;
/* Find the spelling of the operand. */
- start = name = input_line_pointer;
-
- c = get_symbol_end ();
+ start = input_line_pointer;
+ c = get_symbol_name (&name);
reg_number = reg_name_search (other_registers, OTHER_REG_NAME_CNT, name);
/* Put back the delimiting char. */
- *input_line_pointer = c;
+ (void) restore_line_pointer (c);
/* Look to see if it's in the register table. */
if (reg_number >= 0)
@@ -980,32 +977,31 @@ md_assemble (char *str)
}
else if (operand->flags & MN10200_OPERAND_PSW)
{
- char *start = input_line_pointer;
- char c = get_symbol_end ();
+ char *start;
+ char c = get_symbol_name (&start);
if (strcmp (start, "psw") != 0)
{
- *input_line_pointer = c;
+ (void) restore_line_pointer (c);
input_line_pointer = hold;
str = hold;
goto error;
}
- *input_line_pointer = c;
+ (void) restore_line_pointer (c);
goto keep_going;
}
else if (operand->flags & MN10200_OPERAND_MDR)
{
- char *start = input_line_pointer;
- char c = get_symbol_end ();
+ char *start;
+ char c = get_symbol_name (&start);
+ (void) restore_line_pointer (c);
if (strcmp (start, "mdr") != 0)
{
- *input_line_pointer = c;
input_line_pointer = hold;
str = hold;
goto error;
}
- *input_line_pointer = c;
goto keep_going;
}
else if (data_register_name (&ex))
@@ -1337,4 +1333,3 @@ keep_going:
}
}
}
-