diff options
author | Doug Evans <dje@google.com> | 1998-06-02 16:54:59 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1998-06-02 16:54:59 +0000 |
commit | c68b56efc5bf81806147871963f09f53606a443c (patch) | |
tree | 1e5fc646e6f934f0e6b66e804a0eee83c24f9768 /gas/read.c | |
parent | 30596dfc4f012e793328cdd983d7bf7e3d5f8a00 (diff) | |
download | gdb-c68b56efc5bf81806147871963f09f53606a443c.zip gdb-c68b56efc5bf81806147871963f09f53606a443c.tar.gz gdb-c68b56efc5bf81806147871963f09f53606a443c.tar.bz2 |
* read.c (do_s_func): New function.
(s_func): Call it.
* read.h (do_s_func): Add prototype.
* config/tc-dvp.c (md_pseudo_table): Add .func/.endfunc.
(s_dvp_func): New function.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 32 |
1 files changed, 24 insertions, 8 deletions
@@ -4921,6 +4921,17 @@ void s_func (end_p) int end_p; { + do_s_func (end_p, NULL); +} + +/* Subroutine of s_func so targets can choose a different default prefix. + If DEFAULT_PREFIX is NULL, use the target's "leading char". */ + +void +do_s_func (end_p, default_prefix) + int end_p; + const char *default_prefix; +{ /* Record the current function so that we can issue an error message for misplaced .func,.endfunc, and also so that .endfunc needs no arguments. */ @@ -4960,16 +4971,21 @@ s_func (end_p) SKIP_WHITESPACE (); if (*input_line_pointer != ',') { - char leading_char = 0; + if (default_prefix) + asprintf (&label, "%s%s", default_prefix, name); + else + { + char leading_char = 0; #ifdef BFD_ASSEMBLER - leading_char = bfd_get_symbol_leading_char (stdoutput); + leading_char = bfd_get_symbol_leading_char (stdoutput); #endif - /* Missing entry point, use function's name with the leading - char prepended. */ - if (leading_char) - asprintf (&label, "%c%s", leading_char, name); - else - label = name; + /* Missing entry point, use function's name with the leading + char prepended. */ + if (leading_char) + asprintf (&label, "%c%s", leading_char, name); + else + label = name; + } } else { |