On Sat, 1 Dec 2012, Eric Botcazou wrote:
> > Of course this matters only to >64bit (i.e. >registersize) values like
> > TImode, alias __int128. The problem here is that group-loading a
> > constant for a function return-value doesn't work; it's passed to
> > simplify_gen_subreg which horks on the VOIDmode constant. Thankfully,
> > the code below the context handles this case, twice the register-mode,
> > just fine, so let's just gate the simplify_gen_subreg call with a test
> > for a VOIDmode source.
>
> IMO that's not as clear a cut as it seems. simplify_gen_subreg is supposed to
> work on VOIDmode constants, at least to be callable on them, because there is
> the simplify_gen_subreg -> simplify_subreg -> simplify_immed_subreg path.
Oops, that parallel I quoted should've had TImode, not VOIDmode.
The documentation is pretty clear.
Tested as before (but mmix targets only :)
Committed.
gcc:
* config/mmix/mmix.c (mmix_function_value): Set the mode of the
returned PARALLEL to that of the return-value, not VOIDmode.
Index: gcc/config/mmix/mmix.c
===================================================================
--- gcc/config/mmix/mmix.c (revision 192677)
+++ gcc/config/mmix/mmix.c (working copy)
@@ -754,7 +754,7 @@ mmix_function_value (const_tree valtype,
gen_rtx_REG (cmode, first_val_regnum + nregs - 1),
const0_rtx);
- return gen_rtx_PARALLEL (VOIDmode, gen_rtvec_v (nregs, vec));
+ return gen_rtx_PARALLEL (mode, gen_rtvec_v (nregs, vec));
}
/* Implements TARGET_LIBCALL_VALUE. */
brgds, H-P