diff options
author | aesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-02 22:20:52 +0000 |
---|---|---|
committer | aesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-02 22:20:52 +0000 |
commit | 4d8644f362f7ed31168e26a30d1c66e5c30e0b78 (patch) | |
tree | ceef32f2c29300b16504d1aaad31b7dd7eb7c9d5 /gcc/reginfo.c | |
parent | 0013707d64fd8e0f480c371c7f45673b4b9edd54 (diff) | |
download | gcc-4d8644f362f7ed31168e26a30d1c66e5c30e0b78.tar.gz |
* hard-reg-set.h (call_fixed_regs): Remove.
* reginfo.c (call_fixed_regs): Remove.
(init_reg_sets_1): Remove initialization of call_fixed_regs.
(globalize_reg): Don't use call_fixed_regs.
* caller-save.c (init_caller_save): Use call_fixed_reg_set instead of
call_fixed_regs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151353 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reginfo.c')
-rw-r--r-- | gcc/reginfo.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/gcc/reginfo.c b/gcc/reginfo.c index 9842dc14f77..9b03d64f590 100644 --- a/gcc/reginfo.c +++ b/gcc/reginfo.c @@ -101,13 +101,11 @@ char call_really_used_regs[] = CALL_REALLY_USED_REGISTERS; #endif -/* Indexed by hard register number, contains 1 for registers that are - fixed use or call used registers that cannot hold quantities across - calls even if we are willing to save and restore them. call fixed - registers are a subset of call used registers. */ -char call_fixed_regs[FIRST_PSEUDO_REGISTER]; +/* Contains registers that are fixed use -- i.e. in fixed_reg_set -- or + a function value return register or TARGET_STRUCT_VALUE_RTX or + STATIC_CHAIN_REGNUM. These are the registers that cannot hold quantities + across calls even if we are willing to save and restore them. */ -/* The same info as a HARD_REG_SET. */ HARD_REG_SET call_fixed_reg_set; /* Indexed by hard register number, contains 1 for registers @@ -515,8 +513,6 @@ init_reg_sets_1 (void) else CLEAR_REG_SET (regs_invalidated_by_call_regset); - memcpy (call_fixed_regs, fixed_regs, sizeof call_fixed_regs); - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) { /* call_used_regs must include fixed_regs. */ @@ -531,8 +527,6 @@ init_reg_sets_1 (void) if (call_used_regs[i]) SET_HARD_REG_BIT (call_used_reg_set, i); - if (call_fixed_regs[i]) - SET_HARD_REG_BIT (call_fixed_reg_set, i); /* There are a couple of fixed registers that we know are safe to exclude from being clobbered by calls: @@ -571,12 +565,14 @@ init_reg_sets_1 (void) } } + COPY_HARD_REG_SET(call_fixed_reg_set, fixed_reg_set); + /* Preserve global registers if called more than once. */ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) { if (global_regs[i]) { - fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 1; + fixed_regs[i] = call_used_regs[i] = 1; SET_HARD_REG_BIT (fixed_reg_set, i); SET_HARD_REG_BIT (call_used_reg_set, i); SET_HARD_REG_BIT (call_fixed_reg_set, i); @@ -870,7 +866,7 @@ globalize_reg (int i) if (fixed_regs[i]) return; - fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 1; + fixed_regs[i] = call_used_regs[i] = 1; #ifdef CALL_REALLY_USED_REGISTERS call_really_used_regs[i] = 1; #endif |