calls.c (expand_call): Add missing guard to code handling return of non-BLKmode struc...
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 23 Mar 2013 11:13:39 +0000 (11:13 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 23 Mar 2013 11:13:39 +0000 (11:13 +0000)
* calls.c (expand_call): Add missing guard to code handling return
of non-BLKmode structures in MSB.
* function.c (expand_function_end): Likewise.

From-SVN: r197003

gcc/ChangeLog
gcc/calls.c
gcc/function.c

index 1f04a1db8ec1e41590f7d9e4ef1d6a977a6ca4b7..ee8685b8e853de4e5ba1541d718d99937069a629 100644 (file)
@@ -1,3 +1,9 @@
+2013-03-23  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * calls.c (expand_call): Add missing guard to code handling return
+       of non-BLKmode structures in MSB.
+       * function.c (expand_function_end): Likewise.
+
 2013-03-23  Eric Botcazou  <ebotcazou@adacore.com>
 
        * combine.c (try_combine): Adjust comment.  Do not add the set of
index dd034b40099270d315e26501f124ed751df8dc47..a585390be5f58a144b5cdbf42542268fd7f8b7b9 100644 (file)
@@ -3171,7 +3171,9 @@ expand_call (tree exp, rtx target, int ignore)
         group load/store machinery below.  */
       if (!structure_value_addr
          && !pcc_struct_value
+         && TYPE_MODE (rettype) != VOIDmode
          && TYPE_MODE (rettype) != BLKmode
+         && REG_P (valreg)
          && targetm.calls.return_in_msb (rettype))
        {
          if (shift_return_value (TYPE_MODE (rettype), false, valreg))
index e673f21a57d892851f0333e2f74661c82c498ca3..5419b88593dfbaf27eabf4f13ff298c7c180ef1c 100644 (file)
@@ -5093,6 +5093,7 @@ expand_function_end (void)
             amount.  BLKmode results are handled using the group load/store
             machinery.  */
          if (TYPE_MODE (TREE_TYPE (decl_result)) != BLKmode
+             && REG_P (real_decl_rtl)
              && targetm.calls.return_in_msb (TREE_TYPE (decl_result)))
            {
              emit_move_insn (gen_rtx_REG (GET_MODE (decl_rtl),