Commit Graph

157 Commits

Author SHA1 Message Date
Zack Weinberg
01198c2f1f c-aux-info.c, [...]: Include toplev.h for real declaration of trim_filename.
1999-04-17 20:11 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
	* c-aux-info.c, emit-rtl.c, explow.c, expmed.c, gcse.c,
	haifa-sched.c, optabs.c, reorg.c, resource.c, sched.c: Include
	toplev.h for real declaration of trim_filename.
	* Makefile.in: Update dependencies.

From-SVN: r26523
1999-04-17 17:14:58 +00:00
Andrew Macleod
7e5bda2c38 rtl.texi (RTX_FRAME_RELATED_P): Add documentation.
d
Thu Mar 25 14:04:54 EST 1999  Andrew MacLeod  <amacleod@cygnus.com>
	* rtl.texi (RTX_FRAME_RELATED_P): Add documentation.
	* rtl.h (struct rtx_def): Update comment for frame_related field.
	(set_unique_reg_note): Declare prototype.
	* dwarf2out.c (dwarf2out_frame_debug_expr): Split out from
	'dwarf2out_frame_debug' to handle only expressions, and process
	component parts of a PARALLEL expression.
	(dwarf2out_frame_debug): Process insns only, and call
	new function 'dwarf2out_frame_debug_expr' for patterns.
	* emit-rtl.c (set_unique_reg_note): New function to add a reg note,
	but if there is an existingone, deletes it first.
	* expmed.c (expand_mult, expand_divmod): Use set_unique_reg_note.
	* optabs.c (add_equal_note, expand_binop): Use set_unique_reg_note.
	(emit_no_conflict_block, emit_libcall_block): Use set_unique_reg_note.
	(expand_fix):  Use set_unique_reg_note.

From-SVN: r25979
1999-03-25 12:04:25 +00:00
Kaveh R. Ghazi
91813b2835 Warning fixes:
* calls.c (initialize_argument_information): Mark parameters
        `num_actuals' and `n_named_args' with ATTRIBUTE_UNUSED.
        * dbxout.c (dbxout_start_new_source_file): Likewise for parameter
        `filename'.
        (dbxout_finish): Likewise for parameters `file' and `filename'.
        (dbxout_prepare_symbol): Likewise for parameter `decl'.
        (dbxout_begin_function): Likewise.
        * explow.c (hard_function_value): Likewise for parameter `func'.
        * function.c (locate_and_pad_parm): Likewise for parameter `fndecl'.
        * expmed.c (expand_divmod): Omit unused argument to `expand_abs'.
        * expr.c (expand_expr): Likewise.
        * expr.h (expand_abs): Delete unused argument from prototype.
        * optabs.c (expand_abs): Remove unused parameter `unsignedp'.
        * sdbout.c (sdbout_init): Mark parameter `syms' with ATTRIBUTE_UNUSED.
        (sdbout_end_block): Likewise for parameter `n'.
        * toplev.c (debug_define): Likewise for parameters `lineno' and
        `buffer'.
        (debug_undef): Likewise.
        * varasm.c (named_section): Likewise for parameter 'reloc'.
        (assemble_external): Likewise for parameter `decl'.
        (assemble_alias): Likewise for parameter `target'.

From-SVN: r25858
1999-03-19 08:50:14 +00:00
Jeffrey A Law
c5d5d46141 except.c (start_catch_handler): Use emit_cmp_and_jump_insns.
* except.c (start_catch_handler): Use emit_cmp_and_jump_insns.
        * explow.c (probe_stack_range): Likewise.
        * expmed.c (do_cmp_and_jump): Likewise.
        * expr.c (store_expr, expand_expr, expand_builtin): Likewise.
        (do_tablejump): Likewise.
        * stmt.c (expand_expr_stmt, expand_end_case): Likewise.
        (do_jump_if_equal, emit_case_nodes): Likewise.
        * optabs.c (emit_cmp_and_jump_insns): Clarify comments.  If UNSIGNEDP,
        then convert comparison to an unsigned code before emitting the jump.
        (expand_float, expand_fix): Use emit_cmp_and_jump_insns.

From-SVN: r25205
1999-02-14 13:08:39 -07:00
J"orn Rennecke
5353610bac loop.c (strength_reduce): If scan_start points to the loop exit test...
* loop.c (strength_reduce): If scan_start points to the loop exit
	test, be wary of subversive use of gotos inside expression statements.
	Don't set maybe_multiple for a backward jump that does not
	include the label under consideration into its range.
	* unroll.c (biv_total_increment): Make use of maybe_multiple field.

From-SVN: r24196
1998-12-08 14:50:03 +00:00
Jim Wilson
7be7a07d27 Fix sparc builtin_memcpy miscompilation.
* expmed.c (store_bit_field): If need to add a SUBREG, then remove
	existing SUBREG if we can, otherwise abort.

From-SVN: r23215
1998-10-21 12:27:19 -07:00
Richard Henderson
470032d72e function.c (purge_addressof_1): Fix typo in inequality: do bitfield optimization for equal mode sizes.
* function.c (purge_addressof_1): Fix typo in inequality: do
        bitfield optimization for equal mode sizes.
        * expmed.c (store_bit_field): Don't take subregs of subregs in
        the movstrict case.  Tidy a potential problem in the multi-word case.
        (extract_bit_field): Likewise.

From-SVN: r23066
1998-10-13 16:06:47 -07:00
Kaveh R. Ghazi
c84e271261 Warning fixes:
* Makefile.in (gencheck.o): Depend on gansidecl.h.
	* c-common.c (print_char_table): Add missing initializers.
	(scan_char_table): Likewise.
	(time_char_table): Likewise.
	* c-decl.c (c_decode_option): Mark parameter `argc' with
	ATTRIBUTE_UNUSED.
	(declare_parm_level): Mark parameter `definition_flag' with
	ATTRIBUTE_UNUSED.
	* c-lex.c (readescape): Use `(unsigned)1' in shift.
	(yylex): Likewise.  Cast `sizeof' to an (int) when comparing
	against one.
	* calls.c (store_one_arg): Remove unused parameter `fndecl'.  All
	callers changed.
	(emit_call_1): Mark parameters `fndecl' and `funtype' with
	ATTRIBUTE_UNUSED.
	(expand_call): Cast result of MIN() to (unsigned int) when
	comparing against an unsigned value.
	* cccp.c (pcfinclude): Remove unused parameter `limit'.  All
	callers changed.
	(make_definition): Remove unused parameter `op'.  All callers
	changed.
	(create_definition): Cast REST_EXTENSION_LENGTH to (long) when
	comparing against the result of pointer arithmetic.
	* config/mips/mips.h (FUNCTION_ARG_BOUNDARY): Cast to (unsigned)
	when comparing against one.
	* dwarf2out.c (dwarf2out_frame_debug): Cast REGNO() and
 	HARD_FRAME_POINTER_REGNUM to (unsigned) when comparing against
 	one.
	(output_die): Move variable `i' into the scope in which it is
	used.  Change its type to `unsigned'.
	(output_die): Cast the result of `strlen' to (int) when passing it
	to ASM_OUTPUT_ASCII().
	(output_pubnames): Likewise.
	(output_line_info): Likewise.
	* emit-rtl.c (global_rtl): Add missing initializers.
	* explow.c (promote_mode): Mark parameter `for_call' with
	ATTRIBUTE_UNUSED.
	* expmed.c (expand_shift): Cast the result of GET_MODE_BITSIZE to
 	`unsigned HOST_WIDE_INT' when comparing against one.
	(synth_mult): Change type of variable `cost' to int.
	(emit_store_flag): Use `(unsigned HOST_WIDE_INT) 1' in shift.
	* expr.c (copy_blkmode_from_reg): Cast BITS_PER_WORD to (unsigned)
	when comparing against one.
	(get_inner_reference): Change variable `alignment' to unsigned.
	(expand_expr): Cast the result of GET_MODE_ALIGNMENT to (unsigned
	int) when comparing against one.
	(expand_builtin_setjmp): Change type of variable `i' to size_t.
	* fold-const.c (div_and_round_double): Cast BASE to
	(HOST_WIDE_INT) when comparing against one.
	* gencheck.c: Include gansidecl.h.
	(main): Mark parameter `argv' with ATTRIBUTE_UNUSED.
	* optabs.c (gen_cond_trap): Mark parameters `code', `op2' and
	`tcode' with ATTRIBUTE_UNUSED.
	* real.c (edivm): Cast constant value to (unsigned long) in
	expression compared against an unsigned value.
	* stmt.c (expand_return): Cast BITS_PER_WORD to (unsigned) when
	comparing against one.
	(expand_end_case): Cast CASE_VALUES_THRESHOLD to (unsigned int)
	when comparing against one.
	* stor-layout.c (mode_for_size): Cast MAX_FIXED_MODE_SIZE to
	(unsigned int) when comparing against one.  Likewise for
	GET_MODE_BITSIZE.
	(smallest_mode_for_size): Likewise.
	(save_storage_status): Mark parameter `p' with ATTRIBUTE_UNUSED.
	(restore_storage_status): Likewise.
	* toplev.c (debug_args): Add missing initializer.
	(f_options): Spelling correction.  Add missing initializers.
	(documented_lang_options): Likewise.
	(debug_end_source_file): Mark parameter `lineno' with
	ATTRIBUTE_UNUSED.
	* tree.c (valid_machine_attribute): Mark parameters `attr_args',
	`decl' and `type' with ATTRIBUTE_UNUSED.
	* varasm.c (decode_reg_name): Cast `sizeof' expression to (int)
	when comparing against one.
	(assemble_variable): Mark parameter `top_level' with
	ATTRIBUTE_UNUSED.
	(assemble_external_libcall): Mark parameter `fun' with
	ATTRIBUTE_UNUSED.
	(output_constant_pool): Mark parameters `fnname' and `fndecl' with
	ATTRIBUTE_UNUSED.

From-SVN: r23054
1998-10-13 15:25:25 +00:00
Richard Henderson
d006aa54ba expmed.c (store_bit_field): Pun non-integral str_rtx modes.
* expmed.c (store_bit_field): Pun non-integral str_rtx modes.
        Take extra care for op0 now possibly being a subreg.
        (extract_bit_field): Likewise.
        * function.c (purge_addressof_1): Revert Oct 4 change.  Drop
        the reg to memory if there is no equal sized integral mode.
        * stor-layout.c (int_mode_for_mode): New function.
        * machmode.h: Prototype it.

From-SVN: r22962
1998-10-09 08:50:25 -07:00
Torbjorn Granlund
32fdf36bb6 expmed.c (expand_divmod): Don't widen for computing remainder if we seem to have a divmod pattern for...
* expmed.c (expand_divmod): Don't widen for computing remainder
        if we seem to have a divmod pattern for needed mode.

From-SVN: r22828
1998-10-04 18:08:56 -06:00
Nick Clifton
f916eeb6db Add comment provided by Jim Wilson.
From-SVN: r22560
1998-09-23 16:24:09 +00:00
Jeffrey A Law
0d8e55d8cd combine.c (make_extraction): If no mode is specified for an operand of insv...
* combine.c (make_extraction): If no mode is specified for
        an operand of insv, extv, or extzv, default it to word_mode.
        (simplify_comparison): Similarly.
        * expmed.c (store_bit_field): Similarly.
        (extract_bit_field): Similarly.
        * function.c (fixup_var_regs_1): Similarly.
        * recog.c (validate_replace_rtx_1): Similarly.
        * mips.md (extv, extzv, insv expanders): Default modes for most
        operands.  Handle TARGET_64BIT.
        (movdi_uld, movdi_usd): New patterns.

From-SVN: r22439
1998-09-15 16:47:10 -06:00
David S. Miller
172f4957e1 expmed.c (make_tree): Sign extend even if TREE_UNSIGNED...
* expmed.c (make_tree) [CONST_INT]: Sign extend even if
	TREE_UNSIGNED, when bitsize of type's mode is larger than
	HOST_BITS_PER_WIDE_INT.

From-SVN: r21904
1998-08-21 20:17:56 -07:00
Jeff Law
9ec36da574 * Merge from gcc2 June 9, 1998 snapshot. See ChangeLog.13 for
details.

From-SVN: r20808
1998-06-29 15:40:49 -06:00
John Carr
55a6ba9ff3 expr.c (get_memory_rtx): New function.
* expr.c (get_memory_rtx): New function.
	(expand_builtin): Call get_memory_rtx for MEM arguments to builtin
	string functions.
	* expmed.c (init_expmed): Initialize all elements of *_cost arrays.

From-SVN: r20700
1998-06-24 13:32:56 +00:00
Jeffrey A Law
c16ddde3e3 calls.c (expand_call): Initialize "src" and "dest".
* calls.c (expand_call): Initialize "src" and "dest".
        * stmt.c (expand_return): Likewise.
        * expmed.c (extract_split_bit_field): Similarly for "result"
        * gcse.c (compute_hash_table): Mark first arg as unused.
        * jump.c (jump_optimize): Initialize reversep.
        * tree.c (make_node): Initialize length.

From-SVN: r20629
1998-06-19 18:35:42 -06:00
Jeff Law
38e012594e typo typo fixes fixes
From-SVN: r19601
1998-05-06 15:09:07 -06:00
Jeff Law
f5963e6170 * Check in merge from gcc2. See ChangeLog.12 for details.
From-SVN: r19553
1998-05-05 17:18:02 -06:00
Jeff Law
d77fac3be2 expr.c (store_constructor_field): Add prototype.
* expr.c (store_constructor_field): Add prototype.
        (memory_use_mode): Likewise.
        * expmed.c (synth_mult): Add prototype.
        (choose_multiplier, invert_mod2n): Likewise.

From-SVN: r19250
1998-04-16 17:07:05 -06:00
Jeff Law
e5e809f419 * Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12
for details.

        * haifa-sched.c: Mirror recent changes from gcc2.

From-SVN: r18984
1998-04-04 06:32:39 -07:00
Jeff Law
31031eddac dummy commit before merge
From-SVN: r18980
1998-04-03 09:37:26 -07:00
Kaveh R. Ghazi
670ee92097 Major cutover to using system.h:
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o,
        c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o,
        caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o,
        dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o,
        expr.o, final.o, flow.o, function.o, getpwd.o, global.o,
        integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o,
        prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o,
        reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o,
        rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o,
        tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend
        on system.h.
        * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c,
        c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c,
        caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c,
        dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c,
        expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c,
        integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c,
        prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c,
        reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c,
        rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c,
        stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c,
        xcoffout.c: Include system.h.  Organize include ordering so
        that stdarg/varargs comes before other system headers.  Remove
        spurious casts of functions assured of a prototype in system.h.

From-SVN: r18726
1998-03-20 14:58:42 +00:00
Richard Henderson
38a448ca5d alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO...
* alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO;
change gen_rtx(expr...) to gen_rtx_fmt_foo(expr...).
* caller-save.c, calls.c, combine.c, cse.c: Likewise.
* dwarf2out.c, except.c, explow.c, expmed.c, expr.c: Likewise.
* final.c, flow.c, function.c, genpeep.c, haifa-sched.c: Likewise.
* halfpic.c, integrate.c, jump.c, local-alloc.c, loop.c: Likewise.
* profile.c, recog.c, reg-stack.c, regclass.c, regmove.c: Likewise.
* reload.c, reload1.c, reorg.c, sched.c, stmt.c, stupid.c: Likewise.
* unroll.c, varasm.c: Likewise.
* config/alpha/alpha.c, config/alpha/alpha.md: Likewise.

From-SVN: r17357
1998-01-14 15:10:50 -08:00
Richard Henderson
166cdf4ab4 * expmed.c (expand_shift): If SHIFT_COUNT_TRUNCATED, drop a SUBREG.
From-SVN: r17107
1997-12-15 10:39:02 -08:00
Jeff Law
956d69504d Merge from gcc-2.8
From-SVN: r16987
1997-12-06 17:31:01 -07:00
Jeff Law
e9a25f70a0 Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
1997-11-02 14:19:36 -07:00
Jim Wilson
3bf1b08254 Patches to fix minor optimizer bugs
Patches to fix minor optimizer bugs
	* expmed.c (extract_bit_field): Don't make flag_force_mem disable
	extzv for memory operands.
	* cse.c (simplify_ternary_operation, case IF_THEN_ELSE): Collapse
	redundant conditional moves to single operand.

From-SVN: r16129
1997-10-20 16:49:48 -07:00
David S. Miller
e13a25d5a3 expmed.c (expand_divmod): If compute_mode is not the same as mode...
* expmed.c (expand_divmod): If compute_mode is not the same as
        mode, handle the case where convert_modes() causes op1 to no
        longer be a CONST_INT.

From-SVN: r15672
1997-09-23 01:25:25 -06:00
Jeff Law
db7cafb0ad version.c: Bump for snapshot.
* version.c: Bump for snapshot.

        * expmed.c (expand_divmod): Make op1_is_pow2 depend on unsignedp
        for negative constants.  Promote EXACT_DIV_EXPR to TRUNC_DIV_EXPR
        when op1_is_pow2.

        * final.c (shorten_branches): During first pass, assume worst
        possible alignment for ADDR_VEC and ADDR_VEC_DIFF insns.

        * Makefile.in (distclean): Remove various things left around
        by running the testsuite.

From-SVN: r15136
1997-09-07 16:10:34 -06:00
Mike Stump
db3cf6fb33 reformat a little to match GNU coding standards.
From-SVN: r14024
1997-05-06 23:05:54 +00:00
Richard Kenner
dc38b29226 (expand_divmod): prefer divmod in same mode over div in wider mode.
From-SVN: r13638
1997-02-15 08:42:02 -05:00
Richard Kenner
12dd565fc5 (emit_store_flag): Properly test for STORE_FLAG_VALUE of just sign bit.
From-SVN: r13552
1997-01-27 09:04:44 -05:00
Richard Kenner
c7554b2898 (store_fixed_bit_field): If not SLOW_UNALIGNED_ACCESS, treat
everything as maximally aligned.

From-SVN: r13371
1997-01-04 18:58:26 -05:00
Jeff Law
e4565aff52 * expmed.c (emit_store_flag_force): Fix typos/thinkos.
From-SVN: r13296
1996-12-12 10:57:58 -07:00
Torbjorn Granlund
04a8ee2ff6 (emit_store_flag_force): New function.
From-SVN: r12987
1996-10-21 22:18:56 +00:00
Jim Wilson
4dbebeb224 (store_bit_field): don't make flag_force_mem disable insv
for memory operands.

From-SVN: r12843
1996-09-25 13:23:32 -07:00
Torbjorn Granlund
24dcc9c5c1 (expand_mult_highpart): Revert last change.
From-SVN: r12512
1996-07-17 14:26:56 +00:00
Mike Stump
0f41302f47 formatting tweaks
From-SVN: r12390
1996-07-03 22:07:53 +00:00
Richard Kenner
2d226eb101 (expand_mult_highpart): Use op1 not wide_op1 in expansion of
mul_highpart.

From-SVN: r12361
1996-06-28 14:24:24 -04:00
Jim Wilson
f8fe20b224 (extract_bit_field): Check TRULY_NOOP_TRUNCATION before
making a SUBREG of a REG.

From-SVN: r12338
1996-06-27 15:48:57 -07:00
Richard Kenner
3cd456066e (store_split_bit_field): Don't assume the alignment of VALUE is the
same as the record.

From-SVN: r12017
1996-05-17 17:24:12 -04:00
Richard Kenner
373e7d695e Fix typo in comment.
From-SVN: r11927
1996-05-05 13:18:02 -04:00
Torbjorn Granlund
dc1d615071 (expand_divmod, case TRUNC_DIV_EXPR): Move some code
to avoid shifting by a too large count.

From-SVN: r11645
1996-03-30 12:48:15 +00:00
Richard Kenner
fdb5537fe0 (negate_rtx): Fix typo in previous change.
From-SVN: r11624
1996-03-27 07:45:08 -05:00
Richard Kenner
a39a7484b1 (negate_rtx): Don't try to negate a constant ourself; instead call
simplify_unary_operation.

From-SVN: r11611
1996-03-24 08:16:26 -05:00
Richard Kenner
1d6eaf3dea (emit_store_flag): If expanding (GE X 0) will need two insns, don't use subtarget for the result of the first insn.
(emit_store_flag): If expanding (GE X 0) will need two
insns, don't use subtarget for the result of the first insn.
Move a likely constant to the start of a condition.

From-SVN: r11562
1996-03-18 20:04:00 -05:00
Jim Wilson
34ea783bd5 (extract_bit_field): For multi-word bitfield, clobber target before
storing to it.

From-SVN: r11059
1996-01-17 15:56:06 -08:00
Richard Kenner
e28ea75bd1 (extract_bit_field): Don't abort if not MEM_IN_STRUCT_P.
From-SVN: r11022
1996-01-16 09:09:47 -05:00
Torbjorn Granlund
a295d3317e (expand_mult_highpart): When doing widening multiply,
put constant in a register.
(expand_mult_highpart): When mode is word_mode use gen_highpart
instead of right shift by size.

From-SVN: r10789
1995-12-17 16:41:09 +00:00
Richard Kenner
1d269b0cdc (store_bit_field): Don't use insv for BLKmode value.
(store_split_bit_field): Set total_bits to BITS_PER_FOR for BLKmode value.

From-SVN: r10732
1995-12-15 08:05:34 -05:00