diff options
author | Jeffrey A Law <law@cygnus.com> | 1999-10-19 08:05:40 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-10-19 02:05:40 -0600 |
commit | e87b62d96da654acfeea3765d1f046a7186d804c (patch) | |
tree | b763ee996fd7f23f1407505170d4ae573011609a | |
parent | b7883a2432871d7048c5827236e4577b97462cfa (diff) | |
download | gcc-e87b62d96da654acfeea3765d1f046a7186d804c.tar.gz |
reg-stack.c (stack_result): Aggregates are not returned in stack registers.
* reg-stack.c (stack_result): Aggregates are not returned in
stack registers.
From-SVN: r30079
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/reg-stack.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3bddf0d4bdb..59c2ada88ae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 19 02:03:00 1999 Jeffrey A Law (law@cygnus.com) + + * reg-stack.c (stack_result): Aggregates are not returned in + stack registers. + Mon Oct 18 01:41:35 1999 Jeffrey A Law (law@cygnus.com) * combine.c (get_last_value): If the last set of a register diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index dd4a87e697c..42caefa0a42 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -1186,8 +1186,16 @@ static rtx stack_result (decl) tree decl; { - rtx result = DECL_RTL (DECL_RESULT (decl)); + rtx result; + /* If the value is supposed to be returned in memory, then clearly + it is not returned in a stack register. */ + if (aggregate_value_p (DECL_RESULT (decl))) + return 0; + + result = DECL_RTL (DECL_RESULT (decl)); + /* ?!? What is this code supposed to do? Can this code actually + trigger if we kick out aggregates above? */ if (result != 0 && ! (GET_CODE (result) == REG && REGNO (result) < FIRST_PSEUDO_REGISTER)) |