summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-23 11:13:39 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-23 11:13:39 +0000
commitd8ef55fc678c5f8e3f54a1c38db33b37ea898181 (patch)
tree531e09418de1364c9e9e88b283de5f7dd9b75cbd /gcc
parent32cf0798d0e3f3e4170dbc818293f08e5f4754db (diff)
downloadgcc-d8ef55fc678c5f8e3f54a1c38db33b37ea898181.tar.gz
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/calls.c2
-rw-r--r--gcc/function.c1
3 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1f04a1db8ec..ee8685b8e85 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
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
insn #0 if the destination indirectly is set or dies in insn #2.
Tidy up code to distribute a new note.
diff --git a/gcc/calls.c b/gcc/calls.c
index dd034b40099..a585390be5f 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 e673f21a57d..5419b88593d 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),