aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2013-01-09 18:19:16 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2013-01-09 18:19:16 +0000
commit9a002da86b6a69292b2d520a17cf1412e092ec76 (patch)
treed95935d5d4ca6f06429b4ffd9a9f54942215415d /gcc/expr.c
parent511dcace074c36f4c8d7fcf835ba795fa82268c0 (diff)
downloadgcc-9a002da86b6a69292b2d520a17cf1412e092ec76.zip
gcc-9a002da86b6a69292b2d520a17cf1412e092ec76.tar.gz
gcc-9a002da86b6a69292b2d520a17cf1412e092ec76.tar.bz2
re PR middle-end/55114 (gcc.dg/builtins-53.c ICEs on mips64 soft-float)
gcc/ PR middle-end/55114 * expr.h (maybe_emit_group_store): Declare. * expr.c (maybe_emit_group_store): New function. * builtins.c (expand_builtin_int_roundingfn): Call it. (expand_builtin_int_roundingfn_2): Likewise. From-SVN: r195060
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index e7b7770..08da907 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -2079,6 +2079,23 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize)
emit_move_insn (orig_dst, dst);
}
+/* Return a form of X that does not use a PARALLEL. TYPE is the type
+ of the value stored in X. */
+
+rtx
+maybe_emit_group_store (rtx x, tree type)
+{
+ enum machine_mode mode = TYPE_MODE (type);
+ gcc_checking_assert (GET_MODE (x) == VOIDmode || GET_MODE (x) == mode);
+ if (GET_CODE (x) == PARALLEL)
+ {
+ rtx result = gen_reg_rtx (mode);
+ emit_group_store (result, x, type, int_size_in_bytes (type));
+ return result;
+ }
+ return x;
+}
+
/* Copy a BLKmode object of TYPE out of a register SRCREG into TARGET.
This is used on targets that return BLKmode values in registers. */