1. 20 Apr, 2004 1 commit
    • optabs.h (enum optab_index): Add new OTI_asin and OTI_acos. · c56122d8
      2004-04-20  Uros Bizjak  <uros@kss-loka.si>
      
      	* optabs.h (enum optab_index): Add new OTI_asin and OTI_acos.
      	(asin_optab, acos_optab): Define corresponding macros.
      	* optabs.c (init_optabs): Initialize asin_optab and acos_optab.
      	* genopinit.c (optabs): Implement asin_optab and acos_optab
      	using asin?f2 and acos?f2 patterns.
      	* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_ASIN{,F,L}
      	using asin_optab, and BUILT_IN_ACOS{,F,L} using acos_optab.
      	(expand_builtin): Expand BUILT_IN_ASIN{,F,L} and BUILT_IN_ACOS{,F,L}
      	using expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
      
      	* config/i386/i386.md (asindf2, asinsf2, asinxf2, acosdf2,
      	acossf2, acosxf2): New expanders to implement asin, asinf, asinl,
      	acos, acosf and acosl built-ins as inline x87 intrinsics.
      
      	* gcc.dg/builtins-39.c: New test.
      
      From-SVN: r80921
      Uros Bizjak committed
  2. 15 Apr, 2004 1 commit
    • optabs.h (enum optab_index): Add new OTI_logb and OTI_ilogb. · 88b28a31
      2004-04-14  Uros Bizjak  <uros@kss-loka.si>
      
      	* optabs.h (enum optab_index): Add new OTI_logb and OTI_ilogb.
      	(logb_optab, ilogb_optab): Define corresponding macros.
      	* optabs.c (init_optabs): Initialize logb_optab and ilogb_optab.
      	* genopinit.c (optabs): Implement logb_optab and ilogb_optab
      	using logb?f2 and ilogb?i2 patterns.
      	* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOGB{,F,L}
      	using logb_optab, and BUILT_IN_ILOGB{,F,L} using ilogb_optab.
      	(expand_builtin): Expand BUILT_IN_LOGB{,F,L} and BUILT_IN_ILOGB{,F,L}
      	using expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
      
      	* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_XTRACT_FRACT
      	and UNSPEC_XTRACT_EXP.
      
      	* config/i386/i386.md (*fxtractdf3, *fxtractsf3, *fxtractxf3): New
      	patterns to implement fxtract x87 instruction.
      	(logbdf2, logbsf2, logbxf2, ilogbsi2): New expanders to implement
      	logb, logbf, logbl, ilogb, ilogbf and ilogbl built-ins as inline x87
      	intrinsics.
      	(UNSPEC_XTRACT_FRACT, UNSPEC_XTRACT_EXP): New unspecs to represent
      	x87's fxtract insn.
      
      	* gcc.dg/builtins-38.c: New test.
      
      From-SVN: r80709
      Uros Bizjak committed
  3. 06 Apr, 2004 1 commit
    • builtins.c: Implement support for sincos function. · 6c7cf1f0
      2004-04-06  Uros Bizjak  <uros@kss-loka.si>
      
      	* builtins.c: Implement support for sincos function.
      	(expand_builtin_mathfn): Remove BUILT_IN_SIN{,F,L} and
      	BUILT_IN_COS{,F,L}.
      	(expand_builtin_mathfn_3): New function.
      	(expand_builtin): Expand BUILT_IN_SIN{,F,L} and
      	BUILT_IN_COS{,F,L} using expand_builtin_mathfn_3 if
      	flag_unsafe_math_optimization is set.
      
      	* optabs.h (enum optab_index): Add new OTI_sincos.
      	(sincos_optab): Define corresponding macro.
      
      	* optabs.c (init_optabs): Initialize sincos_optab.
      	(expand_twoval_unop): New function.
      
      	* genopinit.c (optabs): Implement sincos_optab using sincos?f3
      	patterns.
      
      	* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_SINCOS_COS
      	and UNSPEC_SINCOS_SIN.
      
      	* config/i386/i386.md (sincosdf3, sincossf3, *sincosextendsfdf3,
      	sincosxf3): New patterns to implement sincos, sincosf and sincosl
      	built-ins as inline x87 intrinsics. Define splits for
      	sindf2, sinsf2, *sinextendsfdf2, sinxf2, cosdf2,
      	cossf2, *cosextendsfdf2 and cosxf2 patterns from corresponding
      	sincos patterns.
      	(sindf2, sinsf2, sinxf2): Rename to *sindf2, *sinsf2, *sinxf2.
      	(cosdf2, cossf2, cosxf2): Rename to *cosdf2, *cossf2, *cosxf2.
      
      	(UNSPEC_SINCOS_SIN, UNPEC_SINCOS_COS): New unspecs to represent
      	x87's unspec insn.
      
      	* gcc.dg/builtins-36.c: New test.
      
      From-SVN: r80463
      Uros Bizjak committed
  4. 10 Mar, 2004 1 commit
    • optabs.h (enum optab_index): Add new OTI_exp10 and OTI_exp2. · a251102e
      2004-03-10  Uros Bizjak  <uros@kss-loka.si>
      
      	* optabs.h (enum optab_index): Add new OTI_exp10 and OTI_exp2.
      	(exp10_optab, exp2_optab): Define corresponding macros.
      	* optabs.c (init_optabs): Initialize exp10_optab and exp2_optab.
      	* genopinit.c (optabs): Implement exp10_optab and exp2_optab
      	using exp10?f2 and exp2?f2 patterns.
      	* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXP10{,F,L}
      	using exp10_optab, and BUILT_IN_EXP2{,F,L} using exp2_optab.
      	(expand_builtin): Expand BUILT_IN_EXP10{,F,L} and BUILT_IN_EXP2{,F,L}
      	using expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
      
      	* config/i386/i386.md (exp10sf2, exp10df2, exp10xf2, exp2sf2,
      	exp2df2, exp2xf2): New patterns to implement exp10, exp10f, exp10l,
      	exp2, exp2f and exp2l built-ins as inline x87 intrinsics.
      
      	* gcc.dg/builtins-34.c: New test.
      
      From-SVN: r79279
      Uros Bizjak committed
  5. 11 Feb, 2004 1 commit
    • optabs.h (enum optab_index): Add new OTI_log10 and OTI_log2. · 3b8e0c91
      2004-02-11  Uros Bizjak  <uros@kss-loka.si>
      
      	* optabs.h (enum optab_index): Add new OTI_log10 and OTI_log2.
      	(log10_optab, log2_optab): Define corresponding macros.
      	* optabs.c (init_optabs): Initialize log10_optab and log2_optab.
      	* genopinit.c (optabs): Implement log10_optab and log2_optab
      	using log10?f2 and log2?f2 patterns.
      	* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOG10{,F,L}
      	using log10_optab, and BUILT_IN_LOG2{,F,L} using log2_optab.
      	(expand_builtin): Expand BUILT_IN_LOG10{,F,L} and BUILT_IN_LOG2{,F,L}
      	using expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
      
      	* config/i386/i386.md (log10sf2, log10df2, log10xf2, log2sf2,
      	log2df2, log2xf2): New patterns to implement log10, log10f, log10l,
      	log2, log2f and log2l built-ins as inline x87 intrinsics.
      
      	* gcc.dg/builtins-33.c: New test.
      
      From-SVN: r77675
      Uros Bizjak committed
  6. 21 Jan, 2004 1 commit
    • alias.c, [...]: Update copyright. · d9221e01
      	* alias.c, basic-block.h, c-common.c, c-common.h,
      	c-cppbuiltin.c, c-opts.c, c-pragma.c, c-pretty-print.c,
      	calls.c, cfg.c, cfgcleanup.c, cfgrtl.c, cgraph.h, collect2.c,
      	combine.c, cppcharset.c, cpphash.h, cppinit.c, cpplib.c,
      	cpplib.h, cppmacro.c, crtstuff.c, cselib.c, cselib.h,
      	defaults.h, df.c, dominance.c, et-forest.c, expmed.c, expr.c,
      	expr.h, fix-header.c, function.h, gcc.c, gcse.c, genattrtab.c,
      	genautomata.c, genconditions.c, genemit.c, genflags.c,
      	gengtype.c, gengtype.h, genopinit.c, genrecog.c, gensupport.c,
      	ggc-zone.c, graph.c, haifa-sched.c, input.h, integrate.c,
      	langhooks-def.h, langhooks.c, langhooks.h, line-map.c,
      	line-map.h, local-alloc.c, optabs.c, optabs.h, postreload.c,
      	ra.h, recog.c, reg-stack.c, regmove.c, reload.c, reorg.c,
      	rtl.c, sched-deps.c, sched-ebb.c, sdbout.c, system.h,
      	target.h, targhooks.c, toplev.h, tree-inline.c, unwind-pe.h,
      	unwind.h, varray.c, varray.h: Update copyright.
      
      From-SVN: r76302
      Kazu Hirata committed
  7. 01 Jan, 2004 1 commit
    • expmed.c (store_bit_field, [...]): Use new named patterns · 997404de
      	* expmed.c (store_bit_field, extract_bit_field): Use new named patterns
      	* expr.c (store_constructor): Use vec_init pattern.
      	* genopinit.c (optabs): Initailize vec_set/vec_extract/vec_init.
      	* optabs.h (optab_index): ADD OTI_vec_set/OTI_vec_extract/OTI_vec_init
      	(vec_set_optab, vec_extract_optab, vec_init_optab): New.
      	* i386.md (vec_setv2df, vec_extractv2df, vec_setv4sf, vec_extractv4sf):
      	New patterns.
      	(sse2_unpc?pd): Fix pattern.
      	(sse2_movlpd): Kill.
      	(sse2_movsd): Deal with movlpd too.
      	* i386.c (ix86_expand_builtin): Use sse2_movsd instead of sse2_movlpd.
      	(ix86_expand_vector_init): New.
      	* emmintrin.h (__mm_set_pd, __mm_set_ps): Use vector extensions.
      	* md.texi (vec_set, vec_extract): Document
      
      From-SVN: r75304
      Jan Hubicka committed
  8. 07 Oct, 2003 2 commits
    • expr.c (cmpstr_optab, [...]): New. · 118355a0
      	* expr.c (cmpstr_optab, cmpmem_optab): New.
      	* genopinit.c: Initialize them.
      	* optabs.h: Declare them.
      	* optabs.c (init_optabs): Clear them.
      	(prepare_cmp_insn):  Use cmpstr_optab and cmpmem_optab to find
      	block memory compare insns, not conditional chains.  Restructure
      	the fallback generation of a call to memcmp/bcmp for better
      	readability.
      
      From-SVN: r72185
      Zack Weinberg committed
    • * libfuncs.h (LTI_extendsfdf2, LTI_extendsfxf2, LTI_extendsftf2) · 85363ca0
      	(LTI_extenddfxf2, LTI_extenddftf2, LTI_truncdfsf2, LTI_truncxfsf2)
      	(LTI_trunctfsf2, LTI_truncxfdf2, LTI_trunctfdf2, LTI_floatsisf)
      	(LTI_floatdisf, LTI_floattisf, LTI_floatsidf, LTI_floatdidf)
      	(LTI_floattidf, LTI_floatsixf, LTI_floatdixf, LTI_floattixf)
      	(LTI_floatsitf, LTI_floatditf, LTI_floattitf, LTI_fixsfsi, LTI_fixsfdi)
      	(LTI_fixsfti, LTI_fixdfsi, LTI_fixdfdi, LTI_fixdfti, LTI_fixxfsi)
      	(LTI_fixxfdi, LTI_fixxfti, LTI_fixtfsi, LTI_fixtfdi, LTI_fixtfti)
      	(LTI_fixunssfsi, LTI_fixunssfdi, LTI_fixunssfti, LTI_fixunsdfsi)
      	(LTI_fixunsdfdi, LTI_fixunsdfti, LTI_fixunsxfsi, LTI_fixunsxfdi)
      	(LTI_fixunsxfti, LTI_fixunstfsi, LTI_fixunstfdi, LTI_fixunstfti)
      	(extendsfdf2_libfunc, extendsfxf2_libfunc, extendsftf2_libfunc)
      	(extenddfxf2_libfunc, extenddftf2_libfunc, truncdfsf2_libfunc)
      	(truncxfsf2_libfunc, trunctfsf2_libfunc, truncxfdf2_libfunc)
      	(trunctfdf2_libfunc, floatsisf_libfunc, floatdisf_libfunc)
      	(floattisf_libfunc, floatsidf_libfunc, floatdidf_libfunc)
      	(floattidf_libfunc, floatsixf_libfunc, floatdixf_libfunc)
      	(floattixf_libfunc, floatsitf_libfunc, floatditf_libfunc)
      	(floattitf_libfunc, fixsfsi_libfunc, fixsfdi_libfunc, fixsfti_libfunc)
      	(fixdfsi_libfunc, fixdfdi_libfunc, fixdfti_libfunc, fixxfsi_libfunc)
      	(fixxfdi_libfunc, fixxfti_libfunc, fixtfsi_libfunc, fixtfdi_libfunc)
      	(fixtfti_libfunc, fixunssfsi_libfunc, fixunssfdi_libfunc)
      	(fixunssfti_libfunc, fixunsdfsi_libfunc, fixunsdfdi_libfunc)
      	(fixunsdfti_libfunc, fixunsxfsi_libfunc, fixunsxfdi_libfunc)
      	(fixunsxfti_libfunc, fixunstfsi_libfunc, fixunstfdi_libfunc)
      	(fixunstfti_libfunc): Delete.
      	* optabs.h (struct optab_handlers): Break out of struct optab.
      	(struct convert_optab, convert_optab, enum convert_optab_index,
      	convert_optab_table, sext_optab, zext_optab, trunc_optab,
      	sfix_optab, ufix_optab, sfixtrunc_optab, ufixtrunc_optab,
      	sfloat_optab, ufloat_optab): New.
      	(set_conv_libfunc): Prototype.
      	(GEN_FCN): Use C90 indirect call syntax, remove unnecessary cast.
      	(trunc_optab): Renamed btrunc_optab.
      	* builtins.c (expand_builtin_mathfn): Update to match.
      	* optabs.c (extendtab, fixtab, fixtrunctab, floattab): Delete.
      	(convert_optab_table, new_convert_optab, init_convert_optab)
      	(init_interclass_conv_libfuncs, init_intraclass_conv_libfuncs)
      	(set_conv_libfunc): New.
      	(can_extend_p, gen_extend_insn, can_fix_p, can_float_p)
      	(expand_float, expand_fix): Use new conversion optabs,
      	not old insn code tables or long chains of ifs.
      	(init_optabs): No need to clear old insn code tables.
      	Initialize the new optabs, not the old libfunc array entries.
      	Don't handle FIXUNS_TRUNC_LIKE_FIX_TRUNC here.
      	* genopinit.c: Initialize conversion optabs, not the
      	former insn code tables.  Remove unnecessary casts.
      	Handle FIXUNS_TRUNC_LIKE_FIX_TRUNC here.
      	* expr.c (convert_move): Remove redundant check that
      	to_real==from_real.  Use the conversion optabs instead
      	of long chains of tests of modes.  Move partial-integer-mode
      	interconversion above all integer conversion.  Do not recurse
      	on a value forced into a register in the original mode.
      
      	* config/gofast.h, config/frv/frv.c, config/ia64/ia64.c
      	* config/mips/mips.c, config/pa/pa.c, config/rs6000/rs6000.c
      	* config/sparc/sparc.c: Use set_conv_libfunc to adjust entries
      	in new conversion optabs; do not reference the old libfunc
      	array entries.  No need to include libfuncs.h.
      
      From-SVN: r72178
      Zack Weinberg committed
  9. 04 Oct, 2003 1 commit
    • * libfuncs.h · c9034561
      	(LTI_eqhf2, LTI_nehf2, LTI_gthf2, LTI_gehf2, LTI_lthf2)
      	(LTI_lehf2, LTI_unordhf2, LTI_eqsf2, LTI_nesf2, LTI_gtsf2)
      	(LTI_gesf2, LTI_ltsf2, LTI_lesf2, LTI_unordsf2, LTI_eqdf2)
      	(LTI_nedf2, LTI_gtdf2, LTI_gedf2, LTI_ltdf2, LTI_ledf2)
      	(LTI_unorddf2, LTI_eqxf2, LTI_nexf2, LTI_gtxf2, LTI_gexf2)
      	(LTI_ltxf2, LTI_lexf2, LTI_unordxf2, LTI_eqtf2, LTI_netf2)
      	(LTI_gttf2, LTI_getf2, LTI_lttf2, LTI_letf2, LTI_unordtf2)
      	(eqhf2_libfunc, nehf2_libfunc, gthf2_libfunc, gehf2_libfunc)
      	(lthf2_libfunc, lehf2_libfunc, unordhf2_libfunc, eqsf2_libfunc)
      	(nesf2_libfunc, gtsf2_libfunc, gesf2_libfunc, ltsf2_libfunc)
      	(lesf2_libfunc, unordsf2_libfunc eqdf2_libfunc, nedf2_libfunc)
      	(gtdf2_libfunc, gedf2_libfunc, ltdf2_libfunc, ledf2_libfunc)
      	(unorddf2_libfunc eqxf2_libfunc, nexf2_libfunc, gtxf2_libfunc)
      	(gexf2_libfunc, ltxf2_libfunc, lexf2_libfunc, unordxf2_libfunc
      	(eqtf2_libfunc, netf2_libfunc, gttf2_libfunc, getf2_libfunc)
      	(lttf2_libfunc, letf2_libfunc, unordtf2_libfunc):
      	Delete.
      	* optabs.h (OTI_eq, OTI_ne, OTI_gt, OTI_ge, OTI_lt, OTI_le)
      	(OTI_unord, eq_optab, ne_optab, gt_optab, ge_optab, lt_optab)
      	(le_optab, unord_optab): New.
      
      	* optabs.c (prepare_float_lib_cmp): Rewrite.  Get the libfuncs
      	from the code_to_optab table, not a giant switch; use
      	swap_condition; do widening only if a comparison function that
      	we can call exists in a wider mode, not if a cmp_optab insn or
      	libfunc exists in a wider mode; call protect_from_queue
      	exactly once on each operand.
      	(init_optabs): Initialize the new optabs, not the deleted libfuncs.
      
      	* config/gofast.h, config/ia64/ia64.c, config/mips/mips.c
      	* config/pa/pa.c, config/rs6000/rs6000.c, config/sparc/sparc.c:
      	Set floating point comparison libfuncs using set_optab_libfunc
      	on the appropriate optab.
      
      	* config/ia64/ia64.c (ia64_hpux_init_libfuncs): Fix typo.
      	* config/rs6000/rs6000.c (rs6000_init_libfuncs): Correct ABI
      	selector conditionals.
      
      From-SVN: r72101
      Zack Weinberg committed
  10. 02 Oct, 2003 1 commit
    • target.h (init_libfuncs): New hook. · c15c90bb
      	* target.h (init_libfuncs): New hook.
      	* target-def.h: Default TARGET_INIT_BUILTINS and
      	TARGET_INIT_LIBFUNCS to hook_void_void.  Add
      	TARGET_INIT_LIBFUNCS to TARGET_INITIALIZER.
      	* builtins.c (default_init_builtins): Delete.
      	* expr.h (default_init_builtins): Delete prototype.
      	* doc/tm.texi: Document TARGET_INIT_LIBFUNCS and US_SOFTWARE_GOFAST.
      	Tweak documentation of TARGET_FLOAT_LIB_COMPARE_RETURNS_BOOL.
      	Remove documentation of INIT_TARGET_OPTABS, MULSI3_LIBCALL,
      	DIVSI3_LIBCALL, UDIVSI3_LIBCALL, MODSI3_LIBCALL, UMODSI3_LIBCALL,
      	MULDI3_LIBCALL, DIVDI3_LIBCALL, UDIVDI3_LIBCALL, MODDI3_LIBCALL,
      	and UMODDI3_LIBCALL,
      
      	* Makefile.in (optabs.o): Depends on target.h.
      	* defaults.h: Provide default for FLOAT_LIB_COMPARE_RETURNS_BOOL.
      	* optabs.c: Include target.h.
      	(prepare_float_lib_cmp): No need for #ifdef around use of
      	FLOAT_LIB_COMPARE_RETURNS_BOOL.
      	(set_optab_libfunc): New function.
      	(init_optabs): Delete use of all *_LIBCALL defines.
      	Call targetm.init_libfuncs not INIT_TARGET_OPTABS.
      	* optabs.h: Prototype set_optab_libfunc.
      
      	* config.gcc: Remove all references to pa/long_double.h,
      	ia64/hpux_longdouble.h, and gofast.h.
      	(mips-*-*): When --enable-gofast, just add US_SOFTWARE_GOFAST
      	to tm_defines; don't set INIT_SUBTARGET_OPTABS or change tm_file.
      
      	* config/alpha/alpha.c, config/c4x/c4x.c, config/cris/cris.c
      	* config/frv/frv.c, config/h8300/h8300.c, config/i860/i860.c
      	* config/ia64/ia64.c, config/ip2k/ip2k.c, config/m68hc11/m68hc11.c
      	* config/mips/mips.c, config/pa/pa.c, config/rs6000/rs6000.c
      	* config/sparc/sparc.c, config/vax/vax.c:
      	Provide a definition for TARGET_INIT_LIBFUNCS.  Where
      	necessary, include optabs.h, libfuncs.h, and/or config/gofast.h.
      
      	* config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.h
      	* config/avr/avr.h, config/cris/cris.h, config/frv/frv.h
      	* config/h8300/h8300.h, config/i860/i860.h, config/ip2k/ip2k.h
      	* config/iq2000/iq2000.h, config/m68hc11/m68hc11.h, config/mips/mips.h
      	* config/rs6000/aix.h, config/rs6000/sysv4.h, config/sparc/elf.h
      	* config/sparc/lite.h, config/sparc/netbsd-elf.h, config/sparc/sol2.h
      	* config/sparc/sparc.h, config/v850/v850.h, config/vax/vax.h
      	* config/vax/elf.h: Don't define or use INIT_TARGET_OPTABS,
      	INIT_SUBTARGET_OPTABS, or any *_LIBCALL macros.
      
      	* config/ia64/hpux.h: Redefine INTEL_EXTENDED_IEEE_FORMAT to 0.
      	Set TARGET_INIT_LIBFUNCS and FLOAT_LIB_COMPARE_RETURNS_BOOL here.
      	* config/pa/pa-hpux.h: Define LONG_DOUBLE_TYPE_SIZE,
      	HPUX_LONG_DOUBLE_LIBRARY, and FLOAT_LIB_COMPARE_RETURNS_BOOL here.
      	* config/ia64/hpux_longdouble.h, config/pa/long_double.h: Delete.
      
      	* config/rs6000/xcoff.h: Don't define RS6000_ITRUNC nor RS6000_UITRUNC.
      	* config/sparc/sparc.h: Default SUN_CONVERSION_LIBFUNCS and
      	SUN_INTEGER_MULTIPLY_64 to 0.
      	* config/sparc/sol2.h: Redefine SUN_CONVERSION_LIBFUNCS and
      	SUN_INTEGER_MULTIPLY_64 to 1.
      	* config/sparc/elf.h: Redefine SUN_CONVERSION_LIBFUNCS and
      	SUN_INTEGER_MULTIPLY_64 to 0.
      	* config/sparc/lite.h, config/sparc/liteelf.h, config/sparc/sp86x-elf.h:
      	Define US_SOFTWARE_GOFAST.
      	* config/vax/vax.h: Default TARGET_ELF to 0.
      	* config/vax/elf.h: Redefine TARGET_ELF to 1.
      
      	* config/gofast.h: Don't define any macros here.  Provide one
      	static function, gofast_maybe_init_libfuncs, which does what
      	INIT_GOFAST_LIBFUNCS used to do but only if US_SOFTWARE_GOFAST
      	is already defined.  Do not clear negation libfuncs.  Do
      	not mess with HFmode, XFmode, or TFmode libfuncs.
      
      	* config/avr/avr.c (avr_init_once): #if 0 out; mark FIXME.
      
      From-SVN: r72009
      Zack Weinberg committed
  11. 06 Jul, 2003 1 commit
    • jump.c: Convert prototypes to ISO C90. · 0c20a65f
      	* jump.c: Convert prototypes to ISO C90.
      	* langhooks-def.h: Likewise.  Add extern to prototypes.
      	* langhooks.c: Likewise.
      	* langhooks.h: Likewise.
      	* lcm.c: Likewise.
      	* local-alloc.c: Likewise.
      	* loop-init.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* loop-unswitch.c: Likewise.
      	* loop.c: Likewise.
      	* loop.h: Likewise. Add extern to prototypes.
      	* machmode.h: Likewise.
      	* main.c: Likewise.
      	* mbchar.c: Likewise.
      	* mbchar.h: Likewise.
      	* mkdeps.c: Likewise.
      	* mkdeps.h: Likewise.
      	* optabs.c: Likewise.
      	* optabs.h: Likewise.
      	* output.h: Likewise.
      	* gccspec.c: Likwise.
      	* postreload.c: Likewise.
      	* prefix.c: Likewise.
      	* prefix.h: Likewise.
      	* print-rtl.c: Likewise.
      	* print-tree.c: Likewise.
      	* profile.c: Likewise.
      	* read-rtl.c: Likewise.
      	* real.c: Likewise.
      	* real.h: Likewise.
      	* recog.c: Likewise.
      	* recog.h: Likewise.
      	* reg-stack.c: Likewise.
      	* regclass.c: Likewise.
      	* regmove.c: Likewise.
      	* regrename.c: Likewise.
      	* regs.h: Likewise.
      	* reload.c: Likewise.
      	* reload.h: Likewise.
      	* reload1.c: Likewise.
      	* reorg.c: Likewise.
      	* resource.c: Likewise.
      	* resource.h: Likewise.
      	* rtl-error.c: Likewise.
      	* rtl.c: Likewise.
      	* rtl.h: Likewise.
      	* rtlanal.c: Likewise.
      
      From-SVN: r68998
      Andreas Jaeger committed
  12. 16 Jun, 2003 1 commit
    • optabs.h (enum optab_index): Add new OTI_tan and OTI_atan. · 82d397c7
      	* optabs.h (enum optab_index): Add new OTI_tan and OTI_atan.
      	(tan_optab, atan_optab): Define corresponding macros.
      	* optabs.c (init_optabs): Initialize tan_optab and atan_optab.
      	* genopinit.c (optabs): Implement tan_optab and atan_optab
      	using tan?f2 and atan?f2 patterns.
      	* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_TAN{,F,L}
      	using tan_optab, and BUILT_IN_ATAN{,F,L} using atan_optab.
      	Change the default value of errno_set to false.
      	(expand_builtin): Expand BUILT_IN_TAN{,F,L} and BUILT_IN_ATAN{,F,L}
      	using expand_builtin_mathfn.
      
      	* config/i386/i386.md (atansf2, atandf2, atanxf2, atantf2): New
      	expander patterns implemented using existing atan2?f3 patterns.
      
      	* gcc.dg/i386-387-5.c: New test case.
      	* gcc.dg/i386-387-6.c: New test case.
      	* gcc.dg/builtins-23.c: New test case.
      
      From-SVN: r68013
      Roger Sayle committed
  13. 03 Jun, 2003 1 commit
  14. 11 Feb, 2003 1 commit
    • optabs.h (enum optab_index): Add new OTI_pow and OTI_atan2. · b5e01d4b
      	* optabs.h (enum optab_index): Add new OTI_pow and OTI_atan2.
      	(pow_optab, atan2_optab): Define corresponding macros.
      	* optabs.c (init_optabs): Initialize pow_optab and atan2_optab.
      	* genopinit.c (optabs): Implement pow_optab and atan2_optab
      	using pow?f3 and atan2?f3 patterns.
      	* builtins.c (expand_errno_check): New function to update errno
      	if necessary, split out from expand_builtin_mathfn.
      	(expand_builtin_mathfn): Use expand_errno_check.
      	(expand_builtin_mathfn_2): New function to handle expanding binary
      	math functions, reusing the code in expand_errno_check.
      	(expand_builtin): Handle the pow and atan2 math built-ins,
      	BUILT_IN_{POW,POWF,POWL,ATAN2,ATAN2F,ATAN2L} via the new function
      	expand_builtin_mathfn_2.
      
      	* doc/md.texi: Document new pow?f3 and atan2?f3 patterns.
      
      From-SVN: r62708
      Roger Sayle committed
  15. 01 Feb, 2003 1 commit
    • [multiple changes] · 2928cd7a
      2003-02-01  Richard Henderson  <rth@redhat.com>
      
      	* optabs.c (expand_unop): Use word_mode for outmode of bit scaners.
      	* libgcc2.c (__ffsdi2, __clzsi2, __clzdi2, __ctzsi2, __ctzdi2,
      	__popcountsi2, __popcountdi2, __paritysi2 __paritydi2): Change
      	return type to Wtype.
      
      	* libgcc-std.ver (GCC_3.4): Fix inheritance.
      
      	* config/i386/i386.md (ffssi2): Use nonimmediate_operand for
      	expander input constraint.
      
      2003-02-01  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
      
              * optabs.h (optab_index): Add OTI_clz, OTI_ctz, OTI_popcount and
              OTI_parity.
              (clz_optab, ctz_optab, popcount_optab, parity_optab): New.
              * optabs.c (widen_clz, expand_parity): New.
              (expand_unop): Handle clz and parity.  Hardcode SImode as outmode
              for libcalls to clz, ctz, popcount, and parity.
              (init_optabs): Init clz_optab, ctz_optab, popcount_optab and
              parity_optab, and set up libfunc handlers.
              * libgcc2.c (__clzsi2, __clzdi2, __ctzsi2, __ctzdi2,
              __popcountsi2, __popcountdi2, __paritysi2 __paritydi2,
              __popcount_tab): New.
              * libgcc2.h: Declare them.
              * libgcc-std.ver (GCC_3.4): Add new functions from libgcc2.c.
              * genopinit.c (optabs): Add clz_optab, ctz_optab, popcount_optab
              and parity_optab.
              * builtin-types.def (BT_FN_INT_LONG, BT_FN_INT_LONGLONG): New.
              * builtins.def (BUILT_IN_CLZ, BUILT_IN_CTZ, BUILT_IN_POPCOUNT,
              BUILT_IN_PARITY, BUILT_IN_FFSL, BUILT_IN_CLZL, BUILT_IN_CTZL,
              BUILT_IN_POPCOUNTL, BUILT_IN_PARITYL, BUILT_IN_FFSLL,
              BUILT_IN_CLZLL, BUILT_IN_CTZLL, BUILT_IN_POPCOUNTLL,
              BUILT_IN_PARITYLL): New.
              * builtins.c (expand_builtin_unop): Rename from expand_builtin_ffs
              and add optab argument.
              (expand_builtin): Expand BUILT_IN_{FFS,CLZ,POPCOUNT,PARITY}*.
              * tree.def (CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR, PARITY_EXPR): New.
              * expr.c (expand_expr): Handle them.
              * fold-const.c (tree_expr_nonnegative_p): Likewise.
              * rtl.def (CLZ, CTZ, POPCOUNT, PARITY): New.
              * reload1.c (eliminate_regs): Handle them.
              (elimination_effects): Likewise.
              * function.c (instantiate_virtual_regs_1): Likewise
              * genattrtab.c (check_attr_value): Likewise.
              * simplify-rtx.c (simplify_unary_operation): Likewise.
              * c-common.c (c_common_truthvalue_conversion): Handle POPCOUNT_EXPR.
              * combine.c (combine_simplify_rtx): Handle POPCOUNT and PARITY.
              (nonzero_bits): Handle CLZ, CTZ, POPCOUNT and PARITY.
              * config/alpha/alpha.md (clzdi2, ctzdi2, popcountdi2): New.
              * config/arm/arm.c (arm_init_builtins): Rename __builtin_clz to
              __builtin_arm_clz.
              * Makefile.in (LIB2FUNCS_1, LIB2FUNCS_2): Move...
              * mklibgcc.in (lib2funcs): ...here and merge.  Add new members.
              * doc/extend.texi (Other Builtins): Add new builtins.
              * doc/md.texi (Standard Names): Add new patterns.
      
      From-SVN: r62252
      Richard Henderson committed
  16. 10 Jan, 2003 1 commit
  17. 07 Jan, 2003 1 commit
    • re PR target/8322 (SSE2 intrinsics broken?) · 068f5dea
      	* genopinit.c (optabs): Add addc_optab.
      	* ifcvt.c (noce_try_store_flag): Rename to ...
      	(noce_try_addcc): ... this one; handle generic conditional increment.
      	(noce_process_if_block): Update noce_try_addcc call.
      	* optabs.c (emit_conditional_add): New.
      	(init_obtabs): Initialize addc_optab.
      	* optabs.h (optab_index): Add OTI_addcc.
      	(addcc_optab): New macro.
      	* md.texi: Document addMcc
      
      	PR target/8322
      	* i386.c (ix86_init_mmx_sse_builtins): Constify arguments of loads.
      	* xmmintrin.h (_mm_load*_si128. _mm_store*_si128): Add casts.
      	* xmmintrin.h (_mm_load*_si128. _mm_store*_si128): Add casts.
      
      	* reload1.c (delete_output_reload): Avoid repeated attempts
      	to delete insn.
      
      From-SVN: r61019
      Jan Hubicka committed
  18. 16 Dec, 2002 1 commit
  19. 03 Aug, 2002 1 commit
    • builtins.def: Define new builtin functions exp... · e7b489c8
      	* builtins.def: Define new builtin functions exp, expf, expl,
      	log, logf and logl (and their __builtin_* variants).
      	* optabs.h (enum optab_index): Add new OTI_exp and OTI_log.
      	Define exp_optab and log_optab.
      	* optabs.c (init_optans): Initialize exp_optab and log_optab.
      	* genopinit.c (optabs): Implement exp_optab and log_optab
      	using exp?f2 and log?f2 patterns.
      	* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXP*
      	and BUILT_IN_LOG* using exp_optab and log_optab respectively.
      	(expand_builtin): Ignore the new builtins (and all cos and
      	sin variants) when not optimizing.  Expand new builtins via
      	expand_builtin_mathfn when flag_unsafe_math_optimizations.
      
      	* doc/extend.texi: Document new exp and log builtins.
      	* doc/md.texi: Document new exp?f2 and log?f2 patterns
      	(and previously undocumented cos?f2 and sin?f2 patterns).
      
      From-SVN: r56010
      Roger Sayle committed
  20. 04 Jun, 2002 1 commit
  21. 15 Nov, 2001 1 commit
    • alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P. · a06ef755
      	* alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P.
      	* emit-rtl.c (change_address): Fix typo in default alignment.
      	(adjust_address_1): Use mode of NEW, not MODE, when setting size.
      	* expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case.
      	* rtl.h (REGNO_PTR_FRAME_P): New macro.
      
      	* expr.c (store_field): Pass tree instead of max size; callers changed.
      	Change handling of alignment.
      	Only copy to_rtx if is TARGET.
      	(expand_expr_unaligned): Delete; callers now use expand_expr.
      	(emit_cmp_insn): No longer take ALIGN parm; all callers changed.
      	(expand_assignment): Change handling of alignment.
      	Only copy to_rtx if was original.
      	(get_inner_reference): No longer return alginment; callers changed.
      	(expand_expr, case COMPONENT_REF): Change handling of alignment.
      	(expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned.
      	(compare_from_rtx): Delete ALIGN parm; all callers changed.
      	(do_compare_rtx_and_jump): Likewise.
      	* expr.h: Reflect above changes.
      	* tree.h: Likewise.
      	* dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter
      	to get_inner_reference.
      	* except.c: Remove ALIGN parameter in call to emit_cmp_and_jump_insns.
      	* explow.c: Likewise.
      	* loop.c: Likewise.
      	* optabs.c: Likewise.
      	(prepare_cmp_insn): Now static; remove ALIGN parm.  Callers changed.
      	(emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed.
      	* fold-const.c: Remove PALIGN in calls to get_inner_reference.
      	* function.c (assign_stack_temp_for_type): No longer static.
      	* optabs.h (emit_cmp_insn): Remove ALIGN parm.
      	(prepare_cmp_insn): Delete declaration.
      	* rtl.h (assign_stack_temp_for_type): Add declaration.
      	* config/d30v/d30v.c: Reflect above changes.
      	* config/i860/i860.c, config/ia64/ia64.c: Likewise.
      	* config/rs6000/rs6000.c, config/sh/sh.c: Likewise.
      	* ada/trans.c, ada/utils2.c: Remove PALIGN parameter to
      	get_inner_reference.
      
      From-SVN: r47075
      Richard Kenner committed
  22. 09 Oct, 2001 1 commit
    • acconfig.h: Fix comment formatting. · 19eb1ad7
      	* acconfig.h: Fix comment formatting.
      	* c-dump.h: Likewise.
      	* c-tree.h: Likewise.
      	* conditions.h: Likewise.
      	* expr.h: Likewise.
      	* function.h: Likewise.
      	* gthr.h: Likewise.
      	* hwint.h: Likewise.
      	* integrate.h: Likewise.
      	* intl.h: Likewise.
      	* loop.h: Likewise.
      	* optabs.h: Likewise.
      
      From-SVN: r46131
      Kazu Hirata committed
  23. 23 Aug, 2001 1 commit
  24. 18 Aug, 2001 1 commit
    • optabs.h (OTI_flodiv, [...]): Kill. · ef89d648
      	* optabs.h (OTI_flodiv, flodiv_optab): Kill.
      	* genopinit.c: Put floating point divide insns in sdiv_optab.
      	* expr.c (expand_expr): Use sdiv_optab, not flodiv_optab.
      	* config/gofast.h, config/c4x/c4x.h,
      	config/ia64/hpux_longdouble.h, config/mips/mips.h,
      	config/pa/long_double.h, config/rs6000/sysv4.h,
      	config/sparc/sparc.h: Put floating point divide libcalls in sdiv_optab.
      	* optabs.c (init_optab): Break into new_optab, init_optab, init_optabv.
      	(init_optabs): Use init_optabv for overflow-trapping optabs.
      	Don't init flodiv_optab.  Give mov_optab, movstrict_optab, and
      	cmp_optab RTX codes so have_insn_for can find them.
      
      	* optabs.c (expand_simple_binop, expand_simple_unop,
      	have_insn_for, gen_sub3_insn): New interfaces.
      	* expr.h: Prototype new functions.
      	(enum optab_methods): Move here from optabs.h.
      
      	* builtins.c, combine.c, doloop.c, function.c, ifcvt.c,
      	loop.c, profile.c, simplify-rtx.c, stmt.c, unroll.c:
      	Use new	functions instead of working directly with optabs.
      	* doloop.c, ifcvt.c, loop.c, profile.c, simplify-rtx.c,
      	unroll.c: Don't include optabs.h.
      	* caller-save.c, combine.c, function.c, stmt.c: Just include
      	insn-codes.h, not optabs.h.
      	* Makefile.in: Update dependencies.
      
      	* combine.c (make_compound_operation, simplify_comparison):
      	Fix typos testing for this or that instruction.
      
      From-SVN: r45008
      Zack Weinberg committed
  25. 13 Aug, 2001 1 commit
    • expr.h: Split out optab- and libfunc-related code to... · e78d8e51
      	* expr.h: Split out optab- and libfunc-related code to...
      	* optabs.h, libfuncs.h: ... these new headers.
      
      	* Makefile.in (CONFIG_H, EXPR_H): Take out insn-codes.h.
      	(OPTABS_H): New.
      	(various .o rules): Add $(OPTABS_H) and/or libfuncs.h to
      	dependencies.
      	* mkconfig.sh: Don't include insn-codes.h from config.h.
      
      	* reload.h: Use #ifdef GCC_INSN_CODES_H to decide whether
      	enum insn_code is available.  Move reload_in_optab and
      	reload_out_optab array declarations to optabs.h.
      	* regmove.c (gen_add3_insn): Move to optabs.c, export from
      	there, prototype in expr.h.
      	* gencodes.c: Cleanup: zap global variables, don't use
      	printf where puts will do, don't bother defining MAX_INSN_CODE
      	which nothing uses, let CODE_FOR_nothing get its value implicitly.
      
      	* genemit.c, genopinit.c: Include optabs.h in generated file.
      	* genoutput.c: Include insn-codes.h in generated file.
      	* builtins.c, caller-save.c, combine.c, doloop.c, explow.c,
      	expmed.c, expr.c, function.c, ifcvt.c, loop.c, optabs.c, profile.c,
      	reload1.c, simplify-rtx.c, stmt.c, unroll.c, config/alpha/alpha.c,
      	config/arm/arm.c, config/c4x/c4x.c, config/clipper/clipper.c,
      	config/i386/i386.c, config/ia64/ia64.c, config/mn10300/mn10300.c,
      	config/pj/pj.c, config/sh/sh.c, config/sparc/sparc.c:
      	Include optabs.h.
      	* builtins.c, calls.c, dwarf2out.c, except.c, expr.c, function.c,
      	optabs.c, stmt.c, config/c4x/c4x.c, config/clipper/clipper.c,
      	config/m88k/m88k.c, config/sparc/sparc.c:
      	Include libfuncs.h.
      	* reload.c: Include expr.h and optabs.h before reload.h.
      	* config/alpha/alpha.c: Include tree.h before reload.h.
      	* config/pa/pa.c: Include expr.h, optabs.h, libfuncs.h,
      	and reload.h in that order.
      	* config/sparc/sparc.c: Include debug.h.
      	* recog.c: Include insn-codes.h.
      
      cp:
      	* Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
      	* except.c: Include libfuncs.h.
      java:
      	* Make-lang.in (java/decl.o): Update dependencies.
      	* decl.c: Include libfuncs.h, don't include toplev.h.
      
      From-SVN: r44858
      Zack Weinberg committed