diff options
author | Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | 2010-04-15 16:30:32 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2010-04-15 16:30:32 +0000 |
commit | e8de8feae81be89bbde76711b222af9df693a9e2 (patch) | |
tree | a5d104c89c2b3224549229a5f892104491336430 /gcc | |
parent | 8c709695980d7b9fbc19bee9fafc5182346b8bff (diff) | |
download | gcc-e8de8feae81be89bbde76711b222af9df693a9e2.zip gcc-e8de8feae81be89bbde76711b222af9df693a9e2.tar.gz gcc-e8de8feae81be89bbde76711b222af9df693a9e2.tar.bz2 |
s390.c (s390_call_save_register_used): Switch back to HARD_REGNO_NREGS.
2010-04-15 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.c (s390_call_save_register_used): Switch back
to HARD_REGNO_NREGS.
From-SVN: r158384
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 28 |
2 files changed, 12 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3610918..ba332d1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-04-15 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> + + * config/s390/s390.c (s390_call_save_register_used): Switch back + to HARD_REGNO_NREGS. + 2010-04-15 Richard Guenther <rguenther@suse.de> * alias.c (alias_set_subset_of): Handle alias-set zero diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index d0fbe5a..c3820e5 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -9449,17 +9449,9 @@ s390_call_saved_register_used (tree call_expr) if (REG_P (parm_rtx)) { - int n_regs; - - /* Only integer registers (r6) are call saved and used for - parameter passing. */ - if (REGNO_REG_CLASS (REGNO (parm_rtx)) == FP_REGS) - continue; - - n_regs = ((GET_MODE_SIZE (GET_MODE (parm_rtx)) + UNITS_PER_LONG - 1) - / UNITS_PER_LONG); - - for (reg = 0; reg < n_regs; reg++) + for (reg = 0; + reg < HARD_REGNO_NREGS (REGNO (parm_rtx), GET_MODE (parm_rtx)); + reg++) if (!call_used_regs[reg + REGNO (parm_rtx)]) return true; } @@ -9467,22 +9459,16 @@ s390_call_saved_register_used (tree call_expr) if (GET_CODE (parm_rtx) == PARALLEL) { int i; + for (i = 0; i < XVECLEN (parm_rtx, 0); i++) { rtx r = XEXP (XVECEXP (parm_rtx, 0, i), 0); - int n_regs; gcc_assert (REG_P (r)); - /* Only integer registers (r6) are call saved and used - for parameter passing. */ - if (REGNO_REG_CLASS (REGNO (r)) == FP_REGS) - continue; - - n_regs = ((GET_MODE_SIZE (GET_MODE (r)) + UNITS_PER_LONG - 1) - / UNITS_PER_LONG); - - for (reg = 0; reg < n_regs; reg++) + for (reg = 0; + reg < HARD_REGNO_NREGS (REGNO (r), GET_MODE (r)); + reg++) if (!call_used_regs[reg + REGNO (r)]) return true; } |