* function.c (diddle_return_value): Only clal hard_function_value
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Nov 1999 07:38:32 +0000 (07:38 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Nov 1999 07:38:32 +0000 (07:38 +0000)
        when the return value is supposed to be in a register.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30497 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/function.c

index feb87ed..d08cf8f 100644 (file)
@@ -7,6 +7,9 @@ Thu Nov 11 19:45:24 1999  Jim Wilson  <wilson@cygnus.com>
 
 Thu Nov 11 18:54:24 1999  Jeffrey A Law  (law@cygnus.com)
 
+       * function.c (diddle_return_value): Put back check that the DECL_RTL
+       for the function is a register.
+
        * function.c (diddle_return_value): Use hard_function_value to
        get an rtx suitable for use in the USE/CLOBBER insn.
 
index a8ed54c..67502af 100644 (file)
@@ -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;