OSDN Git Service

(expand_function_end): Handle BLKmode structures returned
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Nov 1996 01:37:54 +0000 (01:37 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Nov 1996 01:37:54 +0000 (01:37 +0000)
in registers.

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

gcc/function.c

index 827f14b..6fa9811 100644 (file)
@@ -5549,6 +5549,11 @@ expand_function_end (filename, line, end_bindings)
                          current_function_decl);
 #endif
       REG_FUNCTION_VALUE_P (real_decl_result) = 1;
+      /* If this is a BLKmode structure being returned in registers, then use
+        the mode computed in expand_return.  */
+      if (GET_MODE (real_decl_result) == BLKmode)
+       PUT_MODE (real_decl_result,
+                 GET_MODE (DECL_RTL (DECL_RESULT (current_function_decl))));
       emit_move_insn (real_decl_result,
                      DECL_RTL (DECL_RESULT (current_function_decl)));
       emit_insn (gen_rtx (USE, VOIDmode, real_decl_result));