i386 fabs/fchs patch

Richard Henderson rth@cygnus.com
Fri Nov 19 01:32:00 GMT 1999


On Fri, Nov 19, 1999 at 01:42:26AM +0100, Jan Hubicka wrote:
> Now for neg and abs operations.
> I am doing that only for -ffast-math. Is that safe by default?

Yes.  Neither are required to be `operations' in the IEEE sense.
It is quite normal for neither to trap.

> +   [(set (match_operand:SF 0 "nonimmediate_operand" "=f#rm,rmf")

Same comment about #f in alternative 1.

> +   [(set (match_operand:SF 0 "register_operand" "")
> + 	(neg:SF (match_operand:SF 1 "register_operand" "")))]
> +   "TARGET_80387 && flag_fast_math && reload_completed
> +    && !FP_REGNO_P (REGNO (operands[0]))"
> +   [(parallel [(set (match_dup 0) (xor:SI (match_dup 0) (match_dup 1)))
> + 	      (clobber (reg:CC 17))])]

You've just introduced a new clobber of the flags, with
no assurances that the register is not live.



r~


More information about the Gcc-patches mailing list