Commit Graph

114 Commits

Author SHA1 Message Date
Zack Weinberg b548dffbda aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New.
libiberty:
	* aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New.
	* configure.in: Replace all alloca logic with a simple use of
	the above new macro.
	* config.table: Kill *-*-beos* entry.
	* config/mh-beos: Delete.
	* configure, config.in: Regenerate.

	* Makefile.in (ALLOCA, HFILES): Kill.
	(REQUIRED_OFILES): Add alloca.o.
	(alloca.o): Depend on libiberty.h.
	(argv.o): Don't depend on alloca-conf.h.
	* alloca-conf.h: Delete.
	* alloca.c: Include libiberty.h.  Kill all #ifdef emacs
	blocks.  Provide the C alloca unconditionally.  Use PTR where
	appropriate.  Make i00afunc static.
	* argv.c: Don't include alloca-conf.h.

include:
	* libiberty.h: Prototype C_alloca; define alloca to either
	__builtin_alloca or C_alloca as appropriate.

gcc:
	* aclocal.m4 (AM_GNU_GETTEXT): Don't AC_REQUIRE
	AC_FUNC_ALLOCA.
	* configure, config.in: Regenerate.
	* config.gcc: Remove references to deleted files.

	* genattr.c, genattrtab.c, genextract.c, genoutput.c,
	genrecog.c, rtl.c: Do not use alloca anywhere.

	* Makefile.in, build-make, system.h, config/x-interix,
	config/x-svr4, config/xm-interix.h, config/xm-openbsd.h,
	config/alpha/xm-alpha.h, config/alpha/xm-vms.h,
	config/arc/xm-arc.h, config/arm/xm-arm.h,
	config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h,
	config/h8300/xm-h8300.h, config/i370/x-oe,
	config/i370/xm-linux.h, config/i386/x-aix, config/i386/x-beos,
	config/i386/x-ncr3000, config/i386/x-sco5,
	config/i386/xm-dgux.h, config/i860/x-sysv4,
	config/i960/xm-i960.h, config/m32r/xm-m32r.h,
	config/m68k/x-crds, config/m68k/x-dpx2, config/m68k/x-hp320,
	config/m68k/x-hp320g, config/m69k/x-mot3300,
	config/m68k/x-mot3300-gas, config/m68k/xm-amix.h,
	config/m68k/xm-hp320.h, config/m68k/xm-m68kv.h,
	config/m68k/xm-mot3300.h, config/m88k/x-dolph,
	config/m88k/x-sysv4, config/m88k/x-tekXD88,
	config/m88k/xm-m88k.h, config/mcore/xm-mcore.h,
	config/mips/x-iris, config/mips/x-iris3,
	config/mips/x-sni-svr4, config/mips/x-sysv,
	config/mips/xm-iris6.h, config/mips/xm-mips.h,
	config/mips/xm-nws3250v4.h, config/pa/x-hpux,
	config/pa/x-pa-mpeix, config/pa/xm-pa.h,
	config/pa/xm-pa64hpux.h, config/pa/xm-pahpux.h,
	config/pa/xm-papro.h, config/romp/xm-romp.h,
	config/rs6000/x-aix31, config/rs6000/x-aix41,
	config/rs6000/x-beos, config/rs6000/x-lynx,
	config/rs6000/x-mach, config/rs6000/x-rs6000,
	config/rs6000/x-sysv4, config/rs6000/xm-rs6000.h,
	config/rs6000/xm-sysv4.h, config/sh/xm-sh.h,
	config/sparc/x-sysv4, config/sparc/xm-linux.h,
	config/sparc/xm-pbd.h, config/sparc/xm-sparc.h,
	config/vax/xm-vms.h: Eradicate all references to alloca and
	related stuff.

	* config/xm-alloca.h, config/clipper/x-clix,
	config/i386/xm-sysv4.h, config/i860/x-fx2800,
	config/i860/x-sysv3, config/m88k/x-sysv3,
	config/sparc/xm-sol2.h, config/we32k/x-we32k: Delete
	(contained only alloca related hacks).

	* config/i386/xm-beos.h, config/rs6000/xm-beos.h: Just define
	USE_C_ALLOCA.

From-SVN: r40259
2001-03-06 09:52:35 +00:00
John David Anglin dbbbbf3b8d print-rtl.c (print_rtx): Cast enums to int for comparison.
* print-rtl.c (print_rtx): Cast enums to int for comparison.
	* c-decl.c (grokdeclarator): Cast enums to int for comparison and
	shifts.
	* c-format.c (C_STD_VER): Cast to int for comparisons.
	(check_function_format): Cast various enums to int for &.
	(maybe_read_dollar_number): Likewise.
	(check_format_info): Likewise.
	(check_format_info_main): Likewise.
	* expr.c (emit_move_insn_1): Cast enums to unsigned int for comparison.
	(safe_from_p): Likewise.
	* varasm.c (const_hash): Cast enum to int for %.
	* emit-rtl.c (init_emit_once): Use int loop variable to work around
	pcc enum problems with < and ++ operators.
	* regclass.c (init_reg_sets_1): Cast enums for comparison.
	(choose_hard_reg_mode): Use unsigned int to iterate over CCmodes.
	(regclass_init): Change enum class to int to iterate over reg_classes.
	* genrecog.c (merge_trees): Cast enums for comparison.
	* rtl.h (GET_CODE): Cast to enum rtx_code.
	(PUT_CODE): Cast to ENUM_BITFIELD(rtx_code).
	(GET_MODE): Cast to enum machine_mode.
	(PUT_MODE): Cast to ENUM_BITFIELD(machine_mode).
	(GET_NOTE_INSN_NAME): Cast enum to int.
	* tree.h (TREE_CODE): Cast to enum tree_code.
	(TREE_SET_CODE): Cast VALUE to ENUM_BITFIELD(tree_code).
        * timevar.c (timevar_print): Change loop variable id from enum to
	unsigned int.
	* fixinc/fixincl.c (VLEVEL): Cast enums in comparison to unsigned int.
	* config/i386/i386.md: Use PUT_MODE for mode assignment.
	* toplev.c (compile_file): Cast enum DFI to int.
	(decode_d_option): Likewise.

From-SVN: r40193
2001-03-02 21:41:37 +00:00
Richard Henderson 521b92248e genrecog.c (DT_veclen_ge): New.
* genrecog.c (DT_veclen_ge): New.
        (add_to_sequence) [MATCH_PARALLEL]: Generate one.
        (maybe_both_true_2): Simplify DT_veclen vs DT_veclen_ge.
        (nodes_identical_1): Handle DT_veclen_ge.
        (write_cond, debug_decision_2): Likewise.

From-SVN: r39016
2001-01-14 12:35:06 -08:00
Richard Henderson 2cec75a1bd genrecog.c (nodes_identical): Expand commentary.
* genrecog.c (nodes_identical): Expand commentary.
        (write_switch): Watch out for identical nodes.

From-SVN: r38989
2001-01-13 11:31:07 -08:00
Jan Hubicka 29360e5681 genrecog.c (add_to_sequence): Remove special case for const_int_operand.
* genrecog.c (add_to_sequence): Remove special case for
	const_int_operand.
	(maybe_both_true): Return 1 when falling out of sequence when
	trying to find common possition in the pattern.

From-SVN: r38284
2000-12-15 13:50:32 +00:00
Richard Henderson c0ea284b16 genrecog.c (find_operand): Handle 'V' format code.
* genrecog.c (find_operand): Handle 'V' format code.
        (find_matching_operand): New.
        (validate_pattern): Accept '=' for an in-out operand if there
        is another operand with a matching constraint.

From-SVN: r38175
2000-12-10 11:50:53 -08:00
Richard Henderson e06d5f0b8a * genrecog.c (validate_pattern) [STRICT_LOW_PART]: Fix thinko.
From-SVN: r38174
2000-12-10 11:09:01 -08:00
Richard Henderson 7297e9fc9a genrecog.c (validate_pattern): Verify that ZERO_EXTRACT and STRICT_LOW_PART as SET_DEST have in-out constraints.
* genrecog.c (validate_pattern): Verify that ZERO_EXTRACT and
        STRICT_LOW_PART as SET_DEST have in-out constraints.

From-SVN: r38164
2000-12-09 14:06:52 -08:00
Alexandre Oliva 1651ab853f genrecog.c (write_switch): Return the first condition that needs a label.
* genrecog.c (write_switch): Return the first condition that needs a
label.

From-SVN: r36903
2000-10-17 14:27:53 +00:00
Jan Hubicka d90ffc8d2c i386.md (add?i_3, add?i_5): New.
* i386.md (add?i_3, add?i_5): New.
	(add?i_4): Rename from add?i_3;  Fix compare pattern.
	(sub?i_3, xor?i_3, ior?i_3): New.

	* genrecog.c (write_tree): Output code to clear insn_extract cache.
	* genattrtab.c (write_attr_case): Gen call to extract_insn_cache
	instead of extract_insn and extract_constrain_insn_cache instead of
	extract_insn and constrain_operands.
	* recog.c (extract_insn_cached, extract_constrain_insn_cached):
	New functions.
	(extract_insn): Clear which_alternative.
	(constrain_operands): Set which_alternative to -1 when failed.
	* recog.h (extract_constrain_insn_cached, extract_insn_cached):
	Declare.

From-SVN: r36342
2000-09-11 23:54:11 +00:00
Greg McGary b6a1cbaeb1 optabs.c (init_optabs): Initialize fixtab...
* optabs.c (init_optabs): Initialize fixtab, fixtrunctab, floattab,
	and extendtab within their proper array boundaries.
	* emit-rtl.c (init_emit_once): Pass `const_tiny_rtx' with bounds
	for the entire array.

	* config/arm/arm.c (arm_override_options): Use ARRAY_SIZE.
	* config/alpha/alpha.c (alpha_lookup_xfloating_lib_func): Likewise.
	* config/avr/avr.c (order_regs_for_local_alloc): Likewise.
	* config/fr30/fr30.c (fr30_print_operand): Likewise.
	* config/i386/dgux.c (output_options): Likewise.
	* config/i386/dgux.h (ASM_FILE_START): Likewise.
	* config/m88k/m88k.c (output_options): Likewise.
	* config/m88k/m88k.h (ASM_FILE_START): Likewise.
	* config/mcore/mcore.c (mcore_output_inline_const_forced,
	layout_mcore_frame, handle_structs_in_regs): Likewise.
	* config/mips/mips.c (output_block_move): Likewise.
	* config/rs6000/rs6000.c (rs6000_override_options,
	rs6000_file_start): Likewise.
	* config/sparc/sparc.c (sparc_add_gc_roots): Likewise.
	* fixinc/fixfixes.c (FIX_TABLE_CT): Likewise.
	* fixinc/fixtests.c (TEST_TABLE_CT): Likewise.
	* builtins.c (expand_builtin_setjmp): Likewise.
	* expr.c (safe_from_p): Likewise.
	* flow.c (life_analysis): Likewise.
	* fold-const.c (size_int_type_wide): Likewise.
	* gcc.c (translate_options, init_spec, set_spec, main): Likewise.
	* genattrtab.c (make_length_attrs): Likewise.
	* genopinit.c (gen_insn): Likewise.
	* genrecog.c (NUM_KNOWN_PREDS, NUM_SPECIAL_MODE_PREDS): Likewise.
	* global.c (global_alloc): Likewise.
	* local-alloc.c (find_free_reg): Likewise.
	* mips-tdump.c (print_symbol): Likewise.
	* mips-tfile.c (parse_def, parse_input): Likewise.
	* reload1.c (NUM_ELIMINABLE_REGS): Likewise.
	* stmt.c (expand_nl_goto_receiver): Likewise.
	* stor-layout.c (set_sizetype): Likewise.
	* varasm.c (decode_reg_name): Likewise.
	* toplev.c (decode_f_option, decode_W_option,
	set_target_switch, print_switch_values): Likewise.
	(NUM_ELEM): Remove macro.
	(display_help, main): s/NUM_ELEM/ARRAY_SIZE/

From-SVN: r35949
2000-08-24 20:31:35 +00:00
Kaveh R. Ghazi 3f6790bf93 * genrecog.c (write_header): Split long string.
From-SVN: r35024
2000-07-13 20:33:09 +00:00
Richard Henderson 2328013936 Makefile.in (recog.o): Don't depend on resource.h.
* Makefile.in (recog.o): Don't depend on resource.h.
	* recog.c: Don't include resource.h.
	(recog_last_allowed_insn): Remove.
	(recog_next_insn): Remove.
	(struct peep2_insn_data): New.
	(peep2_insn_data, peep2_current): New.
	(peep2_next_insn): New.
	(peep2_regno_dead_p, peep2_reg_dead_p): New.
	(peep2_find_free_register): New.
	(peephole2_optimize): Track life information by insn as we go.
	* recog.h: Update declarations.
	* resource.c (find_free_register, reg_dead_p): Remove.
	* resource.h: Remove their declarations.
	* toplev.c: Include hard-reg-set.h before recog.h.

	* genconfig.c (max_insns_per_peep2): New.
	(gen_peephole2): New.
	(main): Call it.
	* genemit.c (output_peephole2_scratches): Generate calls to
	peep2_find_free_register; adjust surrounding code.
	(main): Have insn-emit.c include hard-reg-set.h before recog.h.
	* genrecog.c (change_state): Don't track last_insn.
	(write_action): Write into *_pmatch_len before accepting.
	(write_tree): Adjust peephole2_insns and subroutines to match.

	* config/i386/i386.md (all peepholes): Use peep2_regno_dead_p.

From-SVN: r34208
2000-05-27 13:23:15 -07:00
Zack Weinberg 1b3459d226 genopinit.c: Use $ for escape sequences in optab patterns.
* genopinit.c: Use $ for escape sequences in optab patterns.
	Remove backslashes from optab patterns.  Change $A, $B, $C to
	expand to (int) whatever instead of just whatever; remove
	explicit (int) from all optab patterns.

	* gensupport.c (xmalloc, xrealloc, xstrdup): Provide.
	* genattr.c, genattrtab.c, gencodes.c, genconfig.c, genemit.c,
	genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c,
	genrecog.c: Remove private copies of xmalloc, xrealloc, and

From-SVN: r34000
2000-05-18 22:05:15 +00:00
Zack Weinberg 3b304f5b7d top level:
* Makefile.in (WARN_CFLAGS): Add -Wwrite-strings.
	(tree.o): Depend on output.h.

	* c-decl.c (pending_invalid_xref_file,
	current_function_prototype_file): Constify.
	(pushdecl): Constify a local char *.
	(define_label): Constify filename parameter.
	* c-lex.c (init_parse): Constify parameter and return value.
	* c-typeck.c (c_expand_asm_operands): Constify filename parameter.
	* c-tree.h: Update prototypes.
	* c-parse.in: Constify filename member of %union, and if_stmt_file.
	* c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y,
	objc/objc-parse.c: Regenerate.

	* dwarfout.c (dwarfout_init): Constify main_input_filename parameter.
	* dwarfout.h: Update prototypes.
	* expr.c (expand_expr): Constify a local char *.
	* flags.h: Constify main_input_filename.
	* function.c (expand_function_end): Constify filename parameter.
	* genrecog.c (make_insn_sequence): Use a character array for
	c_test_pos.
	(main): Remove unused variables.
	* input.h: Constify input_filename, main_input_filename, and
	file_stack.name.  Update prototypes.
	* output.h: Declare first_global_object_name and
	weak_global_object_name here, as const char *.
	* stmt.c (expand_asm_operands): Constify filename parameter.
	* toplev.c (compile_file, push_srcloc, debug_start_source_file):
	Constify filename parameter.
	(input_filename, main_input_filename): Constify.
	* toplev.h: Update prototypes.
	* tree.c: Include output.h.  Don't declare
	first_global_object_name or weak_global_object_name.  Clean up string
	bashing in get_file_function_name_long.
	* tree.h (struct tree_decl): Constify filename member.
	(input_filename): Constify.
	Update prototypes.
	* varasm.c (first_global_object_name, weak_global_object_name):
	Constify.
	(assemble_start_function, assemble_variable): Clean up string bashing.

	* gcc.c: Constify all spec-related strings initialized,
	transitively, from string constants.  Constify all strings
	and string variables related to multilibs.
	(set_spec, read_specs): Cast argument to free to PTR.
	(used_arg): Do not modify multilib_matches.  Use strncmp plus
	length comparison to compare multilib switches.
	* genmultilib: Constify everything declared in multilib.h.

ch:
	* ch-tree.h: Update prototypes.  Remove prototypes for
	functions declared elsewhere.
	* decl.c (define_label): Constify filename parameter.
	* grant.c (globalize_decl, set_default_grant_file): Constify
	local char * variables.  Don't declare
	first_global_object_name or asm_out_file.
	* lang.c (chill_real_input_filename): Constify.
	* lex.c (init_parse): Constify parameter and return value.
	* parse.c: Don't declare input_filename.
	(ch_expand_asm_operands): Constify filename parameter.
	(parse_multi_dimension_case_action): Constify local char *.
	* satisfy.c (safe_satisfy_decl): Constify local char *.

cp:
	* cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
	and pending_inline.filename.  Update prototypes.
	* decl.c (define_label): Constify filename parameter.
	* decl2.c (warn_if_unknown_interface): Constify local char *.
	* input.c Constify input_source.filename. Don't declare
	input_filename or lineno.  Constify filename parameter to feed_input.
	* lex.c (init_parse): Constify parameter and return value.
	(cp_pragma_interface, cp_pragma_implementation): Constify
	filename argument.
	(reinit_parse_for_method, reinit_parse_for_block,
	reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
	Constify local char *.
	* pt.c: Don't declare lineno or input_filename.
	(print_template_context, tsubst_friend_function, tsubst_decl,
	tsubst, instantiate_decl): Constify local char *.
	* semantics.c (expand_body): Constify local char *.
	* tree.c (build_srcloc): Constify filename parameter.
	* typeck.c (c_expand_asm_operands): Constify filename
	parameter.

f:
	* com.c (ffecom_subscript_check_): Constify array_name
	parameter. Clean up string bashing.
	(ffecom_arrayref_, ffecom_char_args_x_): Constify array_name
	parameter.
	(ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_,
	ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify
	local char *.
	(init_parse): Constify parameter and return value.
	* lex.c: Include dwarfout.h instead of prototyping dwarfout_*
	functions here.
	(ffelex_file_pop_, ffelex_file_push_): Constify filename parameter.
	(ffelex_hash_, ffelex_include_): Constify local char *.
	* std.c (ffestd_exec_end): Constify local char *.
	* where.c (ffewhere_file_new): Constify filename parameter.
	* where.h: Update prototypes.

java:
	* check_init.c (check_init): Constify local char *.
	* class.c (push_class): Constify local char *.
	* java_tree.h: Update prototypes.
	* jcf-io.c (open_class): Constify filename parameter and
	return value.
	(find_class): Remove redundant string copy.  Cast return from
	open_class.
	* jcf-parse.c (read_class, parse_class_file, yyparse):
	Constify local char *.
	* jcf-write.c (generate_bytecode_insns, generate_classfile):
	Constify local char *.
	* jcf.h (JCF): Constify filename and classname.
	(JCF_FINISH): Cast args to FREE to char * when appropriate.
	* lang.c (init_parse): Constify parameter and return value.
	* lex.c (java_get_line_col): Constify filename parameter.
	* parse.h: Constify parser_ctxt.filename.  Update prototypes.
	* parse.y (java_parser_context_suspend,
	issue_warning_error_from_context, safe_layout_class): Constify
	local char *.
	* parse.c: Regenerate.

From-SVN: r33804
2000-05-09 19:56:01 +00:00
Richard Henderson 3916d6d89c Makefile.in (gensupport.o): Compile for the host.
* Makefile.in (gensupport.o): Compile for the host.
	(host-prefix gensuuprt.o): Remove.
	(genflags.o): Depend on gensupport.h and OBSTACK_H.
	(genattrtab.o): Likewise.
	(gencodes.o): Depend on gensupport.h.
	(genemit.o, genopinit.o, genrecog.o, genextract.o): Likewise.
	(genpeep.o, genattr.o, genoutput.o): Likewise.

	* gensupport.c (obstack, rtl_obstack): New.
	(init_md_reader): Initialize rtl_obstack.
	* gensupport.h (rtl_obstack): Declare.
	(message_with_line): Declare.

	* genattr.c: Remove all traces of obstack manipulation.
	* gencodes.c, genconfig.c, genemit.c, genextract.c: Likewise.
	* genopinit.c, genoutput.c, genpeep.c, genrecog.c: Likewise.

	* genattrtab.c (obstack, rtl_obstack): Remove.
	(main): Don't init rtl_obstack.
	* genflags.c: Likewise.

	* genrecog.c (message_with_line): Move ...
	* gensupport.c: ... here.

From-SVN: r33742
2000-05-06 15:30:13 -07:00
Clinton Popetz c88c0d42a1 gensupport.c: New file.
* gensupport.c: New file.
	* gensupport.h: New file.
	* Makefile.in (HOST_RTL): Depend on gensupport.
	(gensupport.o) New rule.
	* genattr.c: Use gensupport for reading .md files.
	* genattrtab.c: Ditto.
	* gencodes.c: Ditto.
	* genconfig.c: Ditto.
	* genemit.c: Ditto.
	* genextract.c: Ditto.
	* genflags.c: Ditto.
	* genopinit.c: Ditto.
	* genoutput.c: Ditto.
	* genpeep.c: Ditto.
	* genrecog.c: Ditto.
	* rtl.def (define_insn_and_split): New DEF_RTL_EXPR.
	* md.texi (Insn Splitting): Document define_insn_and_split.

From-SVN: r33633
2000-05-03 13:45:26 -04:00
Richard Henderson 3a3677ff46 genrecog.c (pred): Update comparison_operator for the unordered operators.
* genrecog.c (pred): Update comparison_operator for the unordered
        operators.

        * config/i386/i386.c (no_comparison_operator): Disallow unordered
        operators.
        (fcmov_comparison_operator): Allow UNORDERED/ORDERED.
        (uno_comparison_operator): New.
        (put_condition_code): Handle UNORDERED/ORDERED.
        (unsigned_comparison): Likewise.
        (ix86_fp_compare_mode): Broken out of ix86_expand_fp_compare.
        (ix86_use_fcomi_compare, ix86_prepare_fp_compare_args): Likewise.
        (ix86_expand_fp_compare): Use them.  Take scratch as argument,
        update all callers.  Handle all 8 unordered operators.
        (ix86_expand_setcc): Lose the unordered argument, update all callers.
        (ix86_expand_branch): Likewise.  Don't fully expand fp branches.
        * config/i386/i386.h (PREDICATE_CODES): Update.
        * config/i386/i386-protos.h (ix86_expand_fp_compare): Declare.
        (ix86_expand_branch, ix86_expand_setcc): Update.
        * config/i386/i386.md (sunordered, sordered): New.
        (suneq, sunge, sungt, sunle, sunlt, sltgt): New.
        (bunordered, bordered): New.
        (buneq, bunge, bungt, bunle, bunlt, bltgt): New.
        (*fp_jcc_1, *fp_jcc_2, *fp_jcc_3, *fp_jcc_4): New.
        (*fp_jcc_5, *fp_jcc_6, and splitters): New.

From-SVN: r33046
2000-04-09 13:26:42 -07:00
Richard Henderson 4e9887c70b genrecog.c (*): Rename _last_insn to last_insn.
* genrecog.c (*): Rename _last_insn to last_insn.
        (make_insn_sequence): Set the position of the peephole2 C test
        to be at the last insn.

From-SVN: r32990
2000-04-07 00:16:59 -07:00
Jeff Law d050d723e0 Fix copyrights.
From-SVN: r32178
2000-02-26 06:55:09 -07:00
Richard Kenner c8d8ed65a5 bitmap.c (bitmap_operation): Avoid using -1 for index since unsigned.
* bitmap.c (bitmap_operation): Avoid using -1 for index since unsigned.
	* cppinit.c (new_pending_define): Add cast to avoid warning.
	* expmed.c (extract_bit_field): Likewise.
	* flow.c (enum reorder_skip_type): New type.
	(skip_insns_between_blcok): New it.
	Rework to avoid warning about possibly undefined variable.
	* function.c (assign_parms): Make thisparm_boundary unsigned.
	* genrecog.c (write_switch): Cast XWINT result to int.
	* lcm.c: Many static fcns and vars now #ifdef OPTIMIZE_MODE_SWITCHING.
	* mips-tfile.c (init_file): Make two versions of FDR intializer:
	one for MIPS and one for Alpha.
	(get_tag, copy_object): Add casts to avoid warnings.
	* optabs.c (init_one_libfunc): Cast NAME to (char *).
	* reload.c (find_reloads): Make TYPE enum reload_type.
	* sbitmap.c (dump_sbitmap): J is unsigned; don't use "1L".
	* unroll.c (unroll_loop): Initialize UNROLL_NUMBER.
	* varasm.c (compare_constant_1): Add cast to avoid warning.
	* config/alpha/alpha.c (alpha_emit_xfloating_libcall): Cast FUNC
	to (char *).
	(alpha_expand_unaligned_load, alpha_expand_unaligned_store):
 	Cast switch operand of size to int.
	(alpha_expand_epilogue): Always initialize fp_offset and sa_reg.
	* config/alpha/alpha.h (INITIAL_ELIMINATION_OFFSET): Add abort
	in unhandled case.

From-SVN: r32060
2000-02-18 20:27:00 -05:00
Kaveh R. Ghazi a94ae8f5dd genattr.c: PROTO -> PARAMS.
* genattr.c: PROTO -> PARAMS.
        * genattrtab.c: Likewise.
        * gencheck.c: Likewise.
        * gencodes.c: Likewise.
        * genconfig.c: Likewise.
        * genemit.c: Likewise.
        * genextract.c: Likewise.
        * genflags.c: Likewise.
        * gengenrtl.c: Likewise.
        * genopinit.c: Likewise.
        * genoutput.c: Likewise.
        * genpeep.c: Likewise.
        * genrecog.c: Likewise.

From-SVN: r31457
2000-01-17 15:17:38 +00:00
Hans-Peter Nilsson 8f496bc2d5 ns32k.md: Revert Jan 9 change.
* config/ns32k/ns32k.md: Revert Jan 9 change.

	* genrecog.c (maybe_both_true_2): Do not compare a predicate-test
	to a mode-test, if the predicate is address_operand.

From-SVN: r31384
2000-01-13 10:19:39 +00:00
Kaveh R. Ghazi 0ce8a59c2b elfos.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around assignment used as truth value.
* elfos.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around
	assignment used as truth value.

	* function.c (assign_temp): Mark parameter `dont_promote' with
	ATTRIBUTE_UNUSED.  Wrap variable `unsignedp' with macro
	PROMOTE_FOR_CALL_ONLY.

	* genrecog.c (write_subroutine): Mark variable `operands' with
	ATTRIBUTE_UNUSED.

	* optabs.c (prepare_cmp_insn): Mark parameter `align' with
	ATTRIBUTE_UNUSED.

	* sdbout.c (sdbout_init): Likewise for parameter `asm_file'.
	(sdbout_begin_block, sdbout_end_block): Likewise for `file'.

	* toplev.c (note_deferral_of_defined_inline_function): Likewise
	for `decl'.

From-SVN: r31293
2000-01-09 14:23:35 +00:00
Herman A.J. ten Brugge 0deeec4e12 * genrecog.c (change_state) Corrected typo.
From-SVN: r31141
1999-12-30 09:48:52 -08:00
Kaveh R. Ghazi 913d08334a c-common.c (check_format_info): Don't call a variadic function with a non-literal format string.
* c-common.c (check_format_info): Don't call a variadic function
	with a non-literal format string.

	* c-decl.c (grokdeclarator, start_struct, finish_struct): Likewise.

	* c-typeck.c (build_component_ref, build_unary_op, lvalue_or_else,
	pedantic_lvalue_warning, error_init, pedwarn_init, warning_init):
	Likewise.

	* cccp.c (check_macro_name, do_xifdef, vwarning_with_line):
	Likewise.

	* collect2.c (collect_wait): Likewise.

	* dbxout.c (dbxout_type): Likewise.

	* gcc.c (do_spec_1): Likewise.

	* genemit.c (gen_insn, gen_expand): Likewise.

	* genrecog.c (write_switch, write_subroutine): Likewise.

	* mips-tfile.c (catch_signal, botch): Likewise.

	* print-rtl.c (print_rtx): Likewise.

	* toplev.c (default_print_error_function, report_error_function,
	_fatal_insn): Likewise.

From-SVN: r30666
1999-11-25 16:58:32 +00:00
Richard Henderson 1e19333726 * genrecog.c (write_switch): Check for duplicate CODE cases.
From-SVN: r30276
1999-10-30 14:40:05 -07:00
Kaveh R. Ghazi 36f0e0a60c final.c (peephole): Delete prototype.
* final.c (peephole): Delete prototype.

        * gcse.c (process_insert_insn, pre_edge_insert): Add prototypes.
        (pre_insert_copies): Remove unused variable `bb'.

        * genrecog.c (debug_decision_0, debug_decision_list, main): Add
        prototypes.

        * output.h (peephole): Add prototype.

From-SVN: r30144
1999-10-24 19:23:11 +00:00
Richard Henderson aece2740ac genrecog.c (message_with_line): Prototype.
* genrecog.c (message_with_line): Prototype.
        (validate_pattern): Pass along the set for the dest, not a flag.
        Fix non-lvalue message.  Don't warn for VOIDmode SET_DEST of CALL.
        Check for PC/CC0 as sources.
        (nodes_identical): Check for children position match before
        allowing the combination.

        * rtl.c (read_rtx): Track line number across \\\n.

From-SVN: r30010
1999-10-14 23:56:28 -07:00
Richard Henderson 556ffcc552 recog.c (pmode_register_operand): New.
* recog.c (pmode_register_operand): New.
        * recog.h: Declare it.
        * genrecog.c (pred_codes): Likewise.
        (special_mode_pred_table): Likewise.
        (validate_pattern): Don't warn no mode for address_operand.

        * print-rtl.c (print_rtx) [LABEL_REF]: Only do full subexpression
        if the operand is not insn-like.

From-SVN: r29995
1999-10-14 18:52:29 -07:00
Richard Henderson 476a33f414 genrecog.c (validate_pattern): Condense the destination non-lvalue message.
* genrecog.c (validate_pattern): Condense the destination
        non-lvalue message.

From-SVN: r29974
1999-10-14 04:01:59 -07:00
Richard Henderson 25238622ec genrecog.c (validate_pattern): Typo last change.
* genrecog.c (validate_pattern): Typo last change.  Verify
        that output operands have output reloads.

From-SVN: r29968
1999-10-14 02:58:41 -07:00
Richard Henderson 8fe0ca0c07 genrecog.c (special_mode_pred_table): New.
* genrecog.c (special_mode_pred_table): New.
        (NUM_SPECIAL_MODE_PREDS): New.
        (find_operand): New.
        (validate_pattern): New argument `insn'.  Warn for assignment to
        any predicate accepting non-lvalues.  Conditionaly warn for
        match_operand without a mode.  Try much harder to match source
        and destination modes on a set.
        * tm.texi (SPECIAL_MODE_PREDICATES): Document.

From-SVN: r29967
1999-10-14 02:37:31 -07:00
Richard Henderson 4dc320a596 genrecog.c (maybe_both_true_2): Don't compare modes of two DT_pred tests.
* genrecog.c (maybe_both_true_2): Don't compare modes of
        two DT_pred tests.
        (process_tree): Elide peephole2_insns.  Invoke simplify_tests
        after find_afterward.
        (debug_decision_1): Dump next and afterward codes.

Co-Authored-By: Jim Wilson <wilson@cygnus.com>

From-SVN: r29958
1999-10-13 21:07:03 -07:00
Richard Henderson bcdaba58ff rtl.c (dump_and_abort): Remove.
* rtl.c (dump_and_abort): Remove.
        (fatal_with_file_and_line): New.
        (fatal_expected_char): New.
        (read_rtx_lineno, read_rtx_filename): New.
        (read_skip_spaces): Track line number.
        (read_name): Use fatal_with_file_and_line.
        (read_rtx): Use fatal_expected_char.  Track line number.
        * rtl.h (read_rtx_filename, read_rtx_lineno): Declare.

        * print-rtl.c (print_rtx): Don't special case LABEL_REF argument
        if it isn't a CODE_LABEL.

        * genattr.c (main): Set read_rtx_filename.
        * genattrtab.c (main): Likewise.
        * gencodes.c (main): Likewise.
        * genconfig.c (main): Likewise.
        * genemit.c (main): Likewise.
        * genextract.c (main): Likewise.
        * genflags.c (main): Likewise.
        * genopinit.c (main): Likewise.
        * genoutput.c (main): Likewise.
        * genpeep.c (main): Likewise.

        * genrecog.c (decision_test.u.insn): Add `lineno'.
        (pattern_lineno, error_count): New variables.
        (message_with_line): New.
        (add_to_sequence): Break out checking code to ...
        (validate_pattern): ... here.  Detect SET_DEST matching CONST_INT.
        (merge_insn): Use message_with_line.
        (make_insn_sequence): Use validate_pattern.  Record insn lineno.
        (main): Set read_rtx_filename, pattern_lineno.  Exit early on error.

From-SVN: r29957
1999-10-13 20:43:49 -07:00
Richard Henderson e8f9b13a30 genrecog.c (write_subroutine): Careful for null trees.
* genrecog.c (write_subroutine): Careful for null trees.
        (process_tree): Don't elide empty functions.

From-SVN: r29948
1999-10-13 10:22:40 -07:00
Richard Henderson c3693cb121 genrecog.c (add_to_sequence): Thinko last change: delete shadowing allow_const_int variable.
* genrecog.c (add_to_sequence): Thinko last change: delete
        shadowing allow_const_int variable.

From-SVN: r29891
1999-10-10 12:04:29 -07:00
Richard Henderson ec1c89e60a genrecog.c (add_to_sequence): Move allow_const_int test outside known predicate block...
* genrecog.c (add_to_sequence): Move allow_const_int test outside
        known predicate block; default allow_const_int true.

From-SVN: r29885
1999-10-10 02:43:26 -07:00
Kaveh R. Ghazi b1afd7f4e0 Makefile.in (insn-recog.o): Depend on hard-reg-set.h and resource.h.
* Makefile.in (insn-recog.o): Depend on hard-reg-set.h and resource.h.

        * alpha.h (ASM_OUTPUT_MI_THUNK): Pass the correct number of
        arguments to `current_file_function_operand'.

        * genrecog.c: Include hard-reg-set.h and resource.h in the
        generated output file.

        * real.c: Include tm_p.h.

cp:
        * method.c: Include tm_p.h.

From-SVN: r29869
1999-10-08 17:10:19 +00:00
Richard Henderson c2d9fa7b17 genrecog.c (add_to_sequence): Disable mode check for wildcard matches.
* genrecog.c (add_to_sequence): Disable mode check for
        wildcard matches.

From-SVN: r29857
1999-10-07 12:02:36 -07:00
Richard Henderson 2224ac3c4e genrecog.c (add_to_sequence): Verify operand to label_ref is VOIDmode.
* genrecog.c (add_to_sequence): Verify operand to label_ref is
        VOIDmode.

From-SVN: r29844
1999-10-06 12:24:28 -07:00
Richard Henderson 09051660d2 Rewrite to use independant test structures.
From-SVN: r29822
1999-10-04 22:18:54 -07:00
Richard Henderson ace91ff1e6 Typo last change.
From-SVN: r29576
1999-09-21 23:53:35 -07:00
Jan Hubicka 00ec6daa3c Jan Hubicka <hubicka@freesoft.cz>
* genrecog.c (not_both_true): Handle correctly cases when called for
        tests with different positions in the insn.

From-SVN: r29573
1999-09-21 18:40:28 -07:00
Bernd Schmidt 6baf1cc8f8 Make it possible to prototype port-specific functions (and convert i386 to use this)
From-SVN: r29514
1999-09-20 10:00:03 +00:00
Kaveh R. Ghazi 92a438d13c system.h (CTYPE_CONV, [...]): New macros.
* system.h (CTYPE_CONV, TOUPPER, TOLOWER): New macros.  Use
	CTYPE_CONV in all ctype macros.

	* cccp.c (initialize_char_syntax): Use uppercase ctype macro
	from system.h.

	* cexp.y (initialize_random_junk): Likewise.

	* c4x.c (c4x_interrupt_function_p, c4x_handle_pragma): Likewise.

	* i370.c (handle_pragma): Likewise.

	* i370.h (ASM_OUTPUT_LABELREF, ASM_OUTPUT_ASCII): Likewise.

	* v850.c (override_options): Likewise.

	* doprint.c (_doprnt): Likewise.

	* fixinc/fixincl.c (main, quoted_file_exists, extract_quoted_files):
	Likewise.

	* fixinc/server.c (load_data): Likewise.

	* fold-const.c (real_hex_to_f): Likewise.

	* genattr.c (write_upcase, gen_attr): Likewise.

	* genattrtab.c (convert_const_symbol_ref, evaluate_eq_attr,
	write_upcase): Likewise.

	* genemit.c (print_code): Likewise.

	* genopinit.c (gen_insn): Likewise.

	* genpeep.c (print_code): Likewise.

	* genrecog.c (print_code): Likewise.

	* optabs.c (init_libfuncs): Likewise.

ch:

	* lex.c (maybe_downcase, getlc, handle_generic_pragma,
	check_newline): Likewise.

f:

	* bad.c (ffebad_finish): Likewise.

	* fini.c (main): Likewise.

	* intrin.c (ffeintrin_init_0): Likewise.

	* lex.c (ffelex_hash_): Likewise.

	* src.c (ffesrc_init_1): Likewise.

From-SVN: r29463
1999-09-16 22:20:44 +00:00
Kaveh R. Ghazi c1b59dce97 genattr.c (main): Add extern prototype.
* genattr.c (main): Add extern prototype.  Call return, not exit.
	* genattrtab.c (main): Likewise.
	* gencheck.c (main): Likewise.
	* gencodes.c (main): Likewise.
	* genconfig.c (main): Likewise.
	* genemit.c (main): Likewise.
	* genextract.c (main): Likewise.
	* genflags.c (main): Likewise.
	* gengenrtl.c (main): Likewise.
	* genopinit.c (main): Likewise.
	* genoutput.c (main): Likewise.
	* genpeep.c (main): Likewise.
	* genrecog.c (main): Likewise.

	* genattr.c (get_insn_name): Mark parameter with ATTRIBUTE_UNUSED.
	* genattrtab.c (get_insn_name): Likewise.
	* gencodes.c (get_insn_name): Likewise.
	* genconfig.c (get_insn_name): Likewise.
	* genemit.c (get_insn_name): Likewise.
	* genextract.c (get_insn_name): Likewise.
	* genflags.c (get_insn_name): Likewise.
	* genopinit.c (get_insn_name): Likewise.
	* genpeep.c (get_insn_name): Likewise.

	* gencheck.c (usage): Add static prototype.
	* genextract.c (print_path): Constify a char*.
	* genopinit.c (optabs): Likewise.
	* genoutput.c (operand_data, data, output_predicate_decls,
	compare_operands): Likewise.
	* genrecog.c (write_tree): Add default case in switch.

From-SVN: r29434
1999-09-15 14:13:50 +00:00
Richard Henderson 5126c35a62 * genrecog.c (add_to_sequence): Rename MATCH_INSN2.
From-SVN: r29423
1999-09-14 20:32:55 -07:00
Kaveh R. Ghazi 341a243eaf c-pragma.c (handle_pragma_token): Wrap variables `name' and `value' in HANDLE_PRAGMA_WEAK.
* c-pragma.c (handle_pragma_token): Wrap variables `name' and
       `value' in HANDLE_PRAGMA_WEAK.  Wrap variable `align' in
       HANDLE_PRAGMA_PACK||HANDLE_PRAGMA_PACK_PUSH_POP.

       * genrecog.c (make_insn_sequence): Call memset, not bzero.

       * jump.c (find_insert_position): Don't declare or define unless
       !HAVE_conditional_arithmetic.
       (returnjump_p_1, delete_prior_computation): Add static prototypes.

       * mips-tdump.c (fatal, fancy_abort, main): Add extern prototypes.

       * recog.c (offsettable_address_p): Prototype function pointer.
       (preprocess_constraints): Call memset, not bzero.

       * tree.c (tree_node_kind_names): Constify a char*.  Make static.
       (gcc_obstack_init): Don't declare.
       (fix_sizetype): Add static prototype.
       (gcc_obstack_init): Use prototype casts in call to _obstack_begin.
       (tree_cons): Call memset, not bzero.

       * varasm.c (remove_from_pending_weak_list): Wrap declaration and
       definition in macro ASM_WEAKEN_LABEL.
       (mark_const_hash_entry): Add static prototype.

From-SVN: r29410
1999-09-14 18:19:09 +00:00
Richard Henderson a995e389c4 Replace insn_foo with insn_data.foo.
From-SVN: r29358
1999-09-12 05:46:08 -07:00