[patch] Fixed-point patch 7/10

Fu, Chao-Ying fu@mips.com
Wed Sep 5 23:36:00 GMT 2007

Mark Mitchell wrote:
> > 
> >   Based on your review, I attached the updated patch
> > which includes these changes:
> > 
> > 1. Use integer_zerop and integer_onep in "convert_to_fixed".
> > 2. New comments in "expand_expr_real_1" to explain that
> >    because "expand_mult", "expand_divmod", and 
> "exapnd_shift" don't work
> >    for sat/non-sat fixed-point operations, for fixed-point modes we
> >    jump to the label of binop.
> > 3. New changes in genopinit.c, because of the new method to 
> initialize
> > instructions.
> This version is OK.

  Because of the recent change in optabs.c, I need to modify my patch.
The changes are in optabs.c to utilize the new method to initialize 
library functions.

  Is this patch ok?  Thanks a lot!


(Updated gcc/ChangeLog for optabs.c)
2007-09-05  Chao-ying Fu  <fu@mips.com>

	* optabs.c (optab_for_tree_code): For *DIV_EXPR, LSHIFT_EXPR,
	unsigned saturation optabs, when type is saturating.
	(shift_optab_p): Return true for SS_ASHIFT or US_ASHIFT.
	(expand_fixed_convert): New function.
	(gen_fixed_libfunc, gen_signed_fixed_libfunc,
	gen_unsigned_fixed_libfunc, gen_int_fp_fixed_libfunc,
	gen_int_fp_signed_fixed_libfunc, gen_int_fixed_libfunc,
	gen_int_signed_fixed_libfunc, gen_int_unsigned_fixed_libfunc,
	gen_fract_conv_libfunc, gen_fractuns_conv_libfunc,
	gen_satfract_conv_libfunc, gen_satfractuns_conv_libfunc): New
	(init_optabs): Initialize ssadd_optab, usadd_optab, sssub_optab,
	ussub_optab, ssmul_optab, usmul_optab, ssmadd_widen_optab,
	usmadd_widen_optab, ssmsub_widen_optab, usmsub_widen_optab,
	ssdiv_optab, usdiv_optab, ssashl_optab, usashl_optab, ssneg_optab,
	usneg_optab, fract_optab, fractuns_optab, satfract_optab,
	Initialize fixed-point libraries, including add, ssadd, usadd, sub,
	sssub, ussub, mul, ssmul, usmul, div, ssdiv, udiv, usdiv, ashl,
	ssashl, usashl, ashr, lshr, neg, ssneg, usneg, cmp, fract, satfract,
	fractuns, satfractuns.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changes.diff
Type: application/octet-stream
Size: 69525 bytes
Desc: changes.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070905/e1a4ff1a/attachment.obj>

More information about the Gcc-patches mailing list