summaryrefslogtreecommitdiff
path: root/gas/as.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-03-17 10:05:05 +0100
committerJan Beulich <jbeulich@suse.com>2023-03-17 10:05:05 +0100
commit3da593e8de13861b637c50dc9c291a229bac6b2f (patch)
tree98ee6f3ca4e3f99f4d488a6be96ef25617da3a88 /gas/as.c
parent14317f7f05d0290586f456d02176dd77a81aee69 (diff)
downloadbinutils-gdb-3da593e8de13861b637c50dc9c291a229bac6b2f.tar.gz
gas: drop function pointer parameter from macro_init()
With the removal of gasp (about 20 years ago) the need for this kind- of-hook has disappeared. Go a step beyond merely moving the to be called function: Inline its contents right at the sole call site.
Diffstat (limited to 'gas/as.c')
-rw-r--r--gas/as.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/gas/as.c b/gas/as.c
index 593eaec7f14..57641802d72 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -1167,28 +1167,6 @@ dump_statistics (void)
obj_print_statistics (stderr);
#endif
}
-
-/* The interface between the macro code and gas expression handling. */
-
-static size_t
-macro_expr (const char *emsg, size_t idx, sb *in, offsetT *val)
-{
- expressionS ex;
-
- sb_terminate (in);
-
- temp_ilp (in->ptr + idx);
- expression_and_evaluate (&ex);
- idx = input_line_pointer - in->ptr;
- restore_ilp ();
-
- if (ex.X_op != O_constant)
- as_bad ("%s", emsg);
-
- *val = ex.X_add_number;
-
- return idx;
-}
/* Here to attempt 1 pass over each input file.
We scan argv[*] looking for filenames or exactly "" which is
@@ -1336,7 +1314,7 @@ gas_init (void)
#ifdef TC_I960
macro_strip_at = flag_mri;
#endif
- macro_init (flag_macro_alternate, flag_mri, macro_strip_at, macro_expr);
+ macro_init (flag_macro_alternate, flag_mri, macro_strip_at);
dwarf2_init ();