This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: moving v16sf reg with multiple sub-regs


Ok, I think I found out why gen_subreg crashes here: (with gcc 3.3.3)

 if (byte % GET_MODE_SIZE (outermode)
     || byte >= GET_MODE_SIZE (innermode))
   abort ();

This check doesn't seem right to me ;-)

I'll see what's in the latest cvs for this function.

Regards

Dylan

"Richard Sandiford" <rsandifo@redhat.com> wrote in message 87d5urs5ry.fsf@firetop.home">news:87d5urs5ry.fsf@firetop.home...
"Dylan Cuthbert" <dylan@q-games.com> writes:
   emit_move_insn( gen_rtx_SUBREG (V4SFmode, op0, 0  ), gen_rtx_MEM(
V4SFmode, src_reg ) );
   emit_move_insn( gen_rtx_SUBREG (V4SFmode, op0, 16 ), gen_rtx_MEM(
V4SFmode, plus_constant( src_reg, 16 ) ) );
   emit_move_insn( gen_rtx_SUBREG (V4SFmode, op0, 32 ), gen_rtx_MEM(
V4SFmode, plus_constant( src_reg, 32 ) ) );
   emit_move_insn( gen_rtx_SUBREG (V4SFmode, op0, 48 ), gen_rtx_MEM(
V4SFmode, plus_constant( src_reg, 48 ) ) );

Note that generating MEMs like this is a bad idea because it discards alias information. It's better to use functions like adjust_address instead.

It's probably also better to use simplify_gen_subreg instead of
gen_rtx_SUBREG.

Richard




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]