From: ebotcazou Date: Sat, 23 Mar 2013 11:13:39 +0000 (+0000) Subject: * calls.c (expand_call): Add missing guard to code handling return X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d8ef55fc678c5f8e3f54a1c38db33b37ea898181;p=thirdparty%2Fgcc.git * calls.c (expand_call): Add missing guard to code handling return of non-BLKmode structures in MSB. * function.c (expand_function_end): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197003 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1f04a1db8ec1..ee8685b8e853 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-03-23 Eric Botcazou + + * 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 * combine.c (try_combine): Adjust comment. Do not add the set of diff --git a/gcc/calls.c b/gcc/calls.c index dd034b400992..a585390be5f5 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -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)) diff --git a/gcc/function.c b/gcc/function.c index e673f21a57d8..5419b88593df 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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),