diff options
author | Andreas Krebbel <krebbel1@de.ibm.com> | 2008-01-17 16:18:59 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2008-01-17 16:18:59 +0000 |
commit | 599824d24ab2e824ba8af60c123debc03023a94d (patch) | |
tree | 5121992dd80b8b1bb8673bf19c1c5051d0828766 /gcc | |
parent | 9328dd5725be9ddbca3350bf0586b30c3b920a6d (diff) | |
download | gcc-599824d24ab2e824ba8af60c123debc03023a94d.zip gcc-599824d24ab2e824ba8af60c123debc03023a94d.tar.gz gcc-599824d24ab2e824ba8af60c123debc03023a94d.tar.bz2 |
global.c (find_reg): Mark the eh regs as used if necessary.
2008-01-17 Andreas Krebbel <krebbel1@de.ibm.com>
* global.c (find_reg): Mark the eh regs as used if necessary.
* ra-conflict.c (global_conflicts): Set no_eh_reg flag.
* ra.h (struct allocno): no_eh_reg field added. Changed
no_stack_reg type to bitfield.
From-SVN: r131601
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/global.c | 10 | ||||
-rw-r--r-- | gcc/ra-conflict.c | 5 | ||||
-rw-r--r-- | gcc/ra.h | 7 |
4 files changed, 28 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 572b6ed..c337e95 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2008-01-17 Andreas Krebbel <krebbel1@de.ibm.com> + + * global.c (find_reg): Mark the eh regs as used if necessary. + * ra-conflict.c (global_conflicts): Set no_eh_reg flag. + * ra.h (struct allocno): no_eh_reg field added. Changed + no_stack_reg type to bitfield. + 2008-01-17 Eric Botcazou <ebotcazou@adacore.com> * tree.c (substitute_in_expr): Add missing 'break'. diff --git a/gcc/global.c b/gcc/global.c index 8be113d..c805f57 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -1011,6 +1011,16 @@ find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbere IOR_HARD_REG_SET (used1, losers); IOR_COMPL_HARD_REG_SET (used1, reg_class_contents[(int) class]); + +#ifdef EH_RETURN_DATA_REGNO + if (allocno[num].no_eh_reg) + { + unsigned int j; + for (j = 0; EH_RETURN_DATA_REGNO (j) != INVALID_REGNUM; j++) + SET_HARD_REG_BIT (used1, EH_RETURN_DATA_REGNO (j)); + } +#endif + COPY_HARD_REG_SET (used2, used1); IOR_HARD_REG_SET (used1, allocno[num].hard_reg_conflicts); diff --git a/gcc/ra-conflict.c b/gcc/ra-conflict.c index bc93b89..ce1dfdf 100644 --- a/gcc/ra-conflict.c +++ b/gcc/ra-conflict.c @@ -1184,6 +1184,11 @@ global_conflicts (void) break; record_one_conflict (allocnos_live, &hard_regs_live, regno); } + + EXECUTE_IF_SET_IN_SPARSESET (allocnos_live, i) + { + allocno[i].no_eh_reg = 1; + } } #endif @@ -75,9 +75,14 @@ struct allocno HARD_REG_SET regs_someone_prefers; +#ifdef EH_RETURN_DATA_REGNO + /* Set to true if allocno can't be allocated in an eh register. */ + unsigned int no_eh_reg:1; +#endif + #ifdef STACK_REGS /* Set to true if allocno can't be allocated in the stack register. */ - bool no_stack_reg; + unsigned int no_stack_reg:1; #endif }; extern struct allocno *allocno; |