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: i386.md: consistency for fix_trunc[sd]i


On Mon, 20 Dec 1999, Richard Henderson wrote:

> On Sun, Dec 19, 1999 at 11:42:54AM +0000, Bernd Schmidt wrote:
> >  (define_insn "*fix_truncsi_1"
> >    [(set (match_operand:SI 0 "nonimmediate_operand" "=m,?r")
> >  	(fix:SI (match_operand 1 "register_operand" "f,f")))
> >     (clobber (match_operand:SI 2 "memory_operand" "=o,o"))
> >     (clobber (match_operand:SI 3 "memory_operand" "=m,m"))
> > -   (clobber (match_scratch:SI 4 "=&r,r"))]
> > +   (clobber (match_scratch:SI 4 "=&r,&r"))]
> >    "TARGET_80387 && FLOAT_MODE_P (GET_MODE (operands[1]))"
> >    "* return output_fix_trunc (insn, operands);"
> >    [(set_attr "type" "multi")])
> 
> No, the original code is correct.  Note that in the DImode
> case we output to two registers non-atomically.  In the SImode
> case there is exactly one insn that writes to the output.

Hmm.  Isn't the earlyclobber there to prevent overlap with the
memory addresses (e.g. for operand 3; see also the second hunk
of the patch)?  Operand 4 (the scratch register) is used in 
output_fix_trunc before accessing operand 4.


Bernd


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