From: Doug Evans Date: Tue, 2 Jun 1998 16:54:59 +0000 (+0000) Subject: * read.c (do_s_func): New function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c68b56efc5bf81806147871963f09f53606a443c;p=binutils-gdb.git * 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. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index a3f8ee6b23a..7d5eec78d86 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,6 +1,12 @@ Tue Jun 2 09:25:34 1998 Doug Evans - * read.c (s_func): Prepend `leading char' by default. + * read.c (do_s_func): New function. + (s_func): Call it. + * read.h (do_s_func): Add prototype. +start-sanitize-sky + * config/tc-dvp.c (md_pseudo_table): Add .func/.endfunc. + (s_dvp_func): New function. +end-sanitize-sky start-sanitize-r5900 Mon Jun 1 17:04:56 1998 Jeffrey A Law (law@cygnus.com) diff --git a/gas/read.c b/gas/read.c index 61a37cb9153..88bca848e56 100644 --- a/gas/read.c +++ b/gas/read.c @@ -4920,6 +4920,17 @@ generate_lineno_debug () 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 @@ -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 {