Commit Graph

570 Commits

Author SHA1 Message Date
Mark Mitchell
c15398de77 tree.def (TYPE_NONCOPIED_PARTS): Revise documentation to match reality.
* tree.def (TYPE_NONCOPIED_PARTS): Revise documentation to match
        reality.
        * expr.c (init_noncopied_parts): Don't generate initializers for
        parts that don't need them.

From-SVN: r26969
1999-05-17 07:21:14 +00:00
Craig Burley
41af162ca7 disable maintenance of errno
From-SVN: r26897
1999-05-12 00:38:14 -04:00
Mark Mitchell
5c7a310f81 emit-rtl.c (start_sequence): Expand comments.
* emit-rtl.c (start_sequence): Expand comments.
	(start_sequence_for_rtl_expr): Likewise.
	(push_to_sequence): Likewise.
	(end_sequence): Likewise.
	* expr.c (inhibit_defer_pop): Likewise.
	* expr.h (inhibit_defer_pop): Likewise.
	(NO_DEFER_POP): Likewise.
	(OK_DEFER_POP): Likewise.

From-SVN: r26704
1999-04-29 23:01:29 +00:00
Zack Weinberg
76bbe0281d expr.c (emit_move_insn_1): Abort if MODE argument is invalid.
1999-04-27 08:32 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
	* expr.c (emit_move_insn_1): Abort if MODE argument is invalid.
	(compare): Punt if TREE_OPERAND (exp, 0) is an ERROR_MARK.

From-SVN: r26673
1999-04-27 05:34:43 +00:00
Mumit Khan
6a9c4aed1a function.c (put_var_into_stack): Change ptr_mode to Pmode in setup for chkr_set_right_libfunc calls.
* function.c (put_var_into_stack): Change ptr_mode to Pmode
        in setup for chkr_set_right_libfunc calls.
        (assign_params): Likewise.
        * expr.c (emit_push_insn): Change ptr_mode to Pmode in
        setup for chkr_copy_bitmap_libfunc and chkr_set_right_libfunc calls.
        (expand_assignment): Change ptr_mode to Pmode in
        setup for chkr_add_libfunc and chkr_copy_bitmap_libfunc.
        (store_expr): Change ptr_mode to Pmode in
        setup for chkr_add_libfunc and chkr_copy_bitmap_libfunc.
        (expand_expr): Change ptr_mode to Pmode in
        setup for chkr_check_addr_libfunc.
        (expand_builtin): Change ptr_mode to Pmode in
        setup for chkr_check_str_libfunc, chkr_copy_bitmap_libfunc and
        chkr_check_addr_libfunc.
        * calls.c (rtx_for_function_call): Change ptr_mode to Pmode in
        setup for chkr_check_exec_libfunc.
        (expand_call): Change ptr_mode to Pmode in
        setup for chkr_set_right_libfunc.
        (expand_call): Change ptr_mode to Pmode in
        setup for chkr_set_right_libfunc.
        (store_one_arg): Change ptr_mode to Pmode in
        setup for chkr_set_right_libfunc.

Co-Authored-By: Donn Terry <donn@interix.com>

From-SVN: r26664
1999-04-26 16:51:09 -06:00
Donn Terry
ab40f61225 * expr.c (expand_assignment): Improve test for pointer type.
From-SVN: r26634
1999-04-25 18:39:01 -06:00
Donn Terry
6419e5b063 expr.c (expand_assignment): Force pointers to proper mode if POINTERS_EXTEND_UNSIGNED is defined.
* expr.c (expand_assignment): Force pointers to proper mode if
        POINTERS_EXTEND_UNSIGNED is defined.

From-SVN: r26484
1999-04-15 16:52:22 -06:00
Jeffrey A Law
efd07ca794 expr.c (expand_expr, [...]): Do not try to optimize a aggregate address which has VOIDmode.
* expr.c (expand_expr, case ARRAY_REF, COMPONENT_REF, BIT_FIELD_REF):
        Do not try to optimize a aggregate address which has VOIDmode.
        Mirrors March 23 change to expand_assignment.

From-SVN: r26307
1999-04-08 19:35:36 -06:00
Richard Henderson
d22cba0ade expr.c (expand_builtin): Use copy_to_mode_reg; don't force constants into a register.
* expr.c (expand_builtin) [BUILT_IN_RETURN_ADDRESS]: Use
        copy_to_mode_reg; don't force constants into a register.

From-SVN: r26231
1999-04-06 19:14:06 -07:00
Richard Henderson
89c846727b expr.c (expand_builtin_setjmp): Put setjmp return label on nonlocal_goto_handler_labels for flow.
* expr.c (expand_builtin_setjmp): Put setjmp return label on
        nonlocal_goto_handler_labels for flow.

From-SVN: r26225
1999-04-06 15:10:24 -07:00
Michael Hayes
6e01bd94f8 tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
	USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
	(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
	USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
	* rtl.h	(USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
	USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
	USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
	USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
	definition.
	* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
	USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
	definition.

From-SVN: r26134
1999-04-02 15:39:55 +00:00
Jim Wilson
6ab06cbb5b Fix irix6 libstdc++ v3 build failure with complex types.
* expr.c (store_field): When check direct_store, assume all complex
	modes can be directly stored.

From-SVN: r26104
1999-04-01 04:05:24 -08:00
Jeffrey A Law
9a7b9f4f06 expr.c (expand_assignment): Do not try to optimize a aggregate address which has VOIDmode.
* expr.c (expand_assignment): Do not try to optimize a aggregate
        address which has VOIDmode.

From-SVN: r25934
1999-03-23 15:33:35 -07:00
Martin v. Löwis
68557e1473 * expr.c (expand_expr): Handle ERROR_MARK much earlier.
From-SVN: r25864
1999-03-19 14:26:50 +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
6bcd94ae80 expr.c (expand_expr): Allow a CALL_EXPR with a mode wider than MAX_INTEGER_COMPUTATION_MODE.
* expr.c (expand_expr): Allow a CALL_EXPR with a mode wider than
        MAX_INTEGER_COMPUTATION_MODE.

From-SVN: r25714
1999-03-11 17:02:32 -07:00
Per Bothner
b335b813b5 tree.def (TRY_FINALLY_EXPR, [...]): New tree nodes,
h
	* tree.def (TRY_FINALLY_EXPR, GOTO_SUBROUTINE_EXPR):  New tree nodes,
	* expr.c (expand_expr):  Support new tree nodes.

From-SVN: r25308
1999-02-19 03:19:30 -08: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
Richard Henderson
acd693d10c output.h (current_function_has_computed_jump): Rename from current_function_addresses_labels.
* output.h (current_function_has_computed_jump): Rename from
        current_function_addresses_labels.
        * function.h (struct function): Likewise for addresses_labels member.
        * rtl.h (FUNCTION_FLAGS_HAS_COMPUTED_JUMP): Likewise.
        * function.c (current_function_has_computed_jump): Likewise.
        Update all references.
        * integrate.c (function_cannot_inline_p):
        Test current_function_has_computed_jump instead of addresses_labels.
        (initialize_for_inline): Likewise save.
        (output_inline_function): Likewise restore.
        * expr.c (expand_expr): Don't reference addresses_labels variables.
        * stmt.c (expand_computed_goto): Set has_computed_jump.

From-SVN: r25100
1999-02-08 13:39:33 -08:00
Jeffrey A Law
ab87f8c8d1 Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog for
details.

From-SVN: r24879
1999-01-26 18:43:17 -07:00
Andrew MacLeod
15914757c6 * expr.c (emit_push_insn): Fix Dumb Typo.
From-SVN: r24811
1999-01-21 20:50:56 +00:00
Andrew MacLeod
fbe1758db2 expr.c (MOVE_BY_PIECES_P): Define condition for deciding to use move_by_pieces.
* expr.c (MOVE_BY_PIECES_P): Define condition for deciding to use
	move_by_pieces.
	(MOVE_MAX_PIECES): Define maximum number of bytes to move at once.
	(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_DECREMENT): Define defaults.
	(USE_STORE_POST_INCREMENT, USE_STORE_PRE_DECREMENT): Define defaults.
	(move_by_pieces): Use new macros.
	(emit_block_move): Use new macros.
	(clear_by_pieces): Use new macros.
	(clear_storage): Use new macros.
	(emit_push_insn): Use new macros.
	(expand_expr): Use new macros.
	* config/sh/sh.h (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_DECREMENT):
	Define.
	(USE_STORE_POST_INCREMENT, USE_STORE_PRE_DECREMENT): Define.
	(MOVE_BY_PIECES_P): Define based on alignment and TARGET_SMALLCODE.
	(MOVE_MAX_PIECES): move 8 bytes on SH4.
	* tm.texi(MOVE_BY_PIECES_P, MOVE_MAX_PIECES, USE_LOAD_POST_INCREMENT,
	USE_LOAD_PRE_DECREMENT, USE_STORE_POST_INCREMENT,
	USE_STORE_PRE_DECREMENT): Describe new macros.

From-SVN: r24801
1999-01-21 11:33:44 +00:00
Richard Henderson
ee5332b81a cse.c (fold_rtx): Revert 29 Dec change.
* cse.c (fold_rtx): Revert 29 Dec change.
        (cse_insn): Revert 12 Jan change.
        * expr.c (expand_builtin): Don't emit CONST around CONSTANT_P_RTX.
        * regclass.c (reg_scan_mark_refs): Revert 29 Dec change.
        * rtl.def: Likewise.
        * rtl.h (CONSTANT_P): Likewise.
        * expr.c (emit_move_insn): Never try to flush CONSTANT_P_RTX
        to memory.
        * recog.c (immediate_operand): Accept CONSTANT_P_RTX.
        * alpha.c (input_operand): Likewise.
        * c4x.c (const_operand): Likewise.
        * explow.c (allocate_dynamic_stack_space): Use register_operand
        instead of arith_operand, which does not exist.
        * 1750a.h: Fix comment closure.
        * a29k.c (a29k_set_memflags): Fix typo in 19 Jan change.
        * arc.md (one_cmplsi2_set_cc_insn): Fix set mode mismatch.
        * arm.h (TARGET_SWITCHES): Fix typo.
        * i370.md (anon mult and div patterns): Fix set mode mismatch.
        * i860.c (output_delayed_branch): Fix operands to constrain_operands.
        (output_delay_insn): Likewise.
        * m88k.md (anon rotate insns): Fix set mode mismatch.
        (anon BLKmode moves): Commonize and fix set mode mismatches.
        * ns32k.md (udivmoddi[shq]i4_internal): Fix mode mismatch.
        * romp.md (movdf): Fix typo.

From-SVN: r24796
1999-01-20 18:21:28 -08:00
Richard Henderson
70f8a7a13f Update comment to match code.
From-SVN: r24785
1999-01-20 01:15:00 -08:00
Richard Henderson
d804ed43d0 expr.c (do_jump_for_compare): Handle conditional branch expanders emitting multiple jump instructions.
* expr.c (do_jump_for_compare): Handle conditional branch expanders
        emitting multiple jump instructions.
        * jump.c (condjump_label): New function.
        * rtl.h (condjump_label): Declare it.

From-SVN: r24773
1999-01-19 13:30:48 -08:00
Richard Henderson
c14c652997 expr.c (emit_move_insn_1): Revert 17 Dec change.
* expr.c (emit_move_insn_1): Revert 17 Dec change.  Don't emit
        clobber during or after reload.

From-SVN: r24772
1999-01-19 13:11:00 -08:00
Mark Mitchell
c6df88cbec rtl.h (rtx_def): Update documentation.
* rtl.h (rtx_def): Update documentation.
	(MEM_IN_STRUCT_P): Likewise.
	(MEM_SCALAR_P): New macro.
	(MEM_COPY_ATTRIBUTES): Likewise.
	(MEM_SET_IN_STRUCT_P): Likewise.
	* rtl.texi (MEM_SCALAR_P): Document.
	* alias.c (canon_rtx): Use MEM_COPY_ATTRIBUTES.
	(fixed_scalar_and_varying_struct_p): New function.  Use
	MEM_SCALAR_P rather than !MEM_IN_STRUCT_P.
	(aliases_everything_p): Likewise.
	(true_dependence): Use them.
	(write_dependence_p): New function, containing code common to
	anti_dependence and output_dependence.
	(anti_dependence): Use it.
	(output_dependence): Likewise.
	* calls.c (save_fixed_argument_area): Don't clear
	MEM_IN_STRUCT_P.
	(expand_call): Use MEM_SET_IN_STRUCT_P.
	(emit_library_call): Don't clear MEM_IN_STRUCT_P.
	(emit_library_call_value): Likewise.
	(store_one_arg): Use MEM_SET_IN_STRUCT_P.
	* combine.c (simplify_rtx): Use MEM_COPY_ATTRIBUTES.
	(make_extraction): Likewise.
	(simplify_shift_const): Likewise.
	(gen_lowpart_for_combine): Likewise.
	* cse.c (gen_lowpart_if_possible): Use MEM_COPY_ATTRIBUTES.
	* emit-rtl.c (operand_subword): Likewise.
	(change_address): Likewise.
	* explow.c (stabilize): Use MEM_COPY_ATTRIBUTES.
	* expr.c (protect_from_queue): Use MEM_COPY_ATTRIBUTES.
	(emit_group_store): Use MEM_SET_IN_STRUCT_P.
	(copy_blkmode_from_reg): Likewise.
	(store_field): Likewise.
	(expand_expr): Remove bogus guesswork setting MEM_IN_STRUCT_P
	heuristically.  Use MEM_SET_IN_STRUCT_P.
	(get_memory_rtx): Likewise.
	* final.c (alter_subreg): Use MEM_COPY_ATTRIBUTES.
	* function.c (assign_stack_temp): Clear MEM_SCALAR_P and
	MEM_ALIAS_SET on newly returned MEMs.
	(assign_temp): Use MEM_SET_IN_STRUCT_P.
	(put_reg_into_stack): Likewise.
	(fixup_var_refs1): Use MEM_COPY_ATTRIBUTES.
	(gen_mem_addressof): Use MEM_SET_IN_STRUCT_P.
	(assign_parms): Likewise.
	(expand_function): Likewise.
	* integrate.c (expand_inline_function): Likewise.
	(copy_rtx_and_substitute): Use MEM_COPY_ATTRIBUTES.
	* loop.c (note_addr_stored): Remove check on MEM_IN_STRUCT_P.
	* optabs.c (gen_move_insn): Use MEM_COPY_ATTRIBUTES.
	* print-rtl.c (print_rtx): Print /f for frame_related.
	* recog.c (validate_replace_rtx_1): Use MEM_COPY_ATTRIBUTES.
	* reload1.c (reload): Copy MEM_SCALAR_P as well.
	* stmt.c (expand_decl): Use MEM_SET_IN_STRUCT_P.
	(expand_anon_union_decl): Use MEM_COPY_ATTRIBUTES.
	* varasm.c (make_decl_rtl): Use MEM_SET_IN_STRUCT_P.
	(output_constant_def): Likewise.
	* a29k.c (a29k_set_memflags_1): Take scalar_p.
	Set MEM_SCALAR_P.
	(a29k_set_memflags): Use it.
	* alpha.c (get_aligned_mem): Use MEM_COPY_ATTRIBUTES.
	* c4x.c (c4x_scan_for_ld): Likewise.
	* h8300.c (fix_bit_operand): Likewise.
	* m88k.c (legitimize_address): Likewise.
	(block_move_loop): Likewise.
	(block_move_no_loop): Likewise.
	(block_move_sequence): Likewise.
	(m88k_builtin_saveregs): Use MEM_SET_IN_STRUCT_P.
	* mips/abi64.h (SETUP_INCOMING_VARARGS): Likewise.
	* rs6000.c (expand_block_move_insn): Use MEM_COPY_ATTRIBUTES.
	* sh.c (sh_builtin_saveregs): Use MEM_SET_IN_STRUCT_P.
	* arm.h (arm_gen_load_multiple): Take scalar_p.
	(arm_store_load_multiple): Likewise.
	* arm.c (arm_gen_load_multiple): Likewise.
	(arm_gen_store_multiple): Likewise.
	(arm_gen_movstrqi): Treat MEM_SCALAR_P like MEM_IN_STRUCT_P.

From-SVN: r24759
1999-01-19 10:32:33 +00:00
Richard Henderson
1f06ee8d0d expr.c (queued_subexp_p): Make public.
* expr.c (queued_subexp_p): Make public.
        * expr.h (queued_subexp_p): Declare it.
        * recog.c (asm_operand_ok): New function.
        (check_asm_operands): Use it.  After reload, use constrain_operands
        instead.
        * recog.h (asm_operand_ok): Declare it.
        * stmt.c (expand_asm_operands): Use it to try harder to make
        asms initially satisfy their constraints.

From-SVN: r24686
1999-01-15 10:43:47 -08:00
Jeff Law
fdf004cfcb Fix copyrights.
From-SVN: r24531
1999-01-06 13:02:36 -07:00
Richard Henderson
44d22bef0a expr.c (expand_builtin): Use value_mode for the return mode.
* expr.c (expand_builtin) [case BUILT_IN_CONSTANT_P]: Use
        value_mode for the return mode.

From-SVN: r24525
1999-01-06 10:51:30 -08:00
Charles M. Hannum
12f06d174c expr.c (store_expr): If the lhs is a memory location pointed to be a postincremented (or...
�
        * expr.c (store_expr): If the lhs is a memory location pointed
        to be a postincremented (or postdecremented) pointer, always
        force the rhs to be evaluated into a pseudo.

From-SVN: r24507
1999-01-05 18:28:56 -07:00
Richard Henderson
185ebd6c71 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>:
* rtl.def (CONSTANT_P_RTX): Clarify commentary.
        * expr.c (expand_builtin, case BUILT_IN_CONSTANT_P): Rework to
        consider constant CONSTRUCTOR constant and to defer some cases
        to cse.
        * cse.c (fold_rtx, case CONST): Add handling for CONSTANT_P_RTX.
        * regclass.c (reg_scan_mark_refs, case CONST): Likewise.
Richard Henderson  <rth@cygnus.com>
        * expr.c (init_expr_once): Kill can_handle_constant_p recognition.
        * cse.c (fold_rtx, case 'x'): Remove standalone CONSTANT_P_RTX code.

From-SVN: r24439
1998-12-29 03:36:22 -08:00
Nick Clifton
b2e7e6fb8a Do not generate CLOBBERs for non-pseudo regs.
From-SVN: r24364
1998-12-17 14:02:32 +00:00
Jeffrey A Law
940da3246d cse.c (fold_rtx): Make autoincrement addressing mode tests be runtime selectable.
* cse.c (fold_rtx): Make autoincrement addressing mode tests be
        runtime selectable.
        * expr.c (move_by_pieces): Similarly.
        (move_by_pieces_1, clear_by_pieces, clear_by_pieces_1): Similarly.
        * flow.c (find_auto_inc): Similarly.
        (try_pre_increment): Similarly.
        * loop.c (strength_reduce): Similarly.
        * regclass.c (auto_inc_dec_reg_p): Similarly.
        * regmove.c (try_auto_increment): Similarly.
        (fixup_match_1): Similarly.
        * rtl.h (HAVE_PRE_INCREMENT): Define if not already defined.
        (HAVE_PRE_DECREMENT): Similarly.
        (HAVE_POST_INCREMENT, HAVE_POST_DECREMENT): Similarly.
        sponding changes to all target header files.

From-SVN: r23837
1998-11-24 16:15:19 -07:00
Bernd Schmidt
c795bca923 expr.c (STACK_BYTES): Delete unused macro.
* expr.c (STACK_BYTES): Delete unused macro.
	* calls.c: Provide default for PREFERRED_STACK_BOUNDARY.
	(STACK_BYTES): Use PREFERRED_STACK_BOUNDARY, not STACK_BOUNDARY.
	(expand_call): Likewise.
	(emit_library_call): Likewise.
	(emit_library_call_value): Likewise.
	* function.c: Provide default for PREFERRED_STACK_BOUNDARY.
	(STACK_BYTES): Use PREFERRED_STACK_BOUNDARY, not STACK_BOUNDARY.
	* explow.c: Provide default for PREFERRED_STACK_BOUNDARY.
	(round_push): Use PREFERRED_STACK_BOUNDARY, not STACK_BOUNDARY.
	(allocate_dynamic_stack_space): Likewise.
	* tm.texi (PREFERRED_STACK_BOUNDARY): Document new macro.
	(STACK_BOUNDARY): Update description to reflect the new situation.

From-SVN: r23730
1998-11-19 15:47:55 -07:00
J"orn Rennecke
f3f2255a8c expr.c (store_expr): Don't generate load-store pair if TEMP is identical (according to ==) with TARGET.
* expr.c (store_expr): Don't generate load-store pair
	if TEMP is identical (according to ==) with TARGET.

From-SVN: r23696
1998-11-18 14:15:03 +00:00
Nick Clifton
2b28d92ef6 Add code written by rth to generate use shifts to perform an extension if no
suitable extend patterns can be found.

From-SVN: r23398
1998-10-28 10:30:46 +00:00
Jason Merrill
fdc46fbe65 expr.c (pending_chain): Move up.
* expr.c (pending_chain): Move up.
	(save_expr_status): Do save pending_chain.
	(restore_expr_status): And restore it.
	* function.h (struct function): Add pending_chain.

From-SVN: r23241
1998-10-22 22:18:53 -04: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
Herman A.J. ten Brugge
e1a9b2ab4f expr.c (push_block): Handle targets where the stack grows to higher addresses...
* expr.c (push_block): Handle targets where the stack grows
        to higher addresses, but args grow to lower addresses and
        ACCUMULATE_OUTGOING_ARGS is not defined.

From-SVN: r23046
1998-10-13 04:08:10 -06:00
Ken Raeburn
7d384cc0b3 Fine-grained control of -fcheck-memory-usage with new no_check_memory_usage attribute.
Fine-grained control of -fcheck-memory-usage with new no_check_memory_usage
attribute.  Misc minor bugfixes and tests for it too.

From-SVN: r22983
1998-10-11 02:21:54 +00:00
Jim Wilson
10a9f2beac Fix for irix6 -O0 bug, see testcase gcc.c-torture/compile/981007-1.c.
* expr.c (emit_group_store): Handle a PARALLEL destination.

From-SVN: r22893
1998-10-07 05:12:21 -07:00
Alexandre Petit-Bianco
70e6ca43a3 tree.def (GOTO_EXPR): Modified documentation.
8
	* tree.def (GOTO_EXPR): Modified documentation.
	* expr.c (expand_expr): Expand GOTO_EXPR into a goto or a computed
 	goto.

From-SVN: r22859
1998-10-05 15:36:16 -07:00
Gavin Romig-Koch
c36fce9a42 calls.c (expand_call): Encapsulate code into copy_blkmode_from_reg.
* calls.c (expand_call) : Encapsulate code into
	copy_blkmode_from_reg.
	* expr.c (copy_blkmode_from_reg): New function.
	* expr.h (copy_blkmode_from_reg): New function.
	* integrate.c (function_cannot_inline_p): We can inline
	these now.
	(expand_inline_function): Use copy_blkmode_from_reg
	if needed.  Avoid creating BLKmode REGs.
	(copy_rtx_and_substitute): Don't try to SUBREG a BLKmode
	object.

From-SVN: r22714
1998-10-01 13:00:21 +00:00
Jeffrey A Law
ee06cc21bf expr.c (expand_expr): Handle COMPONENT_REF...
* expr.c (expand_expr): Handle COMPONENT_REF, BIT_FIELD_REF ARRAY_REF
        and INDIRECT_REF in code to check MAX_INTEGER_COMPUTATION_MODE.

From-SVN: r22666
1998-09-30 02:59:18 -06:00
Mark Mitchell
ece320145f c-common.c (c_get_alias_set): Tighten slightly for FUNCTION_TYPEs and ARRAY_TYPEs.
* c-common.c (c_get_alias_set): Tighten slightly for FUNCTION_TYPEs
	and ARRAY_TYPEs.  Tidy up.  Improve support for type-punning.
	* expr.c (store_field): Add alias_set parameter.  Set the
	MEM_ALIAS_SET accordingly, if the target is a MEM.
	(expand_assignment): Use it.
	(store_constructor_field): Pass 0.
	(expand_expr): Likewise.

From-SVN: r22620
1998-09-28 07:44:12 +00:00
J"orn Rennecke
34c7390981 expr.c (store_constructor): When initializing a field that is smaller than a word...
* expr.c (store_constructor): When initializing a field that is smaller
	than a word, at the start of a word, try to widen it to a full word.
	* cse.c (cse_insn): When we are about to change a register,
	remove any invalid references to it.
	(remove_invalid_subreg_refs): New function.
	(mention_regs): Special treatment for SUBREGs.
	(insert_regs): Don't strip SUBREG for call to mention_regs.
	Check if reg_tick needs to be bumped up before that call.
	(lookup_as_function): Try to match known word_mode constants when
	looking for a norrower constant.
	(canon_hash): Special treatment for SUBREGs.

From-SVN: r22567
1998-09-24 10:59:41 +01:00
Richard Henderson
710384268d tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.  Kill.
	(BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill.
	(BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill.
	(BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New.
	* c-decl.c (init_decl_processing): Update accordingly.
	* expr.c (expand_builtin): Likewise.
	* cp/decl.c (init_decl_processing): Likewise.
	* rtl.h (global_rtl): Add cfa entry.
	(virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New.
	(LAST_VIRTUAL_REGISTER): Update.
	* emit-rtl.c (global_rtl): Add cfa entry.
	(init_emit): Initialize it.
	* function.c (cfa_offset): New.
	(instantiate_virtual_regs): Initialize it.
	(instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx.
	(expand_function_end): Call expand_eh_return.
	* tm.texi (ARG_POINTER_CFA_OFFSET): New.
	* except.c (current_function_eh_stub_label): Kill.
	(current_function_eh_old_stub_label): Likwise; update all references.
	(expand_builtin_set_return_addr_reg): Kill.
	(expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill.
	(expand_builtin_set_eh_regs): Kill.
	(eh_regs): Produce a third reg for the actual handler address.
	(eh_return_context, eh_return_stack_adjust): New.
	(eh_return_handler, eh_return_stub_label): New.
	(init_eh_for_function): Initialize them.
	(expand_builtin_eh_return, expand_eh_return): New.
	* except.h: Update prototypes.
	* flow.c (find_basic_blocks_1): Update references to the stub label.
	* function.h (struct function): Kill stub label elements.
	* libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the
	register number is one that would be in the previous window.
	Provide a dummy definition for non-windowed targets.
	(get_reg_addr): New function.
	(get_reg, put_reg, copy_reg): Use it.
	(__throw): Rely on in_reg_window, not INCOMING_REGNO.  Kill stub
	generating code and use __builtin_eh_return.  Use __builtin_dwarf_cfa.
	* alpha.c (alpha_eh_epilogue_sp_ofs): New.
	(alpha_init_expanders): Initialize it.
	(alpha_expand_epilogue): Use it.
	* alpha.h: Declare it.
	* alpha.md (eh_epilogue): New.
	* m68h.h (ARG_POINTER_CFA_OFFSET): New.
	* sparc.h (ARG_POINTER_CFA_OFFSET): New.

From-SVN: r22436
1998-09-15 12:19:12 -07:00
Hans-Peter Nilsson
7e24ffc924 expr.c: Corrected comment about what MOVE_RATIO does.
* expr.c: Corrected comment about what MOVE_RATIO does.
        * config/alpha/alpha.h: Ditto.
        * config/1750a/1750a.h: Ditto.
        * config/clipper/clipper.h: Ditto.
        * config/i386/i386.h: Ditto.

From-SVN: r22339
1998-09-08 16:48:00 -06:00
Hans-Peter Nilsson
9862dea924 expr.c (expand_expr): Change ">" to ">=" making MOVE_RATIO use consistent.
* expr.c (expand_expr): Change ">" to ">=" making MOVE_RATIO use
        consistent.
        * tm.texi (Costs): Say MOVE_RATIO is number of mem-mem move
        *sequences* *below* which scalar moves will be used.

From-SVN: r22107
1998-08-30 13:21:22 -06:00