gas: fold do_repeat{,_with_expander}()

do_repeat_with_expander() already deals with the "no expander" case
quite fine, so there's really little point having two functions. What it
lacks compared with do_repeat() is a call to sb_build(), which can
simply be moved (and the then redundant sb_new() be avoided). Along with
this moving also flip if the main if()'s condition such that the "no
expander" case is handled first.
This commit is contained in:
Jan Beulich
2022-05-18 09:37:34 +02:00
parent 43fe575c32
commit 7e6d6b62d8
4 changed files with 15 additions and 46 deletions

View File

@@ -2034,7 +2034,7 @@ tic54x_loop (int count)
if (!is_end_of_line[(unsigned char) *input_line_pointer])
count = get_absolute_expression ();
do_repeat ((size_t) count, "LOOP", "ENDLOOP");
do_repeat ((size_t) count, "LOOP", "ENDLOOP", NULL);
}
/* Normally, endloop gets eaten by the preceding loop. */