aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-ppc.c')
-rw-r--r--gas/config/tc-ppc.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 88f9b8e..621b6db 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -586,6 +586,9 @@ register_name (expressionP)
c = get_symbol_end ();
reg_number = reg_name_search (pre_defined_registers, REG_NAME_CNT, name);
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
+
/* Look to see if it's in the register table. */
if (reg_number >= 0)
{
@@ -595,17 +598,12 @@ register_name (expressionP)
/* Make the rest nice. */
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- /* Put back the delimiting char. */
- *input_line_pointer = c;
return true;
}
- else
- {
- /* Reset the line as if we had not done anything. */
- *input_line_pointer = c;
- input_line_pointer = start;
- return false;
- }
+
+ /* Reset the line as if we had not done anything. */
+ input_line_pointer = start;
+ return false;
}
/* This function is called for each symbol seen in an expression. It