summaryrefslogtreecommitdiff
path: root/gcc/config/c4x/c4x.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-13 01:58:45 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-13 01:58:45 +0000
commit3590147160cf77ac2afb72e80fd68d6ac0c3977b (patch)
tree620724275961c3e490611bea34f8d2c8cba0a9dd /gcc/config/c4x/c4x.c
parenta2ebbb48809073ff0ad025e7ab625bf9c3ec5b0a (diff)
downloadgcc-3590147160cf77ac2afb72e80fd68d6ac0c3977b.tar.gz
PR c++/13376
* function.h (struct function): Kill `name' field. (current_function_name): Make it an extern function. * function.c (current_function_name): New function. * graph.c: Update all uses of current_function_name. * gcse.c: Likewise. * config/alpha/alpha.c, config/avr/avr.c, config/c4x/c4x.c, config/mips/mips.c, config/pdp11/pdp11.c: Likewise. * config/ip2k/ip2k.c (function_prologue): Use MAIN_NAME_P instead of a strcmp with "main". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75784 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/c4x/c4x.c')
-rw-r--r--gcc/config/c4x/c4x.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c
index 9eaa87194d2..28e13359f94 100644
--- a/gcc/config/c4x/c4x.c
+++ b/gcc/config/c4x/c4x.c
@@ -791,18 +791,20 @@ c4x_naked_function_p (void)
int
c4x_interrupt_function_p (void)
{
+ const char *cfun_name;
if (lookup_attribute ("interrupt",
TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))))
return 1;
/* Look for TI style c_intnn. */
- return current_function_name[0] == 'c'
- && current_function_name[1] == '_'
- && current_function_name[2] == 'i'
- && current_function_name[3] == 'n'
- && current_function_name[4] == 't'
- && ISDIGIT (current_function_name[5])
- && ISDIGIT (current_function_name[6]);
+ cfun_name = current_function_name ();
+ return cfun_name[0] == 'c'
+ && cfun_name[1] == '_'
+ && cfun_name[2] == 'i'
+ && cfun_name[3] == 'n'
+ && cfun_name[4] == 't'
+ && ISDIGIT (cfun_name[5])
+ && ISDIGIT (cfun_name[6]);
}
void
@@ -846,7 +848,7 @@ c4x_expand_prologue (void)
storage! */
if (size > 32767)
error ("ISR %s requires %d words of local vars, max is 32767",
- current_function_name, size);
+ current_function_name (), size);
insn = emit_insn (gen_addqi3 (gen_rtx_REG (QImode, SP_REGNO),
gen_rtx_REG (QImode, SP_REGNO),