aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2011-06-10 11:06:36 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2011-06-10 11:06:36 +0000
commit3f5ea9dc58907a2d3898ac666572c103d46aa917 (patch)
treef453b18df2d8d9d94c8fca0330d394f929a12849 /gcc
parentb11b09048dcd08782578c7c34456e51aa408b1a9 (diff)
downloadgcc-3f5ea9dc58907a2d3898ac666572c103d46aa917.zip
gcc-3f5ea9dc58907a2d3898ac666572c103d46aa917.tar.gz
gcc-3f5ea9dc58907a2d3898ac666572c103d46aa917.tar.bz2
avr.c (avr_function_arg_advance): Fix thinko about when a value is actually passed in regs.
* config/avr/avr.c (avr_function_arg_advance): Fix thinko about when a value is actually passed in regs. From-SVN: r174898
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/avr/avr.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8fb1ad9..0c18e05 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-10 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/avr.c (avr_function_arg_advance): Fix thinko about
+ when a value is actually passed in regs.
+
2011-06-10 Eric Botcazou <ebotcazou@adacore.com>
Laurent Rougé <laurent.rouge@menta.fr>
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 5a565b0..aadfd24 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -1784,7 +1784,8 @@ avr_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
a function must not pass arguments in call-saved regs in order to get
tail-called. */
- if (cum->regno >= 0
+ if (cum->regno >= 8
+ && cum->nregs >= 0
&& !call_used_regs[cum->regno])
{
/* FIXME: We ship info on failing tail-call in struct machine_function.
@@ -1800,7 +1801,8 @@ avr_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
user has fixed a GPR needed to pass an argument, an (implicit) function
call would clobber that fixed register. See PR45099 for an example. */
- if (cum->regno >= 0)
+ if (cum->regno >= 8
+ && cum->nregs >= 0)
{
int regno;