This is the mail archive of the gcc-patches@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]

Re: Trivial SSE fix


On Tue, Feb 13, 2001 at 04:31:55PM +0100, Jan Hubicka wrote:
> +      operands[0] = force_reg (SImode, operands[0]);
>        emit_insn (gen_fix_truncdfsi_sse (operands[0], operands[1]));

This is incorrect.  You're copying the destination to 
a register before clobbering it.  You want

	rtx out = REG_P (operands[0]) ? operands[0] : gen_reg_rtx (SImode);
	emit_insn (gen_fix_truncdfsi_sse (out, operands[1]));
	if (out != operands[0])
	  emit_move_insn (operands[0], out);


r~


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