aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-11-12 07:38:32 +0000
committerJeff Law <law@gcc.gnu.org>1999-11-12 00:38:32 -0700
commitcfb0346d0366b69f2f109b058a89aeed96aebeaf (patch)
tree62994ceb9440809e2d0a88bb41d3a916c0d8cac7 /gcc/function.c
parentd5e3f1513fdfd98ca59738d1fa3ae05b5a766bb5 (diff)
downloadgcc-cfb0346d0366b69f2f109b058a89aeed96aebeaf.zip
gcc-cfb0346d0366b69f2f109b058a89aeed96aebeaf.tar.gz
gcc-cfb0346d0366b69f2f109b058a89aeed96aebeaf.tar.bz2
function.c (diddle_return_value): Only clal hard_function_value when the return value is supposed to be in a register.
* function.c (diddle_return_value): Only clal hard_function_value when the return value is supposed to be in a register. From-SVN: r30497
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/function.c b/gcc/function.c
index a8ed54c..67502af 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6200,19 +6200,20 @@ void
diddle_return_value (code)
enum rtx_code code;
{
- rtx return_reg;
tree decl_result = DECL_RESULT (current_function_decl);
+ rtx return_reg = DECL_RTL (decl_result);
- if (DECL_RTL (decl_result))
+ if (return_reg)
{
- /* Use hard_function_value to avoid creating a reference to a BLKmode
- register in the USE/CLOBBER insn. */
- return_reg = hard_function_value (TREE_TYPE (decl_result),
- current_function_decl);
-
if (GET_CODE (return_reg) == REG
&& REGNO (return_reg) < FIRST_PSEUDO_REGISTER)
- emit_insn (gen_rtx_fmt_e (code, VOIDmode, return_reg));
+ {
+ /* Use hard_function_value to avoid creating a reference to a BLKmode
+ register in the USE/CLOBBER insn. */
+ return_reg = hard_function_value (TREE_TYPE (decl_result),
+ current_function_decl);
+ emit_insn (gen_rtx_fmt_e (code, VOIDmode, return_reg));
+ }
else if (GET_CODE (return_reg) == PARALLEL)
{
int i;