Commit Graph

314 Commits

Author SHA1 Message Date
Kaveh R. Ghazi 703ad42b4b alias.c [...]: Remove unnecessary casts.
* alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c
	c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in
	c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c
	collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c
	cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c
	cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c
	dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c
	fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c
	gcse.c genattr.c genattrtab.c genautomata.c genconditions.c
	genemit.c genextract.c genoutput.c genrecog.c gensupport.c
	ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c
	integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c
	loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c
	postreload.c prefix.c print-tree.c protoize.c ra-build.c
	ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c
	regmove.c regrename.c reload.c reload1.c reorg.c resource.c
	sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c
	simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c
	tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c
	varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary
	casts.

From-SVN: r69587
2003-07-19 14:47:15 +00:00
Andreas Jaeger 502b832280 except.c: Convert prototypes to ISO C90.
* except.c: Convert prototypes to ISO C90.
	* except.h: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* et-forest.h: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.

From-SVN: r68674
2003-06-29 18:21:58 +02:00
Kazu Hirata f9da506452 alloc-pool.c: Fix comment formatting.
* alloc-pool.c: Fix comment formatting.
	* bitmap.c: Likewise.
	* bitmap.h: Likewise.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* caller-save.c: Likewise.
	* cfganal.c: Likewise.
	* cfgrtl.c: Likewise.
	* collect2.c: Likewise.
	* cse.c: Likewise.
	* df.c: Likewise.
	* diagnostic.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* expmed.c: Likewise.
	* final.c: Likewise.
	* flags.h: Likewise.
	* fold-const.c: Likewise.
	* gcc.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* genattrtab.c: Likewise.
	* genautomata.c: Likewise.
	* libgcov.c: Likewise.
	* mips-tfile.c: Likewise.
	* optabs.c: Likewise.
	* prefix.c: Likewise.
	* rtlanal.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* toplev.c: Likewise.
	* varasm.c: Likewise.
	* vmsdbgout.c: Likewise.

From-SVN: r68672
2003-06-29 13:53:12 +00:00
Kazu Hirata b20b352b6b ChangeLog.1: Fix a typo.
* ChangeLog.1: Fix a typo.
	* cfgrtl.c: Fix comment typos.
	* dwarf2out.c: Likewise.
	* expmed.c: Likewise.
	* genrecog.c: Likewise.
	* jump.c: Likewise.
	* rtlanal.c: Likewise.
	* ssa-dce.c: Likewise.
	* toplev.c: Likewise.

From-SVN: r68374
2003-06-23 16:11:56 +00:00
Richard Henderson 8433f113b6 re PR middle-end/10475 (ICE in subreg_highpart_offset for code with long long)
PR middle-end/10475
        * expmed.c (emit_store_flag): Use simplify_gen_subreg directly
        for extracting sub-words.
	* gcc.c-torture/compile/20030612-1.c: New.

From-SVN: r67865
2003-06-12 17:34:04 -07:00
Olivier Hainque 0d2f38ee40 expmed.c (extract_bit_field): Reverse operands of && condition to prevent a potential division by zero in the...
* expmed.c (extract_bit_field): Reverse operands of && condition to
        prevent a potential division by zero in the previously first branch.
	* config/pa/pa.md (extv, extzv): FAIL if the bitfield length is zero.

From-SVN: r65907
2003-04-21 17:32:06 -04:00
Richard Kenner 21102f257e * expmed.c (mask_rtx): Avoid undefined shifts for BITSIZE of 0.
From-SVN: r65796
2003-04-18 18:27:18 -04:00
Jan Hubicka 1c4a429ab0 expmed.c (expand_divmod): Undo sign extensions for unsigned operands
* expmed.c (expand_divmod): Undo sign extensions for unsigned operands

	* cfgcleanup.c (try_forward_edges):  Don't check loop structures
	when not optimizing.
	(cleanup_cfg): Do not iterate trought delete_trivially_dead_insns
	when not expensive.
	* toplev.c (rest_of_compilation):  Duplicate loop headers only when
	optimizing;  Delete trivially dead insns early; fix optimize check.

	* Makefile.in (c-decl.o, c-objc-common.o, cgraph.o, tree-inline.o): Add
	dependency on cgraph.h
	* c-decl.c: Include cgraph.h
	(finish_function): Update call of tree_inlinable_function_p.
	* c-objc-common.c: Include cgraph.h
	* cgraph.h: New file.
	* cgraphunit.c: New file.
	* cgraph.c (cgraph_node, cgraph_edge): Move into cgraph.h
	(cgraph_nodes, cgraph_n_nodes): Globalize.
	(cgraph_finalize_function, cgraph_finalize_compilation_unit
	cgraph_create_edges, cgraph_optimize, cgraph_mark_needed_node):
	Move into cgraphunit.c
	* tree-inline.c: Include cgraph.h
	* tree-inline.c: Include cgraph.h

From-SVN: r63281
2003-02-22 10:02:31 +00:00
Andreas Schwab 32214c3253 cfgloopmanip.c (create_preheader): Initialize src to avoid warning.
* cfgloopmanip.c (create_preheader): Initialize src to avoid
	warning.

	* expmed.c (emit_store_flag): Fix cast to avoid sign
	comparison warning.

From-SVN: r61962
2003-01-28 11:05:18 +00:00
Zack Weinberg 4977bab6ed Merge basic-improvements-branch to trunk
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Kazu Hirata 09da15320b c-decl.c: Fix a comment typo.
* c-decl.c: Fix a comment typo.
	* cfg.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfglayout.c: Likewise.
	* cfgrtl.c: Likewise.
	* c-typeck.c: Likewise.
	* dominance.c: Likewise.
	* dwarf2asm.c: Likewise.
	* dwarfout.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* flow.c: Likewise.
	* function.c: Likewise.
	* gcc.c: Likewise.
	* genautomata.c: Likewise.
	* integrate.c: Likewise.
	* loop.c: Likewise.
	* loop.h: Likewise.
	* output.h: Likewise.
	* profile.c: Likewise.
	* ra.h: Likewise.
	* reload1.c: Likewise.
	* reload.c: Likewise.
	* sched-rgn.c: Likewise.
	* stmt.c: Likewise.
	* tree.h: Likewise.
	* vmsdbgout.c: Likewise.

From-SVN: r60085
2002-12-13 00:17:22 +00:00
Steve Ellcey 9ac3e73b40 tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition.
* doc/tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition.
	* defaults.h (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition.
	* calls.c (store_unaligned_arguments_into_pseudos) Remove
	FUNCTION_ARG_REG_LITTLE_ENDIAN.
	* stmt.c (expand_return): Ditto.
	* expr.c (move_block_from_reg): Ditto.
	(copy_blkmode_from_reg): Ditto.
	* expmed.c (store_bit_field): Ditto.

From-SVN: r59962
2002-12-09 17:54:07 +00:00
J"orn Rennecke 7ffc9761ca expmed.c (store_bit_field): Use int_mode_for_mode to find corresponding mode of non-integer mode...
* expmed.c (store_bit_field): Use int_mode_for_mode to find
	corresponding mode of non-integer mode, unless it is VOIDmode.

From-SVN: r59716
2002-12-02 14:44:17 +00:00
Steve Ellcey 8efb33ec2d * expmed.c (store_bit_field): Check FUNCTION_ARG_REG_LITTLE_ENDIAN.
From-SVN: r58694
2002-10-31 20:43:07 +00:00
John David Anglin 6ca6193b82 * expmed.c (extract_bit_field): Fix bit-field extraction from SUBREGs.
From-SVN: r57629
2002-09-29 18:25:20 +00:00
Kazu Hirata cc2902df52 dbxout.c: Follow spelling conventions.
* dbxout.c: Follow spelling conventions.
	* defaults.h: Likewise.
	* df.c: Likewise.
	* diagnostic.h: Likewise.
	* doloop.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* flags.h: Likewise.
	* flow.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* gcc.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* genconfig.c: Likewise.
	* genrecog.c: Likewise.
	* ggc-page.c: Likewise.
	* ggc.h: Likewise.
	* global.c: Likewise.
	* gthr-win32.h: Likewise.
	* integrate.c: Likewise.
	* jump.c: Likewise.
	* langhooks.c: Likewise.
	* langhooks.h: Likewise.
	* line-map.h: Likewise.
	* local-alloc.c: Likewise.
	* longlong.h: Likewise.
	* loop.c: Likewise.
	* loop.h: Likewise.

From-SVN: r57406
2002-09-22 14:09:34 +00:00
David S. Miller 556a56acec sparc.c (INIT_TARGET_OPTABS): If ARCH64, set the 32-bit ABI libfuncs to NULL.
2002-06-24  David S. Miller  <davem@redhat.com>

	* config/sparc/sparc.c (INIT_TARGET_OPTABS): If ARCH64, set the
	32-bit ABI libfuncs to NULL.

	* expmed.c (expand_divmod): Do not set optab1/optab2 to the shift
	optabs if op1 is const0_rtx.

From-SVN: r54950
2002-06-24 03:08:38 -07:00
Richard Henderson 5c45425b5c * expmed.c (make_tree): Handle SIGN_EXTEND/ZERO_EXTEND.
From-SVN: r54716
2002-06-17 13:56:15 -07:00
David S. Miller 2acf0fa92e expmed.c (init_expmed): Remove duplicate init of 'reg'.
2002-06-13  David S. Miller  <davem@redhat.com>

	* expmed.c (init_expmed): Remove duplicate init of 'reg'.

From-SVN: r54580
2002-06-13 02:37:19 -07:00
Kazu Hirata 0fb7aedacd emit-rtl.c: Likewise.
* emit-rtl.c: Likewise.
	* errors.h: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.

From-SVN: r54197
2002-06-03 01:13:17 +00:00
Eric Botcazou ce60bf25b2 expmed.c (const_mult_add_overflow_p): New.
* expmed.c (const_mult_add_overflow_p): New.
        * expr.h: Declare it.
        * loop.c (maybe_eliminate_biv_1) [COMPARE]: Use it.
        Don't eliminate the biv if the giv has a constant multiplier and
        the rhs argument of the comparison does satisfy the predicate.
        Use expand_mult_add to compute the replacement constant.

From-SVN: r54075
2002-05-30 14:33:32 -07:00
Richard Henderson 28ce94d46b re PR c/2035 (ICE in extract_bit_field, at expmed.c:1115)
PR c/2035
        * expmed.c (extract_bit_field): Fall through to generic code rather
        than aborting on subreg special case.

From-SVN: r52777
2002-04-25 19:09:21 -07:00
Tom Rix b7c89afe90 Generate constant for shift once.
From-SVN: r52644
2002-04-22 23:20:12 +00:00
Neil Booth ceef8ce4b4 c-common.c (unsigned_conversion_warning, [...]): Use new hooks.
* c-common.c (unsigned_conversion_warning, convert_and_check,
	unsigned_type, signed_type, shorten_compare,
	c_common_get_alias_set, c_common_nodes_and_builtins): Use new hooks.
	(unsigned_type, signed_type, signed_or_unsigned_type): Rename.
	* c-common.h (unsigned_type, signed_type, signed_or_unsigned_type):
	New.
	* c-decl.c (grokdeclarator): Update.
	* c-format.c (check_format_types): Update.
	* c-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
	LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
	* c-typeck.c (build_binary_op, convert_for_assignment): Update.
	* convert.c (convert_to_integer): Use new hooks.
	* expmed.c (make_tree): Use new hooks.
	* expr.c (store_expr): Use new hooks.
	* fold-const.c (operand_equal_for_comparison_p, build_range_check,
	all_ones_mask_p, unextend, fold): Use new hooks.
	* langhooks.h (struct lang_hooks_for_types): New hooks.
	* tree.h (signed_or_unsigned_type, signed_type,
	unsigned_type): Remove.
ada:
	* gigi.h (unsigned_type, signed_type, signed_or_unsigned_type):
	Rename.
	* misc.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
	LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
	* trans.c (tree_transform, convert_with_check): Update.
	* utils.c (unsigned_type, signed_type, signed_or_unsigned_type):
	Rename.
cp:
	* cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
	LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
	* decl.c (grokdeclarator): Update.
	* mangle.c (write_integer_cst): Update.
	* typeck.c (build_binary_op): Update.
f:
	* com.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
	LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
	(unsigned_type, signed_type, signed_or_unsigned_type): Rename.
java:
	* expr.c (build_java_binop): Update.
	* java-tree.h (java_signed_type, java_unsigned_type,
	java_signed_or_unsigned_type): Update.
	* lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
	LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
	* parse.y (patch_binop): Update.
	* typeck.c (signed_or_unsigned_type, unsigned_type,
	signed_type): Update.
objc:
	* objc-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
	LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.

From-SVN: r51684
2002-04-01 08:46:10 +00:00
Neil Booth b0c4822985 Makefile.in (convert.o, [...]): Update.
* Makefile.in (convert.o, calls.o, expmed.o): Update.
	* attribs.c (handle_mode_attribute, handle_vector_size_attribute):
	Use new hooks.
	* builtin-types.def (BT_PTRMODE): Update.
	* c-common.c (type_for_size): Rename c_common_type_for_size.
	(type_for_mode): Similarly.
	(shorten_compare, pointer_int_sum, c_common_nodes_and_builtins):
	Use new hook.
	* c-bommon.h (c_common_type_for_size, c_common_type_for_mode): New.
	* c-decl.c (finish_enum, build_enumerator): Use new hooks.
	* c-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
	Redefine.
	* c-typeck.c (common_type, comptypes, default_conversion):
	Use new hooks.
	* calls.c: Include langhooks.h.
	(emit_library_call_value_1): Use new hooks.  Avoid redundant
	calls.
	* convert.c: Include langhooks.h
	(convert_to_pointer, convert_to_integer): Use new hooks.
	* except.c (init_eh): Similarly.
	* expmed.c: Include langhooks.h.
	(expand_mult_add): Use new hooks.
	* expr.c (store_expr, store_constructor, expand_expr, do_jump,
	try_casesi): Similarly.
	* fold-const.c (optimize_bit_field_compare, make_range,
	decode_field_reference, fold_truthop, fold): Similarly.
	* function.c (assign_stack_local_1, assign_stack_temp_for_type,
	put_var_into_stack): Similarly.
	* langhooks-def.h (LANG_HOOKS_TYPE_FOR_MODE,
	LANG_HOOKS_TYPE_FOR_SIZE): New.
	(LANG_HOOKS_TYPES_INITIALIZER): Update.
	* langhooks.h (lang_hooks_for_types): New hooks.
	* stmt.c (expand_decl_cleanup, emit_case_nodes): Use new hooks.
	* tree.c (get_unwidened, get_narrower): Similarly.
	* tree.h (type_for_mode, type_for_size): Remove.
	* varasm.c (force_const_mem): Use new hooks.
ada:
	* gigi.h (type_for_size, type_for_mode): Rename.
	* misc.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
	Redefine.
	* trans.c (tree_transform): Update.
	* utils.c (gnat_init_decl_processing, init_gigi_decls,
	builtin_function, float_type_for_size, signed_or_unsigned_type,
	build_vms_descriptor, unchecked_convert): Update.
	(type_for_mode, type_for_size): Rename.
	* utils2.c (nonbinary_modular_operation): Update.
cp:
	* cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
	Redefine.
	* cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
	* decl.c (finish_enum): Similarly.
	* error.c (dump_type): Similarly.
	* lex.c (cxx_init): Similarly.
	* mangle.c (write_builtin_type): Similarly.
	* typeck.c (comptypes): Similarly.
f:
	* com.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
	Redefine.
	(type_for_mode, type_for_size): Rename.
	(signed_or_unsigned_type, signed_type, truthvalue_conversion,
	unsigned_type):	Use new hooks.
java:
	* Make-lang.in (builtins.o): Update.
	* boehm.c (get_boehm_type_descriptor): Update.
	* builtins.c: Include langhooks.h.
	* decl.c (java_init_decl_processing): Update.
	* java-tree.h (java_type_for_mode, java_type_for_size): New.
	* lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
	Redefine.
	* typeck.c (type_for_mode, type_for_size): Update.
objc:
	* objc-act.c (handle_impent): Update.
	* objc-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
	Redefine.

From-SVN: r51571
2002-03-29 21:46:27 +00:00
Lars Brinkhoff 2496c7bd5f emit-rtl.c (gen_int_mode): New function.
* 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-19 10:00:43 -08:00
Aldy Hernandez 4e9bb42b21 expmed.c (store_bit_field): Reset alias set for memory.
2002-03-13  Aldy Hernandez  <aldyh@redhat.com>

        * expmed.c (store_bit_field): Reset alias set for memory.
        (extract_bit_field): Same.

From-SVN: r50706
2002-03-13 02:03:36 +00:00
Jakub Jelinek 170c56da73 expmed.c (emit_store_flag): Don't test BITS_PER_WORD * 2 wide volatile memory by parts.
* expmed.c (emit_store_flag): Don't test BITS_PER_WORD * 2
	wide volatile memory by parts.

	* gcc.c-torture/compile/20020304-2.c: New test.

From-SVN: r50314
2002-03-05 12:10:43 +01:00
Richard Henderson 32b069d30c expmed.c (store_bit_field): Prevent generation of CONCATs...
* expmed.c (store_bit_field): Prevent generation of CONCATs;
        pun complex values as integers; use gen_lowpart instead of
        gen_rtx_SUBREG.
        (extract_bit_field): Likewise.

From-SVN: r50185
2002-03-01 00:13:04 -08:00
Geoffrey Keating 4e07d762e9 Index: ChangeLog
* expmed.c (expand_shift): Correctly test for low part of a
	subreg.

Index: testsuite/ChangeLog

	* gcc.c-torture/execute/20020225-2.c: New test.

From-SVN: r50114
2002-02-27 20:27:38 +00:00
Eric Christopher c410d49e43 expmed.c (store_bit_field): Try to simplify the subreg before generating a new one when...
2002-02-21  Eric Christopher  <echristo@redhat.com>

	* expmed.c (store_bit_field): Try to simplify the subreg
	before generating a new one when when the mode size of
	value is less than maxmode.

From-SVN: r49946
2002-02-22 00:07:06 +00:00
Jakub Jelinek 22273300ad re PR c++/4574 (Internal compiler error in `expand_and', at expmed.c:4055)
PR c++/4574
	* expr.h (expand_and): Add mode argument.
	* expmed.c (expand_and): Add mode argument.
	(expand_mult_highpart_adjust, emit_store_flag): Adjust callers.
	* expr.c (store_field, expand_expr, do_store_flag): Likewise.
	* except.c (expand_builtin_extract_return_addr): Likewise.
	* config/alpha/alpha.c (alpha_initialize_trampoline): Likewise.
	* config/sparc/sparc.c (sparc_initialize_trampoline): Likewise.
	* config/c4x/c4x.h (INITIALIZE_TRAMPOLINE): Likewise.
	Use GEN_INT (x) instead of gen_rtx (CONST_INT, VOIDmode, x).
	* config/c4x/c4x.md: Use GEN_INT (x) instead of
	gen_rtx (CONST_INT, VOIDmode, x).

	* gcc.dg/20020220-1.c: New test.

From-SVN: r49938
2002-02-21 22:11:08 +01:00
Diego Novillo 420e7dfad9 expmed.c (store_bit_field): Do not store bit fields using SUBREG operations if...
* expmed.c (store_bit_field): Do not store bit fields using SUBREG
	operations if the field does not start at a mode boundary.

From-SVN: r49899
2002-02-20 08:53:13 -05:00
Aldy Hernandez 69ef87e2bc i386.md ("mmx_uavgv8qi3"): Use const_vector.
2002-02-19  Aldy Hernandez  <aldyh@redhat.com>

	* config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector.
	("mmx_uavgv4hi3"): Same.
	("pmulhrwv4hi3"): Same.

	* tree-inline.c (walk_tree): Handle vectors.

	* c-common.c (constant_expression_warning): Handle vectors.
	(overflow_warning): Same.

	* sched-deps.c (sched_analyze_2): Handle vectors.

	* rtlanal.c (rtx_unstable_p): Handle vectors.
	(rtx_varies_p): Same.
	(count_occurrences): Same.
	(regs_set_between_p): Same.
	(modified_between_p): Same.
	(modified_in_p): Same.
	(volatile_insn_p): Same.
	(volatile_refs_p): Same.
	(side_effects_p): Same.
	(may_trap_p): Same.
	(inequality_comparisons_p): Same.
	(replace_regs): Same.
	(computed_jump_p_1): Same.

	* rtl.c (DEF_MACHMODE): Change all definitions to accept 8th
	argument.
	(inner_mode_array): New.
	(copy_rtx): Handle vectors.
	(copy_most_rtx): Same.
	(rtx_equal_p): Same.
	(get_mode_alignment): Adjust for vectors.

	* resource.c (mark_referenced_resources): Handle vectors.
	(mark_set_resources): Same.

	* reload1.c (eliminate_regs): Handle vectors.
	(elimination_effects): Same.
	(scan_paradoxical_subregs): Same.

	* reload.c (subst_reg_equivs): Handle vectors.

	* regrename.c (scan_rtx): Handle vectors.

	* regclass.c (reg_scan_mark_refs): Handle vectors.

	* recog.c (find_single_use_1): Handle vectors.

	* local-alloc.c (equiv_init_varies_p): Handle vectors.
	(contains_replace_regs): Same.
	(memref_referenced_p): Same.

	* integrate.c (copy_rtx_and_substitute): Handle vectors.
	(subst_constants): Same.

	* genattrtab.c (attr_copy_rtx): Handle vectors.
	(encode_units_mask): Same.
	(clear_struct_flag): Same.
	(count_sub_rtxs): Same.

	* gcse.c (want_to_gcse_p): Handle vectors.
	(oprs_unchanged_p): Same.
	(hash_expr_1): Same.
	(oprs_not_set_p): Same.
	(expr_killed_p): Same.
	(compute_transp): Same.
	(store_ops_ok): Same.

	* function.c (purge_addressof_1): Do not allow paradoxical subregs
	of vectors.
	(fixup_var_refs_1): Same.
	(instantiate_virtual_regs_1): Same.

	* fold-const.c (operand_equal_p): Handle vectors.
	(fold): Same.
	(rtl_expr_nonnegative_p): Same.

	* flow.c (mark_used_regs): Handle vectors.

	* df.c (df_uses_record): Handle vectors.

	* cselib.c (cselib_subst_to_values): Handle vectors.
	(cselib_mem_conflict_p): Same.
	(hash_rtx): Same.

	* cse.c (canon_reg): Handle vectors.
	(fold_rt): Same.
	(cse_process_notes): Same.
	(count_reg_usage): Same.
	(canon_hash): Same.

	* alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR.

	* combine.c (mark_used_regs_combine): Add case for CONST_VECTOR.

	* emit-rtl.c (init_emit_once): Generate const0_rtx for vectors.
	(gen_rtx): Handle CONST_VECTOR.
	(gen_const_vector_0): New.
	(copy_rtx_if_shared): CONST_VECTORs can be shared.
	(reset_used_flags): Same.
	(copy_insn_1): Same.
	(initializer_constant_valid_p): Handle VECTOR_CST.

	* doc/c-tree.texi (Expression trees): Document VECTOR_CST.

	* doc/rtl.texi (Constants): Document const_vector.
	(CONST0_RTX): Update for vectors.
	(RTL sharing): Same.

	* print-tree.c (print_node): Add case for VECTOR_CST.

	* tree.h (TREE_VECTOR_CST_ELTS): New.
	(struct tree_vector): New.
	(union tree_node): Add vector node.
	(build_vector): Add prototype.

	* tree.def (VECTOR_CST): New.

	* tree.c (build_vector): New.

	* expmed.c (make_tree): Handle CONST_VECTOR.

	* rtl.h (CONSTANT_P): CONST_VECTORs are constants too.
	(CONST_VECTOR_ELT): New.
	(CONST_VECTOR_NUNITS): New.

	* machmode.h (GET_MODE_INNER): New.
	(DEF_MACHMODE): Accept 8th arg.

	* machmode.def: Add 8th argument for vector inner mode.
	Add inner vector modes for vectors.

	* rtl.def (VEC_CONST): Remove.
	(CONST_VECTOR): New.

	* expr.c (clear_storage): Allow vectors.
	(is_zeros_p): Handle VECTOR_CST.

	* varasm.c (output_constant_pool): Handle vectors.
	(rtx_const): Add veclo and vechi fields.
	(kind): Add RTX_VECTOR.
	(decode_rtx_const): Add case for vector.

	* config/rs6000/rs6000-protos.h: Add zero_constant.

	* config/rs6000/rs6000.c (rs6000_emit_move): Handle vector
	constants.  Force easy vector constants into memory.
	(easy_vector_constant): New.
	(emit_easy_vector_constant): New.
	(rs6000_legitimize_reload_address): Do not generate bad reloads on
	darwin.

	* config/rs6000/rs6000.md ("altivec_lvx"): Reflect what
	instruction does.
	("altivec_lvxl"): Same.
	(altivec_lvebx): Same.
	(altivec_lvehx): Same.
	(altivec_lvewx): Same.
	("*movv4si_const0"): New.
	("*movv4sf_const0"): New.
	("*movv8hi_const0"): New.
	("*movv16qi_const0"): New.

From-SVN: r49853
2002-02-19 02:53:41 +00:00
Jakub Jelinek d3c5265862 re PR c/5304 (gcc-20011231 generates incorrect divmod code for chars)
PR c/5304:
	* expmed.c (expand_mult_highpart): Use immed_double_const for wide_op1
	unconditionally.

	* gcc.c-torture/execute/20020201-1.c: New test.

From-SVN: r49416
2002-02-02 00:43:19 +01:00
Zack Weinberg 20d32cc2b5 * expmed.c (emit_store_flag): Call protect_from_queue on op0 and op1.
From-SVN: r49340
2002-01-30 17:29:13 +00:00
Kazu Hirata c99d986a71 expmed.c (extract_fixed_bit_field): Remove unused code.
* expmed.c (extract_fixed_bit_field): Remove unused code.
	* system.h: Poison SLOW_ZERO_EXTEND.
	* doc/tm.texi: Remove.
	* config/1750a/1750a.h (SLOW_ZERO_EXTEND): Remove.
	* config/arm/arm.h: Likewise.
	* config/avr/avr.h: Likewise.
	* config/clipper/clipper.h: Likewise.
	* config/convex/convex.h: Likewise.
	* config/d30v/d30v.h: Likewise.
	* config/dsp16xx/dsp16xx.h: Likewise.
	* config/elxsi/elxsi.h: Likewise.
	* config/fr30/fr30.h: Likewise.
	* config/h8300/h8300.h: Likewise.
	* config/i370/i370.h: Likewise.
	* config/i386/i386.h: Likewise.
	* config/m68k/m68k.h: Likewise.
	* config/mips/mips.h: Likewise.
	* config/ns32k/ns32k.h: Likewise.
	* config/pdp11/pdp11.h: Likewise.
	* config/pj/pj.h: Likewise.
	* config/s390/s390.h: Likewise.
	* config/sh/sh.h: Likewise.
	* config/stormy16/stormy16.h: Likewise.
	* config/v850/v850.h: Likewise.
	* config/vax/vax.h: Likewise.
	* config/we32k/we32k.h: Likewise.

From-SVN: r48893
2002-01-16 02:37:37 +00:00
Kazu Hirata c4f2c49991 cse.c: Fix formatting.
* cse.c: Fix formatting.
	* dwarf2asm.c: Likewise.
	* dwarf2out.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* function.c: Likewise.
	* gcov.c: Likewise.
	* gencheck.c: Likewise.
	* genrecog.c: Likewise.
	* ggc-common.c: Likewise.
	* ggc-page.c: Likewise.
	* global.c: Likewise.

From-SVN: r48570
2002-01-05 22:11:21 +00:00
Jeff Law 8f08e8c010 expmed.c (emit_store_flag): Extract updated comparison code from the return value of compare_from_rtx.
* expmed.c (emit_store_flag): Extract updated comparison code
        from the return value of compare_from_rtx.
        * expr.c (do_store_flag): Similarly.

From-SVN: r48128
2001-12-17 14:20:03 -07:00
Richard Henderson a8c7e72da2 expmed.c (expand_divmod): Ignore sdiv_pow2_cheap for modes in which there is no divide expander.
* expmed.c (expand_divmod): Ignore sdiv_pow2_cheap for modes in
        which there is no divide expander.

From-SVN: r47916
2001-12-11 19:00:01 -08:00
Joseph Myers d6a7951f20 ChangeLog.2, [...]: Fix spelling errors.
* ChangeLog.2, ChangeLog.3, ChangeLog.5, ChangeLog, alias.c,
	cfgbuild.c, expmed.c, expr.c, final.c, flow.c, fold-const.c,
	function.c, config/alpha/alpha.md, config/alpha/vms-ld.c,
	config/arm/arm.c, config/arm/arm.h, config/c4x/libgcc.S,
	config/i370/i370.c, config/i386/i386.c,
	config/i386/i386-interix.h, config/i386/i386.md,
	config/i386/i386.h, config/i386/netbsd-elf.h, config/ia64/ia64.c,
	config/m32r/m32r-protos.h, config/mcore/mcore.h,
	config/rs6000/rs6000.h, config/sparc/linux64.h,
	config/sparc/sparc.c, config/v850/v850-protos.h,
	config/cris/cris.h, config/s390/s390.md, config/elfos.h: Fix
	spelling errors.

From-SVN: r47815
2001-12-09 20:13:19 +00:00
Geoffrey Keating e98f90d363 * expmed.c (extract_bit_field): Don't create invalid SUBREGs.
From-SVN: r47196
2001-11-20 04:12:11 +00:00
Richard Kenner d43e0b7d97 expr.c (store_field): Pass tree instead of max size; callers changed.
* 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.
	* builtins.c: Remove ALIGN parm in call to emit_cmp_and_jump_insns.
	* doloop.c, except.c, explow.c, loop.c, stmt.c, unroll.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.
	* expmed.c: Remove ALIGN arg from calls to compare_from_rtx,
	compare_rtx_and_jump, and emit_cmp_jump_insns.
	* 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/alpha/alpha.c, config/d30v/d30v.c: Reflect above changes.
	* config/clipper/clipper.c, config/h8300/h8300.c: Likewise.
	* config/i386/i386.c,config/mips/mips.c: Likewise.
	* config/i860/i860.c, config/ia64/ia64.c: Likewise.
	* config/rs6000/rs6000.c, config/sh/sh.c: Likewise.
	* 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: r47078
2001-11-15 21:26:42 -05:00
Richard Kenner 04050c690d expmed.c (extract_bit_field): No longer pass in alignment.
* expmed.c (extract_bit_field): No longer pass in alignment.
	(extract_fixed_bit_field, extract_split_bit_field): Likewise.
	(store_bit_field, store_fixed_bit_field, store_split_bit_field):
	Likewise.
	* expr.c (store_constructor, store_constructor_field): Likewise.
	(store_field, emit_group_load, emit_group_store): Likewise.
	* expr.h (emit_group_load, emit_group_store): Delete ALIGN parm.
	(store_bit_field, extract_bit_field): Likewise.
	* calls.c, expr.c, function.c: Change calls to above functions.
	* ifcvt.c, stmt.c: Likewise.

From-SVN: r46926
2001-11-11 06:02:26 -05:00
Jan Hubicka b972dd0201 expmed.c (expand_mult): Force operand to register before computing cost.
* expmed.c (expand_mult): Force operand to register before computing
	cost.
	* i386.c (x86_decompose_lea): New global vairable.
	* i386.h (x86_decompose_lea): Declare.
	(TARGET_DECOMPOSE_LEA): New macro.
	(RTX_COST): Handle leas properly.

From-SVN: r46823
2001-11-07 12:35:16 +00:00
Aldy Hernandez bb33f166a5 expmed.c (store_bit_field): Use simplify_gen_subreg to make SUBREG so we avoid SUBREGing memory.
* expmed.c (store_bit_field): Use simplify_gen_subreg to make
        SUBREG so we avoid SUBREGing memory.

From-SVN: r46721
2001-11-02 22:07:29 +00:00
Stan Shebs b36948478c alias.c: Remove uses of "register" specifier in declarations of arguments and local...
2001-10-10  Stan Shebs  <shebs@apple.com>

        * alias.c: Remove uses of "register" specifier in declarations
        of arguments and local variables.
        * c-common.c: Ditto.
        * c-convert.c: Ditto.
        * c-decl.c: Ditto.
        * c-format.c: Ditto.
        * c-semantics.c: Ditto.
        * c-typeck.c: Ditto.
        * caller-save.c: Ditto.
        * calls.c: Ditto.
        * cfg.c: Ditto.
        * cfgbuild.c: Ditto.
        * cfgrtl.c: Ditto.
        * collect2.c: Ditto.
        * combine.c: Ditto.
        * convert.c: Ditto.
        * cppexp.c: Ditto.
        * cppfiles.c: Ditto.
        * cse.c: Ditto.
        * dbxout.c: Ditto.
        * defaults.h: Ditto.
        * df.c: Ditto.
        * dwarf2out.c: Ditto.
        * dwarfout.c: Ditto.
        * emit-rtl.c: Ditto.
        * explow.c: Ditto.
        * expmed.c: Ditto.
        * expr.c: Ditto.
        * final.c: Ditto.
        * fix-header.c: Ditto.
        * floatlib.c: Ditto.
        * flow.c: Ditto.
        * fold-const.c: Ditto.
        * function.c: Ditto.
        * gcc.c: Ditto.
        * gcse.c: Ditto.
        * gen-protos.c: Ditto.
        * genattrtab.c: Ditto.
        * gencheck.c: Ditto.
        * genconfig.c: Ditto.
        * genemit.c: Ditto.
        * genextract.c: Ditto.
        * genflags.c: Ditto.
        * gengenrtl.c: Ditto.
        * genoutput.c: Ditto.
        * genpeep.c: Ditto.
        * genrecog.c: Ditto.
        * gensupport.c: Ditto.
        * global.c: Ditto.
        * gmon.c: Ditto.
        * graph.c: Ditto.
        * haifa-sched.c: Ditto.
        * hard-reg-set.h: Ditto.
        * hash.c: Ditto.
        * integrate.c: Ditto.
        * jump.c: Ditto.
        * lists.c: Ditto.
        * local-alloc.c: Ditto.
        * loop.c: Ditto.
        * mips-tdump.c: Ditto.
        * mips-tfile.c: Ditto.
        * optabs.c: Ditto.
        * prefix.c: Ditto.
        * print-rtl.c: Ditto.
        * read-rtl.c: Ditto.
        * real.c: Ditto.
        * recog.c: Ditto.
        * reg-stack.c: Ditto.
        * regclass.c: Ditto.
        * regmove.c: Ditto.
        * reload.c: Ditto.
        * reload1.c: Ditto.
        * reorg.c: Ditto.
        * resource.c: Ditto.
        * rtl.c: Ditto.
        * rtlanal.c: Ditto.
        * scan.c: Ditto.
        * sched-deps.c: Ditto.
        * sched-rgn.c: Ditto.
        * sdbout.c: Ditto.
        * simplify-rtx.c: Ditto.
        * stmt.c: Ditto.
        * stor-layout.c: Ditto.
        * toplev.c: Ditto.
        * tradcif.y: Ditto.
        * tradcpp.c: Ditto.
        * tree.c: Ditto.
        * unroll.c: Ditto.
        * varasm.c: Ditto.
        * xcoffout.c: Ditto.

From-SVN: r46173
2001-10-11 03:16:15 +00:00
Kazu Hirata 6d2f888735 calls.c: Fix formatting.
* calls.c: Fix formatting.
	* c-decl.c: Likewise.
	* cfgcleanup.c: Likewise.
	* combine.c: Likewise.
	* cppfiles.c: Likewise.
	* cpplib.c: Likewise.
	* cppmacro.c: Likewise.
	* crtstuff.c: Likewise.
	* cse.c: Likewise.
	* dwarf2out.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* ggc-page.c: Likewise.
	* integrate.c: Likewise.
	* libgcc2.c: Likewise.
	* loop.c: Likewise.
	* optabs.c: Likewise.
	* profile.c: Likewise.
	* protoize.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* reload1.c: Likewise.
	* reload.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* sched-rgn.c: Likewise.
	* sdbout.c: Likewise.
	* stmt.c: Likewise.
	* toplev.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r46145
2001-10-10 11:33:39 +00:00
Roman Zippel 57bfa49ae1 expmed.c (store_bit_field): Update to patch from 2001-08-27: move adjustment of bitpos instead.
* expmed.c (store_bit_field): Update to patch from 2001-08-27:
        move adjustment of bitpos instead.

From-SVN: r45338
2001-08-31 15:54:19 -07:00
Roman Zippel f21bdd05bd expmed.c (store_bit_field): Ignore adjustment to bitpos and use bitnum to decide about register move.
* expmed.c (store_bit_field): Ignore adjustment to bitpos
        and use bitnum to decide about register move.

From-SVN: r45215
2001-08-27 15:43:37 -07:00
Zack Weinberg a242b0831c expmed.c: Default-#define HAVE_insv, HAVE_extv, and HAVE_extzv to zero.
* expmed.c: Default-#define HAVE_insv, HAVE_extv, and HAVE_extzv
	to zero.
	(mode_for_extraction): No need for #ifdefs.  Add default-case abort
	to switch.
	(store_bit_field): Eliminate insv_bitsize variable.  Put HAVE_insv
	in if controlling use of insv.
	(extract_bit_field): Likewise, for extv and extzv.

From-SVN: r45150
2001-08-24 16:01:42 +00:00
Lars Brinkhoff 1322177dbd Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
	bitmap.h, builtin-types.def, builtins.c, builtins.def,
	c-aux-info.c, c-common.c, c-common.def, c-common.h,
	c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
	c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
	c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
	caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
	conditions.h, config.gcc, configure.frag, configure.in,
	conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
	cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
	dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
	doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
	dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
	emit-rtl.c, errors.c, errors.h, except.c, except.h,
	exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
	fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
	function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
	gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
	gencheck.c, gencodes.c, genconfig.c, genemit.c,
	genextract.c, genflags.c, gengenrtl.c, genmultilib,
	genopinit.c, genoutput.c, genpeep.c, genrecog.c,
	gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
	ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
	graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
	gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
	gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
	hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
	integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
	libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
	machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
	mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
	mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
	params.h, predict.c, predict.def, predict.h, prefix.c,
	prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
	read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
	regclass.c, regmove.c, regrename.c, regs.h, reload.c,
	reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
	rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
	sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
	sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
	ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
	stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
	tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
	tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
	unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
	unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
	xcoffout.h: replace "GNU CC" with "GCC".

From-SVN: r45105
2001-08-22 14:35:51 +00:00
Richard Henderson d523b40e8f expmed.c (CODE_FOR_insv, gen_insv): Provide defaults.
* expmed.c (CODE_FOR_insv, gen_insv): Provide defaults.
        (CODE_FOR_extv, gen_extv, CODE_FOR_extzv, gen_extzv): Likewise.
        (store_bit_field): Use mode_for_extraction more places.
        (extract_bit_field): Likewise.

From-SVN: r45099
2001-08-22 00:56:13 -07:00
Zack Weinberg da92057001 expmed.c (mode_for_extraction): New function.
* expmed.c (mode_for_extraction): New function.
	(store_bit_field, extract_bit_field): Use it.
	* expr.h: Prototype it and provide an enum for its first argument.

	* combine.c, function.c, recog.c: Don't include insn-codes.h.
	Use mode_for_extraction rather than testing HAVE_insv/extv/extzv
	and digging through the insn_data tables.
	* Makefile.in: Update dependencies.

From-SVN: r45086
2001-08-22 00:33:33 +00:00
Zack Weinberg e78d8e5137 expr.h: Split out optab- and libfunc-related code to...
* 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
2001-08-13 15:56:51 +00:00
Kazu Hirata 30f7a3786c dbxout.c: Fix comment formatting.
* dbxout.c: Fix comment formatting.
	* dependence.c: Likewise.
	* df.c: Likewise.
	* diagnostic.c: Likewise.
	* dominance.c: Likewise.
	* doprint.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* flow.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.

From-SVN: r44729
2001-08-08 22:06:48 +00:00
Andrew Haley 053a35af65 expmed.c (store_fixed_bit_field): Don't use a mode bigger than the mode of the memory location.
2001-07-03  Andrew Haley  <aph@redhat.com>

        * expmed.c (store_fixed_bit_field): Don't use a mode bigger than
        the mode of the memory location.

From-SVN: r43864
2001-07-09 15:25:34 +00:00
Richard Kenner f4ef873c31 emit-rtl.c (adjust_address): New function.
* emit-rtl.c (adjust_address): New function.
	* expr.h (adjust_address): Add declaration.
	* builtins.c: Replace some calls to change_address with calls to it
	or to validize_mem.
	* caller-save.c, dwarf2out.c, except.c, expmed.c, expr.c: Likewise.
	* function.c, config/a29k/a29k.md, config/alpha/alpha.c: Likewise.
	* config/arm/arm.c, config/convex/convex.c: Likewise.
	* config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise.
	* config/i386/i386.c, config/i386/i386.md: Likewise.
	* config/ia64/ia64.c, config/ia64/ia64.md: Likewise.
	* config/m32r/m32r.c, config/m68k/m68k.md: Likewise.
	* config/m88k/m88k.c, config/mips/mips.md: Likewise.
	* config/ns32k/ns32k.c, config/rs6000/rs6000.c: Likewise.
	* config/sh/sh.c, config/sparc/sparc.md: Likewise.

From-SVN: r43702
2001-07-02 15:47:44 -04:00
Jan Hubicka 8c9864f32d combine.c (gen_binary): Use swap_commutative_operands_p
* combine.c (gen_binary): Use swap_commutative_operands_p
        (simplify_comparison): Likewise.
        * expmed.c (emit_store_flag): Likewise.
        * expr.c (compare_from_rtx): Likewise.
        (do_compare_rtx_and_jump): Likewise.
        * optabs.c (emit_cmp_and_jump_insn): Revert last patch; abort
        if not emitting a branch and operands want swapping.

From-SVN: r42433
2001-05-22 00:40:26 -07:00
Alexandre Oliva 691073076b expmed.c (store_bit_field): Truncate CONST_INTs.
* expmed.c (store_bit_field): Truncate CONST_INTs.
(expand_mult_highpart, expand_divmod): Likewise.
* expr.c (convert_modes, store_field): Likewise.
* integrate.c (expand_inline_function): Use promote_mode() to
determine whether to convert_modes() an argument as signed
or unsigned.
* optabs.c (expand_binop): Get CONST_INT operands
sign-extended for their appropriate modes.
* stmt.c (emit_case_nodes): Convert node values to the
appropriate mode.
(expand_end_case): Convert minval and range to the appropriate
mode.
* unroll.c (loop_iterations): Truncate abs_diff to the mode of
the iteration variable.
* varasm.c (immed_double_const): Don't require words to be
narrower than host wide ints to properly sign-extend
CONST_INTs.

From-SVN: r41285
2001-04-12 03:41:36 +00:00
Jakub Jelinek ddef6bc7a3 Use byte offsets in SUBREGs instead of words.
2001-04-03  Jakub Jelinek  <jakub@redhat.com>
	    David S. Miller  <davem@pierdol.cobaltmicro.com>
            Andrew MacLeod  <amacleod@redhat.com>

	Use byte offsets in SUBREGs instead of words.

	* alias.c (nonlocal_mentioned_p): Use subreg_regno function.
	* caller-save.c (mark_set_regs): Change callers of subreg_hard_regno
	to pass new argument.
	(add_stored_regs): Use subreg_regno_offset function.
	* calls.c (expand_call): For non-paradoxical SUBREG take endianess
	into account.
	(precompute_arguments): Use gen_lowpart_SUBREG.
	* combine.c (try_combine): Replace explicit XEXP with SUBREG_REG.
	(combine_simplify_rtx): Rework to use SUBREG_BYTE.
	(simplify_set): Rework to use SUBREG_BYTE.
	(expand_field_assignment): Use SUBREG_BYTE.
	(make_extraction): Use SUBREG_BYTE.
	(if_then_else_cond): Use SUBREG_BYTE.
	(apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments.
	(gen_lowpart_for_combine): Compute full byte offset.
	* cse.c (mention_regs): Use SUBREG_BYTE.
	(remove_invalid_subreg_refs): Rework to use SUBREG_BYTE.
	(canon_hash): Use SUBREG_BYTE.
	(fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword.
	(gen_lowpart_if_possible): Formatting.
	* dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos
	correctly.
	* dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
	(mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
	(loc_descriptor): Fixup explicit XEXP into SUBREG_REG
	* dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
	(output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
	(output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
	* emit-rtl.c (gen_rtx_SUBREG): New function, used to verify
	certain invariants about SUBREGs the compiler creates.
	(gen_lowpart_SUBREG): New function.
	(subreg_hard_regno): New function to get the final register number.
	(gen_lowpart_common): Use SUBREG_BYTE.
	(gen_imagpart): Spacing nits.
	(subreg_realpart_p): Use SUBREG_BYTE.
	(gen_highpart): Use SUBREG_BYTE.
	(subreg_lowpart_p): Always compute endian corrected goal offset,
	even at the byte level, then compare against that.
	(constant_subword): New function, pulled out all constant cases
	from operand_subword and changed second argument name to offset.
	(operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early
	and call constant_subword to do the work.  Return const0_rtx if
	looking for a word outside of OP.
	(operand_subword_force): Change second arg name to offset.
	* expmed.c (store_bit_field): Use SUBREG_BYTE.
	(store_split_bit_field): Use SUBREG_BYTE.
	(extract_bit_field): Use SUBREG_BYTE.
	(extract_split_bit_field): Use SUBREG_BYTE.
	(expand_shift): Use SUBREG_BYTE.
	* expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG.
	* final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE.
	* flow.c (set_noop_p): Use SUBREG_BYTE.
	(mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead.
	* function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG.
	(fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian
	correction code.
	(optimize_bit_field): Use SUBREG_BYTE.
	(purge_addressof_1): Use SUBREG_BYTE.
	(purge_single_hard_subreg_set): Use subreg_regno_offset function.
	(assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are
	actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true.
	* gengenrtl.c (special_rtx): Add SUBREG.
	* global.c (mark_reg_store): Use SUBREG_BYTE.
	(set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE.
	* ifcvt (noce_emit_move_insn): Use SUBREG_BYTE.
	* integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure
	final byte offset is congruent to subreg's mode size.
	(subst_constants): Use SUBREG_BYTE.
	(mark_stores): Use subreg_regno_offset function.
	* jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset
	function and SUBREG_BYTE.
	* local-alloc.c (combine_regs): Use subreg_regno_offset function.
	(reg_is_born): Use subreg_hard_regno.
	* recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte
	endian correction code.  Don't combine subregs unless resulting
	offset aligns with type.  Fix subreg constant extraction for DImode.
	Simplify SUBREG of VOIDmode CONST_DOUBLE.
	(general_operand): Remove dead mode_altering_drug code.
	(indirect_operand): Use SUBREG_BYTE.
	(constrain_operands): Use subreg_regno_offset function.
	* reg-stack.c (get_true_reg): Use subreg_regno_offset function.
	* regmove.c (regmove_optimize): Use SUBREG_BYTE.
	(optimize_reg_copy_3): Use gen_lowpart_SUBREG.
	* regs.h (REG_SIZE): Allow target to override.
	(REGMODE_NATURAL_SIZE): New macro which target can override.
	* reload.c (reload_inner_reg_of_subreg): subreg_regno should be used
	on the entire subreg rtx.
	(push_reload): Use SUBREG_BYTE in comments and code.
	(find_dummy_reload): Use subreg_regno_offset.  Only adjust offsets
	for hard registers inside subregs.
	(operands_match_p): Use subreg_regno_offset.
	(find_reloads): Use SUBREG_BYTE and only advance offset for subregs
	containing hard regs.
	(find_reload_toplev): Use SUBREG_BYTE.  Remove byte endian
	corrections when fixing up MEM subregs.
	(find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and
	subreg_regno_offset where appropriate.
	(find_reloads_subreg_address): Use SUBREG_BYTE.  Remove
	byte endian corrections when fixing up MEM subregs.
	(subst_reloads): When combining two subregs, make sure final
	offset is congruent to subreg's mode size.
	(find_replacement): Use SUBREG_BYTE and subreg_regno_offset.
	(refers_to_regno_for_reload_p): Use subreg_regno.
	(reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset.
	* reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian
	correction code for memory subreg fixups.
	(forget_old_reload_1): Use subreg_regno_offset.
	(choose_reload_regs): Use subreg_regno.
	(emit_input_reload_insns): Use SUBREG_BYTE.
	(reload_combine_note_store): Use subreg_regno_offset.
	(move2add_note_store): Use subreg_regno_offset.
	* resource.c (update_live_status, mark_referenced_resources): Use
	subreg_regno function.
	(mark_set_resources): Use subreg_regno function.
	* rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE.
	(subreg_regno_offset, subreg_regno): Define prototypes.
	(subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions.
	(gen_lowpart_SUBREG): Add prototype.
	* rtl.texi (subreg): Update to reflect new byte offset representation.
	Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now.
	* rtlanal.c (refers_to_regno_p): Use subreg_regno.
	(reg_overlap_mentioned_p): Use subreg_regno.
	(replace_regs); Make sure final offset of combined subreg is
	congruent to size of subreg's mode.
	(subreg_regno_offset): New function.
	(subreg_regno): New function.
	* sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE.
	* sdbout.c (sdbout_symbol): Compute offset using alter_subreg.
	* stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG.
	* tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead.
	(SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides.
	* config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno.
	(a29k_get_reloaded_address): Use SUBREG_BYTE.
	(print_operand): Use SUBREG_BYTE.
	* config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE.
	* config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE.
	(arm_reload_out_hi): Use SUBREG_BYTE.
	* config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset
	instead of SUBREG_WORD.
	(d30v_print_operand_memory_reference): Use subreg_regno_offset.
	* config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix
	SUBREG creation to use byte offset.
	* config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit
	inverted load insns): Fix explicit rtl subregs to use byte
	offsets.
	* config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3,
	udivsi3, umodsi3): Generate SUBREGs with byte offsets.
	* config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE.
	* config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl
	to use byte offsets.
	(unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets.
	* config/i960/i960.md (extendhisi2): Generate SUBREGs with byte
	offsets, also make sure it is congruent to SUBREG's mode size.
	(extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2,
	unnamed ldob insn): Generate SUBREGs with byte offset.
	(zero_extendqihi2): SUBREG's are byte offsets.
	* config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE.
	(m68hc11_gen_highpart): Use SUBREG_BYTE.
	* config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2,
	zero-extendqisi2): Generate SUBREGs with byte offset.
	(umulsidi3, mulsidi3, subreghi1ashrdi_const32,
	subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit
	subregs in rtl to use byte offsets.
	* config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset.
	* config/mips/mips.c (mips_move_1word): Use subreg_regno_offset.
	(mips_move_2words): Use subreg_regno_offset.
	(mips_secondary_reload_class): Use subreg_regno_offset.
	* config/mips/mips.md (DImode plus, minus, move, and logical op
	splits): Fixup explicit subregs in rtl to use byte offsets.
	* config/mn10200/mn10200.c (print_operand): Use subreg_regno function.
	* config/mn10300/mn10300.c (print_operand): Use subreg_regno function.
	* config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in
	rtl to use byte offsets.
	* config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE.
	* config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit
	subregs to use byte offsets.
	* config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1):
	Fixup explicit subregs in rtl to use byte offsets.
	* config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE
	and remove byte endian correction code.
	* config/sh/sh.c (output_movedouble): Use subreg_regno.
	(gen_ashift_hi): Use SUBREG_BYTE.
	(regs_used): Use subreg_regno_offset.
	(machine_dependent_reorg): Use subreg_regno_offset.
	* config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE.
	* config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno.
	(movdf_i4): Subregs are byte offsets now.
	* config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE.
	* config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed.
	(REGMODE_NATURAL_SIZE): Override.
	(REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode.
	* config/sparc/sparc.md (TFmode move splits): Generate SUBREGs
	with byte offsets.
	(zero_extendhisi2, zero_extendqidi2_insn, extendhisi2,
	extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn,
	extendqidi2): Generate SUBREGs with byte offsets, also make sure
	it is congruent to SUBREG's mode size.
	(smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte
	offsets.
	(cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc,
	cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2,
	lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper
	SUBREG_BYTE offset for non-paradoxical subregs in patterns.
	* config/v850/v850.c (print_operand, output_move_double): Use
	subreg_regno function.

Co-Authored-By: Andrew MacLeod <amacleod@redhat.com>
Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com>

From-SVN: r41058
2001-04-03 15:06:12 +00:00
Richard Henderson 5e7f4a4ab9 mkconfig.sh: Include insn-flags.h.
* mkconfig.sh: Include insn-flags.h.
	* Makefile.in (CONFIG_H): Include insn-flags.h.
	(lots of objects): Remove insn-codes.h and insn-flags.h.

	* alias.c, bb-reorder.c, calls.c, do-loop.c, flow.c, haifa-sched.c,
	integrate.c, jump.c, loop.c, predict.c, profile.c, reg-stack.c,
	regmove.c, reorg.c, a29k/a29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
	avr/avr.c, clipper/clipper.c, convex/convex.c, d30v/d30v.c,
	dsp16xx/dsp16xx.c, fr30/fr30.c, h8300/h8300.c, i370/i370.c,
	i386/i386.c, i860/i860.c, ia64/ia64.c, m32r/m32r.c, m68hc11/m68hc11.c,
	m68k/m68k.c, m88k/m88k.c, mcore/mcore.c, mn10200/mn10200.c,
	mn10300/mn10300.c, ns32k/ns32k.c, pa/pa.c, pdp11/pdp11.c,
	pj/pj.c, romp/romp.c, rs6000/rs6000.c, sh/sh.c, sparc/sparc.c,
	v850/v850.c, vax/vax.c:
	Don't include insn-flags.h.

	* diagnostic.c, expr.h, reload.c, toplev.c:
	Don't include insn-codes.h.

	* builtins.c, combine.c, except.c, explow.c, expmed.c, expr.c,
	final.c, function.c, optabs.c, recog.c, reload1.c, stmt.c,
	c4x/c4x.c, i960/i960.c, mips/mips.c:
	Don't include insn-codes.h or insn-flags.h.

	* genemit.c, genopinit.c, genoutput.c: Don't include insn-codes.h
	or insn-flags.h in the generated code.
	* genflags.c (gen_proto): Use "struct rtx_def *" instead of "rtx".
	(main): Forward declare struct rtx_def.

From-SVN: r40754
2001-03-22 10:48:52 -08:00
DJ Delorie aac280fbf0 expmed.c (extract_bit_field): allow non-integral modes if we want to extract a whole register from itself.
* expmed.c (extract_bit_field): allow non-integral modes if we
want to extract a whole register from itself.

From-SVN: r39381
2001-01-31 14:05:49 -05:00
J"orn Rennecke 02a65aef50 expmed.c (synth_mult, [...]): Guard uses of shift_cost, shiftadd_cost and shiftsub_cost with bound checks.
* expmed.c (synth_mult, expand_mult_highpart, expand_divmod): Guard
	uses of shift_cost, shiftadd_cost and shiftsub_cost with bound checks.

From-SVN: r39165
2001-01-21 09:19:15 +00:00
Richard Kenner d1608933b9 function.c (expand_function_end): Properly handle DECL_RESULT and copy when ptr_mode != Pmode.
* function.c (expand_function_end): Properly handle DECL_RESULT
	and copy when ptr_mode != Pmode.
	* expmed.c (make_tree): Convert X from Pmode to ptr_mode, if needed.

From-SVN: r38607
2001-01-01 21:31:22 -05:00
Andreas Jaeger df7978d9b7 expmed.c (store_bit_field): Fix last patch.
2000-12-28  Andreas Jaeger  <aj@suse.de>

	* expmed.c (store_bit_field): Fix last patch.

From-SVN: r38511
2000-12-28 09:51:59 +01:00
Alan Lehotsky 5da1e2c489 expmed.c (store_bit_field): Correctly compute smallest mode that is sufficient to contain all bits we are...
* expmed.c (store_bit_field): Correctly compute smallest mode that
	is sufficient to contain all bits we are storing.

From-SVN: r38507
2000-12-28 00:55:03 -05:00
Richard Kenner 23cb454af9 * expmed.c (expand_mult): Write REG_EQUAL note with proper mode.
From-SVN: r38306
2000-12-16 10:43:55 -05:00
Kaveh R. Ghazi 4e135bdd14 alpha.c (check_float_value): Use memcpy, not bcopy.
* alpha.c (check_float_value): Use memcpy, not bcopy.
	* arm.c (output_move_double): Likewise.
	* arm.md: Likewise.
	* m88k.c (legitimize_operand): Likewise.
	* m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise.
	* m88k.md: Likewise.
	* mips.c (override_options): Likewise.
	* mips.md: Likewise.
	* romp.c (output_fpops): Likewise.
	* rs6000.c (rs6000_override_options): Likewise.
	* sh.md: Likewise.
	* vax.c (check_float_value): Likewise.

	* emit-rtl.c (copy_rtx_if_shared, init_emit_once): Likewise.
	* expmed.c (synth_mult): Likewise.
	* final.c (add_bb_string): Likewise.
	* genattr.c (main): Likewise.
	* genattrtab.c (attr_string, simplify_cond, copy_rtx_unchanging):
	Likewise.
	* jump.c (thread_jumps): Likewise.
	* prefix.c (save_string): Likewise.
	* real.h (REAL_VALUE_FROM_CONST_DOUBLE): Likewise.
	* regclass.c (init_reg_sets, init_reg_sets_1): Likewise.
	* reload1.c (reload, eliminate_regs): Likewise.

cp:
	* decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
	* lex.c (copy_lang_decl): Likewise.

java:
	* decl.c (copy_lang_decl): Use memcpy, not bcopy.
	* jcf-parse.c (jcf_figure_file_type): Likewise.

From-SVN: r37367
2000-11-10 16:01:28 +00:00
Denis Chertykov 1cf7847fed expmed.c (expand_divmod): For signed divide by 2, prefer a branch and fewer shifts if branches are very cheap.
* expmed.c (expand_divmod): For signed divide by 2, prefer
	a branch and fewer shifts if branches are very cheap.

From-SVN: r37270
2000-11-06 11:39:54 +03:00
Jim Wilson a8ca775646 Fixes for C++ structure layout breakage.
* expmed.c (store_bit_field): Move integer pun code down after
	code that calls emit_move_insn for entire register move.
	* stor-layout.c (compute_record_mode): Revert Mar 25, Aug 18, and
	Oct 20 changes.  Only store mode in TYPE_MODE if RECORD_TYPE.

From-SVN: r37041
2000-10-24 18:30:25 -07:00
Chandrakala Chavva e6b4d09dda Minor corrections in comments.
From-SVN: r36951
2000-10-19 11:48:22 -04:00
Chandrakala Chavva 91ce572a07 Adding new option -ftrapv.
From-SVN: r36942
2000-10-18 17:33:41 -04:00
Richard Henderson ea9ea00856 expmed.c (store_bit_field): Adjust last change to not consider any word-sized field naturally aligned.
* expmed.c (store_bit_field): Adjust last change to not consider
        any word-sized field naturally aligned.

From-SVN: r36601
2000-09-25 00:07:33 -07:00
Richard Henderson 308ecea098 expmed.c (store_bit_field): Consider naturally aligned memory for direct reference.
* expmed.c (store_bit_field): Consider naturally aligned
        memory for direct reference.

From-SVN: r36431
2000-09-15 04:13:04 -07:00
Geoff Keating 2f5c7f4522 tree.h (DECL_OFFSET_ALIGN): Make the off_align field of the tree structure an exponent rather than an...
* tree.h (DECL_OFFSET_ALIGN): Make the off_align field of
the tree structure an exponent rather than an explicit alignment
so it doesn't overflow.
(SET_DECL_OFFSET_ALIGN): New macro.
* stor-layout.c (place_union_field): Use SET_DECL_OFFSET_ALIGN
rather than DECL_OFFSET_ALIGN.
(place_field): Likewise.
* expmed.c (store_bit_field): Abort on align==0 to avoid
antisocial machine behaviour.

From-SVN: r35659
2000-08-12 22:45:05 +00:00
Richard Henderson ae5f017f14 expmed.c (store_bit_field): Don't require MEM_IN_STRUCT_P.
* expmed.c (store_bit_field): Don't require MEM_IN_STRUCT_P.
        * expr.c (emit_group_store): Don't set it.

From-SVN: r35546
2000-08-07 01:27:54 -07:00
Geoff Keating 3b5286d750 expmed.c (expand_mult_highpart): Use op1 instead of wide_op1 when mode instead of wider_mode is being used.
* expmed.c (expand_mult_highpart): Use op1 instead of wide_op1 when
mode instead of wider_mode is being used.

From-SVN: r34851
2000-07-03 19:33:09 +00:00
Bernd Schmidt 0b4565c9d8 Vector conversions support
From-SVN: r34680
2000-06-24 19:26:42 +00:00
Jason Merrill f9e158c377 simplify-rtx.c (simplify_ternary_operation): Cast to unsigned.
* simplify-rtx.c (simplify_ternary_operation): Cast to unsigned.
        * stor-layout.c (place_field): Likewise.
        * integrate.h (struct inline_remap): Make regno_pointer_align unsigned.
        * expr.c (store_expr): Make align unsigned.
        * explow.c (plus_constant_wide): Make low words unsigned.
        * expmed.c (choose_multiplier): Likewise.
        * fold-const.c (fold):  Likewise.
        * tree.h (build_int_2): Likewise.
        * tree.c (build_int_2_wide, tree_int_cst_msb): Likewise.
        * emit-rtl.c (gen_reg_rtx): Add cast to unsigned char*.
        (init_emit): Change cast to unsigned char*.
        * varasm.c (compare_constant_1): Add cast to char*.
        * gcse.c (delete_null_pointer_checks): Change cast to unsigned int*.
        * reload1.c (reload): Likewise.

        * rtl.h (MEM_SET_IN_STRUCT_P): Use do { } while (0).

From-SVN: r33684
2000-05-04 17:15:05 -04:00
Richard Kenner 6912b84bf1 expmed.c (emit_store_flag): If comparing two-word integer with zero, can optimize NE, EQ, GE, and LT.
* expmed.c (emit_store_flag): If comparing two-word integer
	with zero, can optimize NE, EQ, GE, and LT.

From-SVN: r33230
2000-04-18 15:14:58 -04:00
Richard Kenner 29105cea6a expmed.c (init_expmed): Don't free objects we make.
* expmed.c (init_expmed): Don't free objects we make.
	* emit-rtl.c (gen_rtx_CONST_INT, init_emit_once): Minor cleanups.

From-SVN: r33057
2000-04-10 07:51:53 -04:00
Richard Kenner 0e805f815e expmed.c (store_bit_field, [...]): Fix more cases of alignment in bytes.
* expmed.c (store_bit_field, store_fixed_bit_field): Fix more
	cases of alignment in bytes.

From-SVN: r32836
2000-03-30 16:46:37 -05:00
Richard Kenner 2b968770d7 * expmed.c (store_fixed_bit_field): STRUCT_ALIGN is in bits.
From-SVN: r32830
2000-03-30 09:12:28 -05:00
Richard Kenner 19caa751a8 builtins.c (get_pointer_alignment): Use host_integerp & tree_low_cst.
* builtins.c (get_pointer_alignment): Use host_integerp & tree_low_cst.
	(expand_builtin_apply): Pass alignment to emit_block_move in bits.
	(expand_builtin_memcpy, expand_builtin_va_copy): Likewise.
	(expand_builtin_memset): Likewise, but to clear_storage.
	* calls.c (save_fixed_argument_area): Likewise, to move_by_pieces.
	(restore_fixed_argument_area): Likewise.
	(store_unaligned_arguments_into_pseudos): Likewise, to store_bit_field.
	(load_register_parameters): Likewise, to emit_group_load.
	(expand_call): Likewise, to emit_group_store and emit_block_move.
	(emit_library_call_value_1): Likewise, to emit_block_move.
	(store_one_arg): Likewise, and to emit_push_insn.
	* expmed.c (extract_bit_field): Alignment is in bits, not bytes.
	(extract_fixed_bit_field, extract_split_bit_field): Likewise.
	* expr.c (move_by_pieces, move_by_pieces_ninsns): Likewise.
	(emit_block_move, emit_group_load, emit_group_store): Likewise.
	(clear_by_pieces, clear_storage, emit_push_insn): Likewise.
	(expand_assigment, store_expr, store_constructor_field): Likewise.
	(expand_expr_unaligned, do_jump, do_compare_and_jump): Likewise.
	(store_constructor, store_field, get_inner_reference): Likewise.
	Use host_integerp and tree_low_cst; sizes and positions HOST_WIDE_INT.
	(expand_expr, case COMPONENT_REF): Likewise.
	(copy_blkmode_from_regs): Use UNSIGNED_HOST_WIDE_INT for sizes
	and positions; reindent code.
	* expr.h (emit_cmp_insn, emit_cmp_and_jump_insns): Alignment unsigned.
	* function.c (purge_addressof_1): Pass bit align to store_bit_field.
	(assign_parms): Likewise to emit_group_store.
	* optbas.c (prepare_cmp_insn): Alignment is in bits.
	(emit_cmp_and_jump_insns, emit_cmp_insn): Likewise, and also unsigned.
	* stmt.c (expand_value_return): Pass align in bits to emit_group_load.
	(expand_return): Likewise to {extract,store}_bit_field.
	* stor-layout.c (get_mode_alignment): Minor cleanup.
	* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Align is in bits.
	* config/sh/sh.h (MOVE_BY_PIECES_P): Likewise.
	* ch/expr.c (chill_expand_expr): Pass bit alignment to emit_block_move.

From-SVN: r32827
2000-03-30 06:47:08 -05:00
Richard Kenner 751312371e expmed.c (extract_bit_field): Ensure BITS_PER_WORD is signed in MAX.
* expmed.c (extract_bit_field): Ensure BITS_PER_WORD is signed in MAX.
	* config/arm/pe.c (arm_pe_return_in_memory): Use host_integerp and
	int_bit_position.
	* config/mips/mips.c (function_arg): Likewise; also remove cast
	and make variables unsigned or HOST_WIDE_INT and use tree_low_cst.
	(mips_function_value): Use int_byte_position and make HOST_WIDE_INT.
	* config/mips/abi64.h (SETUP_INCOMING_VARARGS): Offsets are unsigned.
	* config/mips/mips.h (BITS_PER_WORD, UNITS_PER_WORD): Cast to unsigned.
	(UNITS_PER_FPREG, INT_TYPE_SIZE, LONG_TYPE_SIZE): Likewise.
	(POINTER_SIZE, POINTER_BOUNDARY,PARM_BOUNDARY): Likewise.
	(GP_REG_P, FP_REG_P, MD_REG_P, ST_REG_P): Ensure subtraction signed.
	(struct mips_arg): arg_number, arg_words, fp_arg_words, and
	num_adjusts now unsigned.
	(FUNCTION_ARG_BOUNDARY): Remove unneeded cast.
	* config/sparc/sparc.c (struct function_arg_record_value_parms):
	NREGS now unsigned.
	(function_arg_record_value_1): STARTBITPOS arg now HOST_WIDE_INT
	as is BITPOS variable; use host_integerp and int_bit_position.
	(function_arg_record_value_2): Likewise.
	(function_arg_record_value_3): Arg BITPOS now HOST_WIDE_INT.
	Variable REGNO now unsigned.
	(function_arg_record_value): NREGS now unsigned.

From-SVN: r32748
2000-03-26 11:46:27 -05:00
Richard Kenner 770ae6cc71 * Rework fields used to describe positions of bitfields and
modify sizes to be unsigned and use HOST_WIDE_INT.
	* alias.c (reg_known_value_size): Now unsigned.
	* c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position.
	(really_start_incremental_init): Use bitsize_zero_node.
	(push_init_level, pop_init_level, output_init_element): Likewise.
	Use bitsize_unit_node and bitsize_one_node.
	(output_pending_init_elements, process_init_element): Likewise.
	* combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned.
	(make_extraction): Position and length HOST_WIDE_INT and unsigned
	HOST_WIDE_INT, respectively.
	(get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT.
	(num_sign_bit_copies): Returns unsigned.
	BITWIDTH now unsigned; rework arithmetic.
	Remove recursive call from arg to MAX.
	(combine_instructions, init_reg_last_arrays): NREGS now unsigned.
	(setup_incoming_promotions, can_combine_p, try_combine, simplify_set):
	REGNO now unsigned.
	(set_nonzero_bit_and_sign_copies): NUM now unsigned.
	(find_split_point, expand_compound_operation, make_extraction): LEN
	now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT.
	(make_field_assignment): Likewise.
	(combine_simplify_rtx): Add cast.
	(expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic.
	(force_to_mode): WIDTH now unsigned; add cast.
	(if_then_else_cond): SIZE now unsigned.
	(nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned.
	(extended_count): Now returns unsigned.
	(simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT.
	Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned.
	(simplify_comparison): MODE_WIDTH now unsigned.
	(update_table_tick): REGNO and ENDREGNO now unsigned; new var R.
	(mark_used_regs_combine): Likewise; rework arithmetic.
	(record_value_for_reg): REGNO, ENDREGNO, and I now unsigned.
	(record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise.
	(record_promoted_value): REGNO now unsigned.
	(get_last_value_validate): REGNO, ENDREGNO, and J now unsigned.
	(get_last_value): REGNO now unsigned.
	(use_crosses_set_p): REGNO and ENDREGNO now unsigned.
	(reg_dead_regno, reg_dead_endregno): Now unsigned.
	(remove_death): Arg REGNO now unsigned.
	(move_deaths):  REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned.
	(reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO
	now unsigned.
	* convert.c (convert_to_integer): INPREC and OUTPREC now unsigned.
	* cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned.
	(struct cse_reg_info): REGNO now unsigned.
	(cached_regno): Now unsigned.
	(REGNO_QTY_VALID_P): Add cast.
	(make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned.
	(remove_invalid_regs): Likewise.
	(remove_invalid_subreg_refs): Likewise; arg WORD also unsigned
	as are variables END and I.
	(get_cse_reg_info, insert): Likewise.
	(mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned.
	(canon_hash): Likewise.
	(insert_regs, lookup_for_remove): REGNO now unsigned.
	(invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned.
	New variable RN.
	* dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0.
	* dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast.
	* emit-rtl.c (subreg_realpart_p): Add cast.
	(operand_subword): Arg I is now unsigned as is var PARTWORDS.
	(operand_subword_force): Arg I is now unsigned.
	* except.c (eh_regs): Variable I is now unsigned.
	* explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT.
	* expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT;
	length is unsigned HOST_WIDE_INT; likewise for internal variables.
	(store_split_bit_field, extract_fixed_bit_field): Likewise.
	(extract_split_bit_field, store_bit_field, extract_bit_field):
	Likewise.
	* expr.c (store_constructor_fields, store_constructor, store_field):
	Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT.
	(expand_assignment, expand_expr, expand_expr_unaligned): Likewise.
	(do_jump): Likewise.
	(move_by_pieces, move_by_pieces_ninsns, clear_by_pieces):
	MAX_SIZE is now unsigned.
	(emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned.
	(emit_group_store): Likewise.
	(emit_move_insn): I now unsigned.
	(store_constructor): Use host_integerp, tree_low_cst, and
	bitsize_unit_node.
	(get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT.
	Rework all calculations to use trees and new fields.
	* expr.h (promoted_input_arg): Regno now unsigned.
	(store_bit_field, extract_bit_field): Adjust types of pos and size.
	(mark_seen_cases): Arg is HOST_WIDE_INT.
	* flow.c (verify_wide_reg_1): REGNO now unsigned.
	* fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT;
	precisions and alignments are unsigned.
	(optimize_bit_field_compare, fold_truthop): Likewise.
	(int_const_binop): Adjust threshold for size_int_type_wide call.
	(fold_convert): Likewise.
	(size_int_type_wide): Make table larger and fix thinko that only
	had half of table used.
	(all_ones_mask_p, fold): Precisions are unsigned.
	* function.c (put_reg_info_stack): REGNO is unsigned.
	(instantiate_decl): Size is HOST_WIDE_INT.
	(instantiate_virtual_regs): I is unsigned.
	(assign_parms): REGNO, REGNOI, and REGNOR are unsigned.
	(promoted_input_arg): REGNO is unsigned.
	* function.h (struct function): x_max_parm_reg is now unsigned.
	* gcse.c (max_gcse_regno): Now unsigned.
	(struct null_pointer_info): min_reg and max_reg now unsigned.
	(lookup_set, next_set): REGNO arg now unsigned.
	(compute_hash_table): REGNO and I now unsigned.
	(handle_avail_expr): regnum_for_replacing now unsigned.
	(cprop_insn): REGNO now unsigned.
	(delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned.
	* ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case.
	* global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned.
	* hard-reg-set.h (reg_class_size): Now unsigned.
	* integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO.
	* jump.c (mark_modified_reg): I now unsigned; add cast.
	(rtx_equal_for_thread_p): Add cast.
	* loop.c (max_reg_before_loop): Now unsigned.
	(struct_movable): REGNO now unsigned.
	(try_copy_prop): REGNO arg unsigned.
	(regs_match_p): XN and YN now unsigned.
	(consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned.
	(strength_reduce): Likewise; NREGS also unsigned.
	(first_increment_giv, last_increment_giv unsigned): Now unsigned.
	* loop.h (struct iv_class): REGNO now unsigned.
	(max_reg_before_loop, first_increment_giv, last_increment_giv):
	Now unsigned.
	* machmode.h (mode_size, mode_unit_size): Now unsigned.
	(mode_for_size, smallest_mode_for_size): Pass size as unsigned.
	* optabs.c (expand_binop): I and NWORDS now unsigned.
	(expand_unop): I now unsigned.
	* print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do
	print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET.
	* real.c (significand_size): Now returns unsigned.
	* real.h (significand_size): Likewise.
	* regclass.c (reg_class_size): Now unsigned.
	(choose_hard_reg_mode): Both operands now unsigned.
	(record_reg_classes): REGNO and NR now unsigned.
	(reg_scan): NREGS now unsigned.
	(reg_scan_update): old_max_regno now unsigned.
	(reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned.
	* reload.c (find_valid_class): BEST_SIZE now unsigned.
	(find_dummy_reload): REGNO, NWORDS, and	I now unsigned.
	(hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned.
	Likewise for variable R.
	(refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned,
	as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R.
	(find_equiv_reg): Add casts.
	(regno_clobbered_p): Arg REGNO now unsigned.
	* reload.h (struct reload): NREGS now unsigned.
	(refers_to_regno_for_reload_p): Regno args are unsigned.
	(regno_clobbered_p): Likewise.
	* reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned.
	(compute_use_by_pseudos): REGNO now unsigned.
	(find_reg): I and J now unsigned, new variable K, and change loop
	variables accordingly; THIS_NREGS now unsigned.
	(alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned.
	(spill_hard_reg): REGNO arg now unsigned; add casts.
	(forget_old_reloads_1): REGNO, NR, and I now unsigned.
	(mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned.
	(clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO,
	END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned.
	(reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned.
	(choose_reload_regs): MAX_GROUP_SIZE now unsigned.
	(emit_reload_insns): REGNO now unsigned.
	(reload_cse_move2add): Add cast.
	(move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO
	and rework loop.
	* resource.c (mark_referenced_resources, mark_set_resources): New
	variable R; REGNO and LAST_REGNO now unsigned.
	(mark_target_live_regs): J and REGNO now unsigned.
	* rtl.c (mode_size, mode_unit_size): Now unsigned.
	* rtl.h (union rtunion_def): New field rtuint.
	(XCUINT): New macro.
	(ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT.
	(operand_subword, operand_subword_force): Word number is unsigned.
	(choose_hard_reg_mode): Operands are unsigned.
	(refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned.
	(find_regno_note, find_regno_fusage, replace_regs): Likewise.
	(regno_use_in, combine_instructions, remove_death): Likewise.
	(reg_scan, reg_scan_update): Likewise.
	(extended_count): Return is unsigned.
	* rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I,
	INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO.
	(reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned.
	(reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned.
	(reg_reg_last_1): FIRS and LAST now unsigned.
	(dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned.
	(dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO
	now unsigned.
	(find_regno_note, regno_use_in): Arg REGNO now unsigned.
	(find_regno_fusage): Likewise; also var REGNOTE now unsigned.
	(find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned.
	(replace_regs): Arg NREGS now unsigned.
	* sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0.
	* simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned.
	(simplify_binary_operation): Likewise.
	(cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and
	THIS_LAST now unsigned.
	(cselib_record_set): Add cast.
	* ssa.c (ssa_max_reg_num): Now unsigned.
	(rename_block): REGNO now unsigned.
	* stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT;
	sizes now unsigned.
	(all_cases_count): Just return -1 not -2.
	COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT.
	Rework tests to use trees whenever possible.
	Use host_integerp and tree_low_cst.
	(mark_seen_cases): COUNT arg now HOST_WIDE_INT;
	Likewise variable NEXT_NODE_OFFSET; XLO now unsigned.
	(check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT.
	* stor-layout.c (mode_for_size): SIZE arg now unsigned.
	(smallest_mode_for_size): Likewise.
	(layout_decl): Simplify handing of a specified DECL_SIZE_UNIT.
	KNOWN_ALIGN is now an alignment, so simplify code.
	Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type.
	(start_record_layout): Renamed from new_record_layout_info.
	Update to new fields.
	(debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far):
	New functions.
	(place_union_field): Renamed from layout_union_field.
	Update to use new fields in rli.
	(place_field): Renamed from layout_field.
	Major rewrite to use new fields in rli; pass alignment to layout_decl.
	(finalize_record_size): Rework to use new fields in rli and handle
	union.
	(compute_record_mode): Rework to simplify and to use new DECL fields.
	(finalize_type_size): Make rounding more consistent.
	(finish_union_layout): Deleted.
	(layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either.
	(layout_type, case RECORD_TYPE): Call new function names.
	(initialize_sizetypes): Set TYPE_IS_SIZETYPE.
	(set_sizetype): Set TYPE_IS_SIZETYPE earlier.
	(get_best_mode): UNIT is now unsigned; remove casts.
	* tree.c (bit_position): Compute from new fields.
	(byte_position, int_byte_position): New functions.
	(print_type_hash_statistics): Cast to remove warning.
	(build_range_type): Use host_integerp and tree_low_cst to try to hash.
	(build_index_type): Likewise; make subtype of sizetype.
	(build_index_2_type): Pass sizetype to build_range_type.
	(build_common_tree_nodes): Use size_int and bitsize_int to
	initialize nodes; add bitsize_{zero,one,unit}_node.
	* tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK.
	(DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise.
	(DECL_PACKED, DECL_BIT_FIELD): Likewise.
	(DECL_FIELD_BITPOS): Deleted.
	(DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields.
	(DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK.
	(DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise.
	(DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise.
	(DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise.
	(DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise.
	(DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise.
	(DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK.
	(DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK.
	(DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise.
	(DECL_ALIGN): Adjust to new field in union.
	(DECL_OFFSET_ALIGN): New field.
	(DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK.
	(DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK.
	(union tree_decl): Add struct for both aligns.
	(enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}.
	(bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added.
	(struct record_layout_info): Rework fields to have offset
	alignment and byte and bit position.
	(start_record_layout, place_field): Renamed from old names.
	(rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls.
	(byte_position, int_byte_position): Likewise.
	(get_inner_reference): Change types of position and length.
	* unroll.c (unroll_loop): New variable R; use for some loops.
	MAX_LOCAL_REGNUM and MAXREGNUM now unsigned.
	(calculate_giv_inc): Arg REGNO now unsigned.
	(copy_loop_body): REGNO and SRC_REGNO now unsigned.
	* varasm.c (assemble_variable): Clean up handling of size using
	host_integerp and tree_low_cst.
	(decode_addr_const): Use byte, not bit, position.
	(output_constructor): bitpos and offsets are HOST_WIDE_INT;
	use tree_low_cst and int_bit_position.
	* objc/objc-act.c (build_ivar_list_initializer): Use byte_position.
	* ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT.
	* ch/typeck.c (expand_constant_to_buffer): Use int_byte_position.
	(extract_constant_from_buffer): Likewise.
	* cp/class.c (build_vbase_pointer_fields): layout_field now
	place_field.
	(get_vfield_offset): Use byte_position.
	(set_rtti_entry): Set OFFSET to ssizetype zero.
	(get_binfo_offset_as_int): Deleted.
	(dfs_record_base_offsets): Use tree_low_cst.
	(dfs_search_base_offsets): Likewise.
	(layout_nonempty_base_or_field): Reflect changes in RLI format
	and call byte_position.
	(layout_empty_base): Convert offset to ssizetype.
	(build_base_field): use rli_size_unit_so_far.
	(dfs_propagate_binfo_offsets): Do computation in proper type.
	(layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
	(layout_class_type): Reflect changes in RLI names and fields.
	(finish_struct_1): Set DECL_FIELD_OFFSET.
	* cp/dump.c (dequeue_and_dump): Call bit_position.
	* cp/expr.c (cplus_expand_constant): Use byte_position.
	* cp/rtti.c (expand_class_desc): Use bitsize_one_node.
	* cp/typeck.c (build_component_addr): Use byte_position and don't
	special case for zero offset.
	* f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node.
	(ffecom_tree_canonize_ref_): Likewise.
	* java/class.c (make_field_value): Use byte_position.
	* java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
	(java_array_data_offset): Likewise.
	* java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
	bzero call.

From-SVN: r32742
2000-03-25 13:34:13 -05:00
Jeff Law ef58a5234d Copyright fixes.
From-SVN: r32174
2000-02-25 23:04:48 -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
Richard Kenner 729a212576 combine.c (make_extraction, [...]): Avoid warning on mixed-signedness conditionals.
* combine.c (make_extraction, force_to_mode): Avoid warning on
	mixed-signedness conditionals.
	(make_field_assignment, nonzero_bits): Likewise.
	* expmed.c (store_fixed_bit_field): ALIGN arg now unsigned.
	(store_split_bit_field, extract_split_bit_field): Likewise.
	(extract_fixed_bit_field, store_bit_field,
	* expr.c: Change alignment to be unsigned everywhere.
	(move_by_pieces, store_constructor_field, store_constructor):
	Alignment parm is unsigned.
	(emit_block_move, emit_group_load, emit_group_store): Likewise.
	(clear_storage, emit_push_insn, compare_from_rtx): Likewise.
	(do_compare_rtx_and_jump): Likewise.
	(move_by_pieces_ninsns, clear_by_pieces): Likewise.
	Compare align with GET_MODE_ALIGNMENT.
	(expand_expr_unaligned): Pointer to alignment is pointer to unsigned.
	(get_inner_reference): Likewise.
	(copy_blkmode_from_reg, emit_push_insn): Remove unneeded casts.
	(expand_assignment): Local vars for alignment now unsigned.
	(store_constructor, store_field, expand_expr, do_jump): Likewise.
	(do_compare_and_jump): Likewise.
	(store_field): Call new function expr_align.
	* expr.h (emit_block_move, emit_group_load, emit_group_store):
	Alignment arg now unsigned.
	(clear_storage, emit_push_insn, compare_from_rtx): Likewise.
	(do_compare_rtx_and_jump, store_bit_field): Likewise.
	(extract_bit_field): Likewise.
	* fold-const.c (add_double): Add cast to eliminate signedness warning.
	* machmode.h (GET_MODE_ALIGNMENT): Result is unsigned.
	(get_best_mode): Alignment arg is unsigned.
	* rtl.h (move_by_pieces): Likewise.
	* store-layout.c (maximum_field_alignment, set_alignment):
	Now unsigned.
	(layout_decl): Alignment arg is now unsigned.
	Remove unneeded casts.
	(layout_record, layout_union, layout_type): Remove unneeded casts.
	Local alignment variables now unsigned.
	(get_best_mode): Alignment arg now unsigned.
	* tree.c (expr_align): New function.
	* tree.h (expr_align): Likewise.
	(maximum_field_alignment, set_alignment): Now unsigned.
	(get_inner_reference): Alignment argument is now pointer to unsigned.
	* varasm.c (assemble_variable): Add cast to eliminate warning.

From-SVN: r31904
2000-02-10 17:05:40 -05:00
Jim Wilson 5e4900c7f4 Fix ia64 compiler problem with gcc.c-torture/compile/920410-1.c.
* expmed.c (store_bit_field): If op0 and fieldmode are the same size,
	then store directly into op0.

From-SVN: r31903
2000-02-10 13:09:52 -08:00
Richard Henderson 1eb8759b1b rtl.def: Add unordered fp comparisions.
* rtl.def: Add unordered fp comparisions.
        * tree.def: Likewise.
	* tree.h: Add ISO C 9x unordered fp comparision builtins.

	* builtins.c (expand_tree_builtin): New function.
	* c-typeck.c (build_function_call): Use it.
	(build_binary_op): Support unordered compares.
	* c-common.c (c_common_nodes_and_builtins): Add unordered compares.

	* combine.c (known_cond): Handle reverse_condition returning UNKNOWN.
	(reversible_comparison_p): Allow UNORDERED/ORDERED to be reversed.
	* cse.c (fold_rtx): Check FLOAT_MODE_P before reversing.
	(record_jump_equiv): Handle reverse_condition returning UNKNOWN.
	* jump.c (reverse_condition): Don't abort for UNLE etc, but
	return UNKNOWN.
	(swap_condition): Handle unordered compares.
	(thread_jumps): Check can_reverse before reversing.
	* loop.c (get_condition): Likewise.  Allow UNORERED/ORDERED to be
	reversed for FP.

	* optabs.c (can_compare_p): New argument CODE.  Verify branch or
	setcc is present before acking for cmp_optab.  Update all callers.
	(prepare_float_lib_cmp, init_optabs): Handle UNORDERED.
	* expmed.c (do_cmp_and_jump): Update for can_compare_p.
	* expr.c (expand_expr): Likewise.  Support unordered compares.
	(do_jump, do_store_flag): Likewise.
	* expr.h (enum libfunc_index): Add unordered compares.

	* Makefile.in (FPBIT_FUNCS): Add _unord_sf.
	(DPBIT_FUNCS): Add _unord_df.
	* config/fp-bit.c (_unord_f2): New.
	* fp-test.c (main): Try unordered compare builtins.

	* alpha-protos.h (alpha_fp_comparison_operator): Declare.
	* alpha.c (alpha_comparison_operator): Check mode properly.
	(alpha_swapped_comparison_operator): Likewise.
	(signed_comparison_operator): Likewise.
	(alpha_fp_comparison_operator): New.
	(alpha_emit_conditional_branch): Handle unordered compares.
	* alpha.h (PREDICATE_CODES): Update.
	* alpha.md (fp compares): Use alpha_fp_comparison_operator.
	(bunordered, bordered): New.

	* cp/call.c (build_over_call): Use expand_tree_builtin.
	* cp/typeck.c (build_function_call_real): Likewise.
	(build_binary_op_nodefault): Handle unordered compares.

	* gcc.c-torture/execute/ieee/fp-cmp-4.c: New.

From-SVN: r31591
2000-01-24 12:10:04 -08:00
Kaveh R. Ghazi 711d877c9e eh-common.h: PROTO -> PARAMS.
* eh-common.h: PROTO -> PARAMS.
	* emit-rtl.c: Likewise.
	* errors.c: Likewise.
	* errors.h: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* final.c: Likewise.
	* fix-header.c: Likewise.
	* flow.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* gcc.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.

From-SVN: r31419
2000-01-14 17:14:43 +00:00
David Edelsohn e1565e6588 expmed.c (SLOW_UNALIGNED_ACCESS): Add mode and align parameters to default definition.
* expmed.c (SLOW_UNALIGNED_ACCESS): Add mode and align parameters
	to default definition.
	(store_bit_field): Call SLOW_UNALIGNED_ACCESS with mode and alignment.
	(store_fixed_bit_field): Call macro with word_mode and alignment.
	(extract_bit_field): Call macro with relevant mode and alignment.
	* expr.c (SLOW_UNALIGNED_ACCESS): Add mode and align parameters
	to default definition.
	(move_by_pieces): Call SLOW_UNALIGNED_ACCESS with word_mode
	and alignment.
	(move_by_pieces_ninsns): Likewise.
	(clear_by_pieces): Likewise.
	(emit_push_insn): Likewise.
	(store_field): Call macro with relevant mode and alignment.
	(expand_expr): Likewise.
	(expand_expr_unaligned): Likewise.

	* rs6000.h (HANDLE_PRAGMA_PACK): Define.
	(SLOW_UNALIGNED_ACCESS): Define.
	(CASE_VECTOR_MODE): Always use 32-bit offsets.
	(ASM_FILE_END): Generate 64-bit symbol in 64-bit mode.
	(EXTRA_SECTOIN_FUNCTIONS): Indent .csect pseudo-op.
	(toc_section): Likewise and .toc pseudo-op.
	(ASM_DECLARE_FUNCTION): Likewise.  Align text more strictly in
	64-bit mode.
	(TEXT_SECTION_ASM_OP): Likewise.
	(ASM_OUTPUT_ADD_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Always use
	32-bit offsets.

	* a29k.h (SLOW_UNALIGNED_ACCESS): Add MODE and ALIGN parameters.
	* alpha.h (SLOW_UNALIGNED_ACCESS): Likewise.
	* arm/thumb.h (SLOW_UNALIGNED_ACCESS): Likewise.
	* gmicro.h (SLOW_UNALIGNED_ACCESS): Likewise.
	* fr30.h (SLOW_UNALIGNED_ACCESS): Likewise.

From-SVN: r31211
2000-01-04 15:09:19 -05:00
Jeff Law ccc50f7d72 Update copyrights
From-SVN: r31195
2000-01-04 01:10:30 -07:00
Mark Mitchell 13799af323 system.h (CEIL): Define.
* system.h (CEIL): Define.
	* builtins.c (CEIL): Remove.
	* expmed.c (CEIL): Likewise.
	* expr.c (CEIL): Likewise.
	* stor-layout.c (CEIL): Likewise.

From-SVN: r31167
2000-01-02 19:38:36 +00:00
Bernd Schmidt 3bdf58486d Avoid losing pending stack adjusts.
From-SVN: r31156
2000-01-01 12:12:10 +00:00
Geoff Keating 3306eb80e9 expmed.c (extract_bit_field): Allow for the case of non-integer objects that are smaller than a word (like...
* expmed.c (extract_bit_field): Allow for the case of non-integer
        objects that are smaller than a word (like SFmode on a 64-bit
        machine).

From-SVN: r30185
1999-10-26 00:48:38 -06:00
Bernd Schmidt 1c0290eaac Use cbranch patterns when available
From-SVN: r29613
1999-09-23 11:34:49 +00: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