aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
AgeCommit message (Collapse)AuthorFilesLines
2003-04-15optabs.c (expand_binop): In multi-word add cases, ensure XTARGET is copied ↵Richard Kenner1-1/+2
to TARGET if they are different. * optabs.c (expand_binop): In multi-word add cases, ensure XTARGET is copied to TARGET if they are different. From-SVN: r65632
2003-04-11rtl.def (SYMBOL_REF): Add two 0 fields.Richard Henderson1-2/+9
* rtl.def (SYMBOL_REF): Add two 0 fields. * gengtype.c (adjust_field_rtx_def): Handle them. * print-rtl.c (print_rtx): Print them. * rtl.h (SYMBOL_REF_DECL, SYMBOL_REF_FLAGS): New. (SYMBOL_FLAG_FUNCTION, SYMBOL_REF_FUNCTION_P): New. (SYMBOL_FLAG_LOCAL, SYMBOL_REF_LOCAL_P): New. (SYMBOL_FLAG_SMALL, SYMBOL_REF_SMALL_P): New. (SYMBOL_FLAG_TLS_SHIFT, SYMBOL_REF_TLS_MODEL): New. (SYMBOL_FLAG_EXTERNAL, SYMBOL_REF_EXTERNAL_P): New. (SYMBOL_FLAG_MACH_DEP): New. * optabs.c (init_one_libfunc): Zap fake SYMBOL_REF_DECL. * varasm.c (make_decl_rtl): Set SYMBOL_REF_DECL. (assemble_static_space): Set SYMBOL_REF_FLAGS. (assemble_trampoline_template): Likewise. (output_constant_def, force_const_mem): Likewise. (default_encode_section_info): New. * output.h: Declare it. * target-def.h (TARGET_ENCODE_SECTION_INFO): Use it. From-SVN: r65479
2003-04-11libfuncs.h (LTI_setbits, [...]): New.Richard Henderson1-2/+5
* libfuncs.h (LTI_setbits, LTI_gcov_flush, LTI_gcov_init): New. (setbits_libfunc, gcov_flush_libfunc, gcov_init_libfunc): New. * optabs.c (init_optabs): Initialize them. (init_libfuncs): Use init_one_libfunc. * calls.c (expand_call): Use gcov_flush_libfunc. * expr.c (store_constructor): Use setbits_libfunc. * function.c (expand_main_function): Use init_one_libfunc. * profile.c (create_profiler): Use gcov_init_libfunc and DECL_RTL. From-SVN: r65478
2003-04-09optabs.c: Comment that gen_add2_insn and others may actually return emitted ↵Alexandre Oliva1-2/+3
insns... * optabs.c: Comment that gen_add2_insn and others may actually return emitted insns, if the gen functions turn out to return emitted insns. * reload1.c (reload_cse_move2add): Cope with emitted insns from gen_add2_insn. From-SVN: r65400
2003-03-21optabs.c (init_integral_libfuncs): Make sure we init at least up to "long ↵DJ Delorie1-1/+4
long" size words. * optabs.c (init_integral_libfuncs): Make sure we init at least up to "long long" size words. From-SVN: r64670
2003-03-09optabs.c (gen_move_insn): Move logic for synthesizing MODE_CC moves from ↵Hans-Peter Nilsson1-61/+0
here ... * optabs.c (gen_move_insn): Move logic for synthesizing MODE_CC moves from here ... * expr.c (emit_move_insn_1): ... to here. From-SVN: r64015
2003-03-03re PR c/7872 ([m68k]ICE on legal code, regression from 3.0 and 2.9*)James E Wilson1-4/+2
* optabs.c (add_equal_note): Delete SUBREG_REG use. Fixes PR c/7872. From-SVN: r63762
2003-02-26objc-act.c: Include cgraph.hJan Hubicka1-5/+16
* objc-act.c: Include cgraph.h (mark_referenced_methods): New function. (objc_init): Call it. * objc-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Set. * c-decl.c (finish_function): Honor can_defer_p even in unit-at-a-time mode. * optabs.c (expand_fix): Do not widen the input operand. * expr.c (emit_group_store): Fix crash when converting single register into complex register. * Makefile.in (jump.o, regclass.o, alias.o): Add dependency on timevar.h * alias.c: Include timevar.h (init_alias_analysis): Set timevar * jump.c: Include timevar.h (rebuild_jump_labels): Set timevar * regcalss.c: Include timevar.h (reg_scan): Set timevar * timevar.def (TV_ALIAS_ANALYSIS, TV_REG_SCAN, TV_REBUILD_JUMP): New From-SVN: r63464
2003-02-11optabs.h (enum optab_index): Add new OTI_pow and OTI_atan2.Roger Sayle1-0/+2
* 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
2003-02-09libgcc-std.ver (__clztf2): New.Richard Henderson1-13/+15
* libgcc-std.ver (__clztf2): New. (__ctztf2, __popcounttf2, __paritytf2): New. * libgcc2.c (__clzSI2, __clzDI2, __ctzSI2, __ctzDI2, __popcountSI2, __popcountDI2, __paritySI2, __parityDI2): Use UWmode and UDWmode; adjust code to match the different type sizes. * libgcc2.h (__clzSI2, __ctzSI2, __popcountSI2, __paritySI2, __clzDI2, __ctzDI2, __popcountDI2, __parityDI2): New macros. * optabs.c (init_integral_libfuncs): Don't hard-code SImode and TImode; select word_mode and twice that. (init_floating_libfuncs): Don't hard-code SFmode and TFmode; select the modes from float, double, and long double. (init_optabs): Remove duplicate initializations. From-SVN: r62606
2003-02-09optabs.c (expand_unop): Widen clz properly when clz is done via libcall.Kazu Hirata1-0/+8
* optabs.c (expand_unop): Widen clz properly when clz is done via libcall. From-SVN: r62595
2003-02-07* optabs.c (expand_float): Search wider integer modes first.Andrey Petrov1-4/+4
From-SVN: r62535
2003-02-03libgcc2.c (__ffsdi2, [...]): Change return type to "int".Richard Henderson1-1/+1
* libgcc2.c (__ffsdi2, __clzsi2, __clzdi2, __ctzsi2, __ctzdi2, __popcountsi2, __popcountdi2, __paritysi2, __paritydi2): Change return type to "int". Shuffle declarations and undef int trap. * libgcc2.h: Remove their declarations. * optabs.c (expand_unop): Force outmode to int for bitops. From-SVN: r62353
2003-02-01[multiple changes]Richard Henderson1-2/+133
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
2003-01-26optabs.c (expand_binop): Return xtarget if we haven't been able to move the ↵Alexandre Oliva1-0/+2
result to target. * optabs.c (expand_binop) <add, sub>: Return xtarget if we haven't been able to move the result to target. From-SVN: r61829
2003-01-15re PR middle-end/9009 (floating-point negate and abs optimizations incorrect ↵Roger Sayle1-1/+17
for ARM) PR middle-end/9009 * optabs.c (expand_unop): When manipulating the FP sign bit using integer operations, account for targets with different integer and FP word orders. (expand_abs): Likewise. From-SVN: r61335
2003-01-09Makefile.in (optabs.o): Add dependency on basic-block.h.Josef Zlomek1-5/+22
* Makefile.in (optabs.o): Add dependency on basic-block.h. * basic-block.h (control_flow_insn_p): Fuction was exported. * cfgbuild.c (control_flow_insn_p): Fuction was made non-static. * optabs.c (emit_libcall_block): Emit REG_LIBCALL and REG_RETVAL notes only when the region is contained in a single basic block. From-SVN: r61101
2003-01-07re PR target/8322 (SSE2 intrinsics broken?)Jan Hubicka1-0/+129
* 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
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-0/+73
From-SVN: r60174
2002-11-20emit-rtl.c (gen_reg_rtx): Simplify mapping of Complex type to component type ↵Steve Ellcey1-12/+3
using GET_MODE_INNER. * emit-rtl.c (gen_reg_rtx): Simplify mapping of Complex type to component type using GET_MODE_INNER. * expr.c (emit_move_insn_1): Ditto. * optabs.c (expand_binop): Ditto. (expand_unop): Ditto. (expand_complex_abs): Ditto. From-SVN: r59317
2002-11-19re PR c/8588 (ICE in extract_insn, at recog.c:2148)Eric Botcazou1-6/+5
2002-11-19 �Eric Botcazou �<ebotcazou@libertysurf.fr> PR c/8588 * optabs.c (expand_binop): Convert CONST_INTs in shift operations too. From-SVN: r59274
2002-11-16* optabs.c: Fix formatting.Kazu Hirata1-54/+55
From-SVN: r59151
2002-10-24optabs.c (expand_binop): Don't reuse the shift target in the middle of shift ↵Richard Sandiford1-2/+2
sequences. * optabs.c (expand_binop): Don't reuse the shift target in the middle of shift sequences. From-SVN: r58487
2002-09-26c-common.h: Follow spelling conventions.Kazu Hirata1-2/+2
* c-common.h: Follow spelling conventions. * cpplex.c: Likewise. * cpplib.h: Likewise. * gthr-dce.h: Likewise. * gthr-posix.h: Likewise. * optabs.c: Likewise. * output.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-rewrite.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * reload.c: Likewise. * reload.h: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. From-SVN: r57555
2002-09-17optabs.c (prepare_cmp_insn): Let emit_library_call_value generate a pseudo ↵Kazu Hirata1-30/+17
reg that receives the result of a... * optabs.c (prepare_cmp_insn): Let emit_library_call_value generate a pseudo reg that receives the result of a libcall. (prepare_float_lib_cmp): Likewise. From-SVN: r57255
2002-09-16calls.c (emit_library_call_value_1): Don't refer to hard_libcall_value.Kazu Hirata1-7/+2
* calls.c (emit_library_call_value_1): Don't refer to hard_libcall_value. * optabs.c (prepare_float_lib_cmp): Likewise. From-SVN: r57207
2002-09-16real.c, real.h: Rewrite from scratch.Richard Henderson1-5/+3
gcc/ * real.c, real.h: Rewrite from scratch. * Makefile.in (simplify-rtx.o): Depend on TREE_H. (paranoia): New target. * builtins.c (fold_builtin_inf): Use new real.h interface. * c-common.c (builtin_define_with_hex_fp_value): Likewise. * c-lex.c (interpret_float): Likewise. * emit-rtl.c (gen_lowpart_common): Likewise. * optabs.c (expand_float): Use real_2expN. * config/ia64/ia64.md (divsi3, udivsi3): Likewise. * defaults.h (INTEL_EXTENDED_IEEE_FORMAT): New. (FLOAT_WORDS_BIG_ENDIAN): New. * cse.c (find_comparison_args): Don't pass FLOAT_STORE_FLAG_VALUE directly to REAL_VALUE_NEGATIVE. * loop.c (canonicalize_condition): Likewise. * simplify-rtx.c: Include tree.h. (simplify_unary_operation): Don't handle FIX and UNSIGNED_FIX with floating-point result modes. * toplev.c (backend_init): Call init_real_once. * fold-const.c (force_fit_type): Don't call CHECK_FLOAT_VALUE. * tree.c (build_real): Likewise. * config/alpha/alpha.c, config/vax/vax.c (float_strings, float_values, inited_float_values, check_float_value): Remove. * config/alpha/alpha.h, config/m68hc11/m68hc11.h, config/m88k/m88k.h, config/vax/vax.h (CHECK_FLOAT_VALUE): Remove. * doc/tm.texi (CHECK_FLOAT_VALUE): Remove. gcc/f/ * target.c (ffetarget_real1): Don't pass FFETARGET_ATOF_ directly to ffetarget_make_real1. (ffetarget_real2): Similarly. * target.h (ffetarget_cvt_r1_to_rv_, ffetarget_cvt_rv_to_r2_, ffetarget_cvt_r2_to_rv_): Use new real.h interface and simplify. gcc/java/ * jcf-parse.c (get_constant): Runtime check for IEEE format; use new real.h interface. * jcf-write.c (find_constant_index): Use new real.h interface. * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL. contrib/ * paranoia.cc: New file. From-SVN: r57198
2002-09-11optabs.c (expand_binop): Minor cleanup.Eric Botcazou1-14/+22
* optabs.c (expand_binop): Minor cleanup. (expand_twoval_binop): Convert CONST_INTs like in expand_binop. From-SVN: r57046
2002-09-04re PR c/7102 (unsigned char divisision results in floating exception)Eric Botcazou1-13/+7
PR c/7102 * optabs.c (expand_binop): Convert CONST_INTs in all cases. From-SVN: r56815
2002-08-03builtins.def: Define new builtin functions exp...Roger Sayle1-0/+2
* 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
2002-08-02df.c (df_insn_table_realloc): Change parameter to unsigned.Kaveh R. Ghazi1-1/+1
* df.c (df_insn_table_realloc): Change parameter to unsigned. * optabs.c (expand_binop): Make variable unsigned. * simplify-rtx.c (simplify_subreg): Likewise. * unroll.c (unroll_loop): Cast to avoid signed/unsigned warnings. From-SVN: r55960
2002-07-22optabs.c (expand_vector_unop): Don't expand using sub_optab if we got the ↵J"orn Rennecke1-1/+4
wrong mode. * optabs.c (expand_vector_unop): Don't expand using sub_optab if we got the wrong mode. From-SVN: r55648
2002-07-10Revert all patches for optimization of Complex .op.Toon Moene1-28/+8
2002-07-10 Toon Moene <toon@moene.indiv.nluug.nl> Revert all patches for optimization of Complex .op. Real. * complex_part_zero_p: Remove * expand_cmplxdiv_straight: Replace complex_part_zero_p(x) with x. * expand_cmplxdiv_wide: Ditto. * expand_binop: Ditto. From-SVN: r55379
2002-07-03optabs.c (expand_vector_binop): Don't store using a SUBREG smaller than ↵J"orn Rennecke1-30/+132
UNITS_PER_WORD... gcc: * optabs.c (expand_vector_binop): Don't store using a SUBREG smaller than UNITS_PER_WORD, unless this is little endian and the first unit in this word. Let extract_bit_field decide how to load an element. Force arguments to matching mode. (expand_vector_unop): Likewise. * simplify-rtx.c (simplify_subreg): Don't assume that all vectors consist of word_mode elements. * c-typeck.c (build_binary_op): Allow vector types for BIT_AND_EXPR, BIT_ANDTC_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR. (build_unary_op): Allow vector types for BIT_NOT_EPR. * emit-rtl.c (gen_lowpart_common): Use simplify_gen_subreg for CONST_VECTOR. * optabs.c (expand_vector_binop): Try to perform operation in smaller vector modes with same inner size. Add handling of AND, IOR and XOR. Reject expansion to inner-mode sized scalars when using OPTAB_DIRECT. Use simplify_gen_subreg on constants. (expand_vector_unop): Try to perform operation in smaller vector modes with same inner size. Add handling of one's complement. When there is no vector negate operation, try a vector subtract operation. Use simplify_gen_subreg on constants. * simplify-rtx.c (simplify_subreg): Add capability to convert vector constants into smaller vectors with same inner mode, and to integer CONST_DOUBLEs. gcc/testsuite: * gcc.c-torture/execute/simd-1.c (main): Also test &, |, ^, ~. * gcc.c-torture/execute/simd-2.c (main): Likewise. From-SVN: r55209
2002-06-25optabs.c (expand_vector_binop, [...]): Don't assume GET_MODE_UNIT_SIZE ↵J"orn Rennecke1-7/+9
(mode) == UNITS_PER_WORD. gcc: * optabs.c (expand_vector_binop, expand_vector_unop): Don't assume GET_MODE_UNIT_SIZE (mode) == UNITS_PER_WORD. gcc/testsuite: * gcc.c-torture/execute/simd-2.c: New test. From-SVN: r54994
2002-06-18simd-1.c: New.Aldy Hernandez1-0/+133
2002-06-16 Aldy Hernandez <aldyh@redhat.com> * gcc.c-torture/execute/simd-1.c: New. * gcc.dg/simd-1.c: New. * doc/extend.texi (Vector Extensions): Document that we can specify simd types not specifically supported by the hardware. Document that simd types can be used as function arguments. Document that signness does make a difference in SIMD types. Misc cleanups and revisions to the "vector extensions" section. * simplify-rtx.c (simplify_subreg): Simplify subregs of vector constants. * expr.c (vector_mode_valid_p): New. * expr.h: Add vector_mode_valid_p. * defaults.h (VECTOR_MODE_SUPPORTED_P): Set default. * emit-rtl.c (immed_double_const): Do not abort on vectors. * c-common.c (type_for_mode): Always build vector nodes regardless of VECTOR_MODE_SUPPORTED_P. (handle_mode_attribute): Error if we can't emulate a nonexisting vector mode. (handle_vector_size_attribute): Same. * optabs.c (expand_binop): Open-code vector operations. (expand_unop): Open-code vector unops. (expand_vector_binop): New. (expand_vector_unop): New. * c-typeck.c (build_binary_op): Allow vectors in binops. Allow vectors in conditional operatiors. (build_unary_op): Allow vectors in unary minus. * config/rs6000/rs6000.h (ALTIVEC_VECTOR_MODE): Conditionalize on TARGET_ALTIVEC. From-SVN: r54727
2002-06-11Delete SEQUENCE rtl usage outside of reorg and ssa passes.David S. Miller1-31/+53
2002-06-05 David S. Miller <davem@redhat.com> Delete SEQUENCE rtl usage outside of reorg and ssa passes. * rtl.h (gen_sequence, emit_insns, emit_insns_before, emit_insns_before_scope, emit_insns_after, emit_insns_after_scope): Delete declaration. * ada/misc.c (insert_code_for): Use emit_insn* instead of emit_insns_foo. * config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE. (alpha_set_memflags): Fix comment. (set_frame_related_p): Use get_insns instead of gen_sequence. * config/alpha/alpha.md (setjmp receiver splitter): Avoid emitting no insns. * config/arm/arm.c (arm_finalize_pic): Use get_insns instead of gen_sequence. (arm_gen_load_multiple, arm_gen_store_multiple): Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/ia64/ia64.md (conditional move spliiter): Avoid emitting no insns. * config/m32r/m32r.c (gen_split_move_double): Use get_insns instead of gen_sequence. * config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise. (mips_expand_prologue, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_need_epilogue): Likewise. * config/sparc/sparc.md (current_function_calls_alloca, flat): New attributes. (setjmp pattern and split): Use them to avoid splitter which emits no RTL. * genattrtab.c (main): Emit include of function.h * config/stormy16/stormy16.c (xstormy16_split_cbranch): Use get_insns instead of gen_sequence. * config/cris/cris.c (cris_split_movdx): Likewise. * emit-rtl.c (emit_insns*): Kill. (try_split): Expect insn list instead of SEQUENCE. (make_jump_insn_raw, make_call_insn_raw): Fix comments. (emit_*insn*): Reimplement to work with INSN lists and PATTERNs. Make them abort if a SEQUENCE is given and RTL checking is enabled. (emit_*_scope): Don't forget to set scope on final insn. (gen_sequence): Move from here... * ssa.c (gen_sequence): To here as private function. * builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix comments. (expand_builtin_return, expand_builtin_mathfn): Likewise. (expand_builtin_strlen): Use get_insns instead of gen_sequence. (expand_builtin_saveregs): Use emit_insn_foo, fix comments. (expand_builtin_expect_jump): Use get_insns and fix comments. * calls.c (try_to_integrate): Use emit_insn_foo. (expand_call, emit_library_call_value_1): Likewise. * expr.c (emit_queue): Handle insn lists instead of SEQUENCE. (emit_move_insn_1): Use get_insns instead of gen_sequence. (expand_expr): Use emit_insn_foo. * cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo. * except.c (build_post_landing_pads): Likewise. * flow.c (attempt_auto_inc): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label, expand_nl_goto_receivers, expand_decl_cleanup): Likewise. * function.c (fixup_var_refs_insn): Use get_insns instead of gen_sequence. (fixup_var_refs_1): Likewise and expect insn list from gen_foo. (fixup_memory_subreg): Use get_insns instead of gen_sequence. (fixup_stack_1, purge_addressof_1, expand_main_function, get_arg_pointer_save_area): Likewise. (optimize_bit_field, instantiate_virtual_regs_1, assign_parms, expand_function_end): Use emit_insn_foo. (record_insns, keep_stack_depressed): Work with insn list instead of SEQUENCE, fix comments. * ifcvt.c (noce_emit_store_flag, noce_try_store_flag, noce_try_store_flag_constants, noce_try_store_flag_inc, noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Use emit_insn_foo. (noce_process_if_block): Use get_insns instead of gen_sequence. * optabs.c (add_equal_note): Work with insn list, fix comments. (expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo. (expand_unop, expand_complex_abs, expand_unop_insn, expand_no_conflict_block): Likewise. (gen_move_insn): Use get_insns instead of gen_sequence. (gen_cond_trap): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. (emit_initial_value_sets): Use emit_insn_foo. * reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise. (fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently now that RTL generators give insn lists. * sibcall.c (replace_call_placeholder): Use emit_insn_foo. * doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns instead of gen_sequence. (doloop_optimize): Work with insn lists instead of SEQUENCE rtl. * explow.c (emit_stack_save, emit_stack_restore): Use get_insns instead of gen_sequence. * loop.c (move_movables, emit_prefetch_instructions, gen_add_mult, check_dbra_loop, gen_load_of_final_value): Likewise. (loop_regs_update): Work with insn list instead of SEQUENCE rtl. (product_cheap_p): Likewise, and add commentary about RTL wastage here. * lcm.c (optimize_mode_switching): Use get_insns instead of gen_sequence. * profile.c (gen_edge_profiler): Likewise. * regmove.c (copy_src_to_dest): Likewise. * reg-stack.c (compensate_edge): Likewise and fix comment. * gcse.c (process_insert_insn): Likewise. (insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl. * jump.c (delete_prior_computation): Update comment. * genemit.c (gen_expand, gen_split, main): Use get_insns instead of gen_sequence, update comments to match. * recog.c (peephole2_optimize): Work with insn lists instead of SEQUENCE rtl. * sched-vis.c (print_pattern): Abort on SEQUENCE. * unroll.c (unroll_loop, find_splittable_givs, final_giv_value): Use get_insns instead of gen_sequence. (copy_loop_body): Likewise and don't emit dummy NOTE. * genrecog.c: Don't mention SEQUENCE rtl in comments. * combine.c (try_combine): Expect insn lists from split generator. * reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by hand. From-SVN: r54497
2002-06-04Merge from pch-branch up to tag pch-commit-20020603.Geoffrey Keating1-22/+7
From-SVN: r54232
2002-05-28optabs.c (expand_binop): Fix nwords sign warnings.David Edelsohn1-8/+9
* optabs.c (expand_binop): Fix nwords sign warnings. generate pseudo for add_optab. Co-Authored-By: Jeff Law <law@redhat.com> From-SVN: r53976
2002-05-21optabs.c (expand_binop): For double-word integer multiplies...Jeff Law1-0/+5
* optabs.c (expand_binop): For double-word integer multiplies, do not compute intermediate results into something that is not a register (such as a SUBREG or MEM). From-SVN: r53718
2002-05-20optabs.c (expand_cmplxdiv_wide): Use complex_part_zero_p.Toon Moene1-6/+8
2002-05-19 Toon Moene <toon@moene.indiv.nluug.nl> * optabs.c (expand_cmplxdiv_wide): Use complex_part_zero_p. (expand_binop): Ditto (3 times). From-SVN: r53655
2002-05-18system.h (ENCODE_SECTION_INFO): Poison it.Richard Henderson1-1/+2
* system.h (ENCODE_SECTION_INFO): Poison it. * target-def.h (TARGET_ENCODE_SECTION_INFO): New. * target.h (encode_section_info): New. * varasm.c (make_decl_rtl, output_constant_def): Use it. * hooks.c (hook_tree_int_void): New. * hooks.h: Declare it. * config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h, config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000-protos.h, config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h: Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO referencing existing function. Make function static. * config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c, config/arc/arc.h, config/arm/arm.c, config/arm/arm.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c, config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c, config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c, config/v850/v850.h, config/vax/vax.c, config/vax/vms.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h: Move ENCODE_SECTION_INFO to out-of-line function and add TARGET_ENCODE_SECTION_INFO. * config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro. (ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. * config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename from SUBTARGET_* (switch_to_section): Replace in_rdata case with in_readonly_data. * config/h8300/h8300.c (h8300_encode_label): Make static. * config/h8300/h8300-protos.h: Update. * config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename from rs6000_encode_section_info; make static. (rs6000_xcoff_encode_section_info): New. * config/v850/v850.c (v850_encode_data_area): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.c: Include flags.h. (vms_select_section): Fix typo. * doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous ENCODE_SECTION_INFO docs. From-SVN: r53606
2002-05-18optabs.c (complex_part_zero_p): New.Toon Moene1-3/+21
2002-05-18 Toon Moene <toon@moene.indiv.nluug.nl> * optabs.c (complex_part_zero_p): New. * (expand_cmplxdiv_straight): Use it. * (expand_cmplxdiv_wide): Ditto. * (expand_binop): Ditto. From-SVN: r53594
2002-03-31builtins.c (expand_builtin_va_arg): Give warnings not errors for promoted ↵Richard Henderson1-0/+1
argument types; build trap. * builtins.c (expand_builtin_va_arg): Give warnings not errors for promoted argument types; build trap. (expand_builtin_trap): New. (expand_builtin): Use it. * stmt.c (expand_nl_goto_receivers): Likewise. * expr.h (expand_builtin_trap): Declare. * libfuncs.h (LTI_abort, abort_libfunc): New. * optabs.c (init_optabs): Init abort_libfunc. * gcc.dg/va-arg-1.c: Expect warnings, not errors. From-SVN: r51643
2002-03-27optabs.c (emit_no_conflict_block, [...]): Avoid nesting of libcall regions.Jan Hubicka1-1/+16
* optabs.c (emit_no_conflict_block, emit_libcall_block): Avoid nesting of libcall regions. From-SVN: r51477
2002-03-19emit-rtl.c (gen_int_mode): New function.Lars Brinkhoff1-3/+3
* emit-rtl.c (gen_int_mode): New function. * rtl.h: Prototype for it. * combine.c (make_extraction, simplify_comparison), expmed.c (store_bit_field, expand_mult_highpart, expand_divmod), expr.c (convert_modes, store_field), optabs.c (expand_fix), simplify-rtx.c (neg_const_int, simplify_unary_real), * config/rs6000/rs6000.c, config/rs6000/rs6000.md: Use it instead of GEN_INT (trunc_int_for_mode (...)). From-SVN: r51030
2002-03-08gofast.h (GOFAST_RENAME_LIBCALLS): Set gt and ge as NULL_RTX.Alexandre Oliva1-0/+121
* config/gofast.h (GOFAST_RENAME_LIBCALLS): Set gt and ge as NULL_RTX. Set all HFmode operations as NULL_RTX. * optabs.c (prepare_float_lib_cmp) <GT, GE, LT, LE>: If libfunc is NULL_RTX, try reversing the comparison and the operands. From-SVN: r50422
2002-03-03emit-rtl.c, [...]: Remove all #ifndef REAL_ARITHMETIC blocks...Zack Weinberg1-5/+0
* emit-rtl.c, final.c, fold-const.c, gengenrtl.c, optabs.c, print-tree.c, real.c, real.h, recog.c, rtl.c, simplify-rtx.c, tree.c, config/m68k/m68k.c, f/com.c, f/target.h, java/expr.c, java/jcf-parse.c, java/lex.c: Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef REAL_ARITHMETIC blocks unconditional. Delete some further #ifdef blocks predicated on REAL_ARITHMETIC. * flags.h, toplev.c: Delete remaining references to flag_pretend_float. * doc/invoke.texi: Remove documentation of -fpretend-float. * doc/tm.texi: Describe the various REAL_* macros as provided by real.h, not by the target configuration files. * config/alpha/alpha.h, config/alpha/unicosmk.h, config/arm/arm.h, config/avr/avr.h, config/c4x/c4x.h, config/convex/convex.h, config/cris/cris.h, config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, config/h8300/h8300.h, config/i370/i370.h, config/i386/i386.h, config/i386/osf1elf.h, config/i960/i960.h, config/ia64/ia64.h, config/m32r/m32r.h, config/m68hc11/m68hc11.h, config/m68k/dpx2.h, config/m68k/linux-aout.h, config/m68k/linux.h, config/m68k/m68k.h, config/m68k/sun3.h, config/m68k/vxm68k.h, config/mcore/mcore.h, config/mips/mips.h, config/mmix/mmix.h, config/mn10200/mn10200.h, config/mn10300/mn10300.h, config/pa/pa.h, config/pj/pj.h, config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.h, config/sparc/freebsd.h, config/sparc/linux.h, config/sparc/linux64.h, config/sparc/sol2.h, config/sparc/sparc.h, config/sparc/vxsim.h, config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h, config/xtensa/xtensa.h: Do not define, undefine, or mention in comments any of REAL_ARITHMETIC, REAL_VALUE_ATOF, REAL_VALUE_HTOF, REAL_VALUE_ISNAN, REAL_VALUE_ISINF, REAL_VALUE_TO_TARGET_SINGLE, REAL_VALUE_TO_TARGET_DOUBLE, REAL_VALUE_TO_TARGET_LONG_DOUBLE, REAL_VALUE_TO_DECIMAL, REAL_VALUE_TYPE, REAL_VALUES_EQUAL, REAL_VALUES_LESS, REAL_VALUE_LDEXP, REAL_VALUE_FIX, REAL_VALUE_UNSIGNED_FIX, REAL_VALUE_RNDZINT, REAL_VALUE_UNSIGNED_RNDZINT, REAL_INFINITY, REAL_VALUE_NEGATE, REAL_VALUE_TRUNCATE, REAL_VALUE_TO_INT, or REAL_VALUE_FROM_INT. From-SVN: r50263
2002-02-24* optabs.c (widen_operand): Properly handle CONST_INT for NO_EXTEND.Richard Kenner1-4/+7
From-SVN: r50011
2002-02-24optabs.c (widen_operand): Only call convert_modes for promoted SUBREG if ↵Richard Kenner1-1/+2
signedness matches. * optabs.c (widen_operand): Only call convert_modes for promoted SUBREG if signedness matches. * config/alpha/alpha.md (*addsi_se2, *subsi_se2): New patterns. From-SVN: r50004