Commit Graph

625 Commits

Author SHA1 Message Date
Jeff Law
e009aaf31f loop.c (regs_patch_p): Add prototype.
* loop.c (regs_patch_p): Add prototype.
        (add_label_notes, count_nonfixed_reads): Likewise.
        (find_single_use_in_loop): Likewise.
        (express_from): Surround prototype with #ifdef.
        (giv_sort): Similarly.
        * jump.c (mark_modified_reg): Add prototype.
        * haifa-sched.c (is_prisky): Add prototype.
        (queue_to_ready): Likewise.
        * genextract.c (gen_insn): Add prototype.
        * genemit.c (max_operand_1): Add prototype.
        (max_operand_vec, print_code, gen_exp, gen_insn): Likewise.
        (gen_expand, gen_explit, output_add_clobbers): Likewise.
        (output_init_mov_optab): Likewise.
        * genattrtab.c (attr_hash_add_rtx): Add prototype.
        (attr_hash_add_string, write_length_unit_log): Likewise.
        * genattr.c (init_range): Add prototype.
        * combine.c (sets_function_arg_p): Add prototype.

From-SVN: r19251
1998-04-16 17:56:12 -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
Michael Meissner
996d9dacc4 If -Os, set MOVE_RATIO to 3, not 15
From-SVN: r19209
1998-04-14 13:20:50 +00:00
Alexandre Petit-Bianco
bf1e5319c3 tree.def (EXPR_WITH_FILE_LOCATION): New tree node definition.
d
Fri Apr  3 17:02:13 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
 	* tree.def (EXPR_WITH_FILE_LOCATION): New tree node definition.
 	* tree.h (EXPR_WFL_{NODE,FILENAME,FILENAME_NODE,LINENO,
 	COLNO,LINECOL,SET_LINECOL,EMIT_LINE_NOTE}): New macros.
 	(build_expr_wfl): New prototype declaration.
 	* tree.c (build_expr_wfl): New function, to build
  	EXPR_WITH_FILE_LOCATION nodes.
 	(copy_node): Don't zero TREE_CHAIN if copying a
  	EXPR_WITH_FILE_LOCATION node.
 	* print-tree.c (print_node): Handle EXPR_WITH_FILE_LOCATION.
 	* expr.c (expand_expr): Handle EXPR_WITH_FILE_LOCATION.

From-SVN: r19049
1998-04-08 07:03:48 -07: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
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 Kenner
7c00d1fe83 expr.c (expand_expr, [...]): If have conditional move, don't use ORIGINAL_TARGET unless REG.
Wed Mar 18 13:42:01 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
        * expr.c (expand_expr, case COND_EXPR): If have conditional move,
        don't use ORIGINAL_TARGET unless REG.

From-SVN: r18671
1998-03-18 05:41:50 -08:00
Kaveh R. Ghazi
081f5e7e66 Fix more warnings...
* c-lang.c (finish_file): Wrap variable `void_list_node' with macro
        test !ASM_OUTPUT_CONSTRUCTOR || !ASM_OUTPUT_DESTRUCTOR.
        * calls.c (emit_call_1): Wrap variable `already_popped' with macro
        test !ACCUMULATE_OUTGOING_ARGS.
        * collect2.c (write_c_file_glob): Wrap function definition in
        macro test !LD_INIT_SWITCH.
        * combine.c (try_combine): Wrap variables `cc_use' and
        `compare_mode' in macro test EXTRA_CC_MODES.
        * cpplib.c (do_ident): Remove unused variable `len'.
        (skip_if_group): Remove unused variables `at_beg_of_line' and
        `after_ident'.
        (cpp_get_token): Remove unused variable `dummy'.
        * dbxout.c (scope_labelno): Move static variable definition inside
        the one function scope where it is used.
        (dbxout_function_end): Wrap prototype and definition in
        macro test !NO_DBX_FUNCTION_END.
        * dwarf2out.c (add_subscript_info): Wrap variable `dimension_number'
        in macro test !MIPS_DEBUGGING_INFO.
        * expr.c (expand_builtin_setjmp): Move declaration of variable `i'
        into the scope where it is used.  Wrap empty else-statement body
        in braces.
        * fix-header.c: Fix typo in comment.
        (inf_skip_spaces): Cast results of INF_UNGET to (void).
        (check_protection, main): Likewise.
        * flow.c (find_basic_blocks_1): Remove dangling comment text.
        * function.c (contains): Wrap prototype and definition in macro
        test HAVE_prologue || HAVE_epilogue.
        (fixup_var_refs_1): Remove unused variable `width'.
        * gen-protos.c (main): Remove unused variable `optr'.
        * haifa-sched.c (debug_control_flow): Remove unused variable `j'.
        * libgcc2.c (__udiv_w_sdiv): Provide dummy return value of 0.
        (__sjpopnthrow): Remove unused variable `jmpbuf'.
        (__throw): Remove unused variable `val'.
        * protoize.c: Check for a previously existing definition before
        defining *_OK macros.
        * scan-decls.c (scan_decls): Remove unused variable `old_written'.

From-SVN: r18654
1998-03-18 07:18:06 +00:00
Kaveh R. Ghazi
5172371191 Fix warious warnings:
* c-aux-info.c: Include string.h/strings.h.
	* pa.c: Include stdlib.h.
	(pa_combine_instructions): Prototype the function.
	(pa_can_combine_p, forward_branch_p, shadd_constant_p): Likewise.
	(reloc_needed): Add default case for enumeration switch.
	(remove_useless_addtr_insns): Remove unused variable `all'.
	(hppa_expand_prologue): Add explicit braces to avoid
	ambiguous `else'.
	(output_function_epilogue): Remove unused variable `i'.
	(output_millicode_call): Remove unused variable `link'.
	(shadd_constant_p, forward_branch_p): Make the function static.
	(following_call): Explicitly declare to return int.
	(pa_reorg): Declare as void.
	(pa_combine_instructions): Declare as static void.  Add
	parentheses around && within ||.
	* pa.h: Add prototypes for pa_reorg, symbolic_operand,
	following_call, function_label_operand, lhs_lshift_cint_operand
	and zdepi_cint_p.
	* pa.md: Add parentheses around && within ||.
	* cppalloc.c: Include stdlib.h.
	* cpperror.c (cpp_print_containing_files): Remove unused variable
	`i'.  Fix format specifier in fprintf.
	* cse.c (cse_around_loop): Add explicit braces to avoid
	ambiguous `else'.
	(delete_dead_from_cse): Wrap variable `tem' in macro HAVE_cc0.
	* expr.c (expand_expr): Add parentheses around && within ||.
	* final.c (app_enable): Replace fprintf with fputs where there are
	no format specifiers and no trailing argument after the string.
	Eg, when printing ASM_APP_ON/ASM_APP_OFF.
	(app_disable): Likewise.
	(final_end_function): Likewise.
	(final_scan_insn): Likewise.  Remove unused variable `set'.
	(profile_function): Wrap empty if-statement body in {} brackets.
	* function.c: Include stdlib.h.
	(pad_below): Wrap prototype and definition in ARGS_GROW_DOWNWARD.
	(reposition_prologue_and_epilogue_notes): Add parentheses
	around assignment used as truth value.
	* integrate.c (expand_inline_function): Wrap variable
	`cc0_insn' in macro HAVE_cc0.
	* jump.c (jump_optimize): Wrap variable `q' in macro
	HAVE_cc0.  Remove unused variable `prev1'.
	* libgcc2.c (__bb_exit_trace_func): Add parentheses around &&
	within ||.  Fix format specifier in fprintf.
	(__bb_init_prg): Add parentheses around assignment used as
	truth value.
	* local-alloc.c: Include stdlib.h.
	(requires_inout): Add parentheses around assignment used
	as truth value.
	* loop.c (analyze_loop_iterations): Wrap prototype and definition
	in macro HAVE_decrement_and_branch_on_count.
	(insert_bct, instrument_loop_bct): Likewise.
	(move_movables): Add parentheses around assignment used as
	truth value.
	(consec_sets_invariant_p): Likewise.
	(maybe_eliminate_biv_1): Wrap variable `new' in macro HAVE_cc0.
	* objc/objc-act.c: Include stdlib.h.
	(lookup_method_in_protocol_list): Wrap empty else-statement body
	in braces.
	(lookup_protocol_in_reflist): Likewise.
	(objc_add_static_instance): Remove unused variables `decl_expr'
	and `decl_spec'.
	(get_objc_string_decl): Remove unused variable `decl'.
	(generate_static_references): Remove unused variables `idecl' and
	`instance'.
	(check_protocols): Wrap empty else-statement body in braces.
	* protoize.c: Include stdlib.h.
	(substr): Add parentheses around assignment used as truth value.
	(abspath): Likewise.
	(shortpath): Likewise.
	* regmove.c (fixup_match_1): Add parentheses around assignment
	used as truth value.
	* reload.c (push_secondary_reload): Remove unused variable `i'.
	(find_reloads): Add parentheses around assignment used as truth
	value.
	* reload1.c: Include stdlib.h.
	* rtl.h: Correct typo in prototype of offsettable_memref_p.
	* stmt.c (add_case_node): Add parentheses around assignment used
	as truth value.
	(case_tree2list): Likewise.
	* tree.c (valid_machine_attribute): Wrap variable `decl_attr_list'
	in macro VALID_MACHINE_DECL_ATTRIBUTE.  Wrap variable
	`type_attr_list' in macro VALID_MACHINE_TYPE_ATTRIBUTE.
	(merge_attributes): Add explicit braces to avoid ambiguous
	`else'.
	* unroll.c (copy_loop_body): Wrap variable `cc0_insn' in
	macro HAVE_cc0.
	* varasm.c: Include stdlib.h.

From-SVN: r18290
1998-02-28 07:06:53 +00:00
Robert Lipe
8bd6ecc280 expr.c (expand_assignment): Correct typo exposed by -Wall.
* expr.c (expand_assignment):  Correct typo exposed by -Wall.
        offset should have been a truth value, not an assignment.

From-SVN: r17876
1998-02-12 14:59:57 +00:00
Robert Lipe
381127e845 except.c (start_dynamic_cleanup): Remove unused variable 'dhc'.
* except.c (start_dynamic_cleanup): Remove unused variable 'dhc'.
        (expand_eh_region_start_tree): Remove unused variable 'note'.
        (exception_optimize): Remove unused variable 'regions'.
        (expand_builtin_eh_stub):  Remove unused variable 'temp'.
        (copy_eh_entry): Deleted.   Dead function.
        * expr.c (move_block_to_reg) Bracket declaration of 'pat' and
        'last' with same #if HAVE_load_multiple as use of it.
        (move_block_from_reg): Likewise.
        (emit_move_insn_1): Remove unused variable 'insns'.
        (store_constructor): Bracket declaration of startb, endb with
        #if TARGET_MEMFUNCTIONS.  Remove unused variables 'set_word_size'
        'target', and 'xtarget'.
        (expand_builtin_setjmp): Remove unused variables 'op0',
        'next_arg_reg', 'old_inhibit_defer_pop'.
        (expand_builtin): Remove unused variable 'offset'.
        (do_store_flag): Remove unused variables 'pattern', 'jump_pat'.
        (emit_queue): Add parens for assignment used as conditional.
        (expand_expr): case TARGET_EXPR: Remove unused variable 'temp'.

From-SVN: r17843
1998-02-10 17:35:13 -07:00
Jeffrey A Law
060fbabfb9 expr.c (clear_pending_stack_adjust): Handle case where a function calls alloca...
* expr.c (clear_pending_stack_adjust): Handle case where a function
        calls alloca, but the user has specified -fomit-fframe-pointer.

From-SVN: r17770
1998-02-07 16:26:08 -07:00
Richard Henderson
6fd1c67b8b expr.c (expand_builtin_setjmp): Accept two new arguments for the labels to branch to on first and subsequent...
* expr.c (expand_builtin_setjmp): Accept two new arguments for
 the labels to branch to on first and subsequent executions.  Don't
 play with __dummy.  Rename `setjmp' insn to `builtin_setjmp_setup',
 and provide it with the jmp_buf.  Use only one of
 `builtin_setjmp_receiver' or `nonlocal_goto_receiver',
 and provide the former with the target label.
 (expand_builtin) [BUILTIN_SETJMP]: Generate a label for use by setjmp.
 (expand_builtin) [BUILTIN_LONGJMP]: Split out to ...
 (expand_builtin_longjmp): ... here.  Recognize a `builtin_longjmp'
 insn to replace all of the normal nonlocal_goto code.  Don't play
 with __dummy.  Correct arguments to nonlocal_goto.
 * expr.h (expand_builtin_setjmp): Update prototype.
 * except.c (start_dynamic_handler): When using builtin_setjmp,
 generate more accurate flow information.
 * alpha.md (nonlocal_goto_receiver_osf): Delete.
 (nonlocal_goto_receiver_vms): Rename to nonlocal_goto_receiver.
 (builtin_longjmp, builtin_setjmp_receiver): New.
 * sparc.md (update_return): Disambiguate unspec number.
 (nonlocal_goto): Rearrange arguments to match caller in except.c.
 (builtin_setjmp_setup): Rename from setjmp.  Match and ignore the
 jmp_buf operand.
 * mips.md (nonlocal_goto_receiver, builtin_setjmp_receiver): Remove.
 (builtin_setjmp_setup*, builtin_longjmp): New.

From-SVN: r17602
1998-02-02 11:28:57 -08:00
Hans-Peter Nilsson
db771a3c53 * expr.c (emit_push_insn): Add code to use movstrti if present.
From-SVN: r17589
1998-02-01 17:23:13 -07:00
Hans-Peter Nilsson
7a6df7f924 expr.c (emit_push_insn): Use same max-move-amount for movstrhi and movstrqi as in emit_block_move ().
* expr.c (emit_push_insn): Use same max-move-amount for movstrhi
	and movstrqi as in emit_block_move ().

From-SVN: r17588
1998-02-01 17:21:46 -07:00
J"orn Rennecke
f8dac6eb3f expr.c (get_inner_reference): Use sbitsizetype for type sizes.
* expr.c (get_inner_reference): Use sbitsizetype for type sizes.
        * fold-const.c (size_int): Replace with
        (size_int_wide).
        (make_bit_field_ref): Use bitsize_int for bit position.
        * stor-layout.c (sizetype): Delete.
        (sizetype_tab, sbitsizetype, ubitsizetype): Declare.
        (layout_record, layout_union, layout_type):
        Use bitsize_int for bit size.
        (set_sizetype): New function.
        (make_signed_type, make_unsigned_type): Use it.
        * c-decl.c (init_decl_processing): Likewise.
        * tree.h (size_int): Don't delcare, #define.
        (size_int_wide, sizetype_tab, sbitsize, ubitsize): Declare.
        (set_sizetype): Declare.
        (bitsize_int, size_int_2, BITS_PER_UNIT_LOG, sizetype, bitsizetype):
        Define.
        * c-typeck.c (c_sizeof, c_sizeof_nowarn, c_size_in_bytes):
        Convert result to sizetype.
        (really_start_incremental_init, push_init_level):
        Set type of constructor_bit_index to sbitsizetype.
        (push_init_level): Use unsigned arithmetic to determine padding.
        (output_init_element): Likewise.

From-SVN: r17577
1998-02-01 04:47:59 -07:00
Jim Wilson
03566575a9 Remove rest of bytecode stuff, except for the VMS *.com files.
* Makefile.in: Remove remaining bytecode stuff.
	* emit-rtl.c, expr.c: Likewise.

From-SVN: r17459
1998-01-23 07:43:01 -08:00
Jeffrey A Law
27766f0efa Remove more bytecode stuff.
From-SVN: r17436
1998-01-20 10:02:10 -07:00
Jeffrey A Law
b93a436e6b Makefile.in: Remove all bytecode support.
* Makefile.in: Remove all bytecode support.
        (OBJS): Make sure last entry is a real object file, not EXTRA_OBJS.
        * emit-rtl.c: Remove all bytecode support.
        * expr.c, expr.h function.c, integrate.c: Likewise.
        * output.h, regclass.c, rtl.h, stmt.c, toplev.c: Likewise.
        * tree.h, varasm.c: Likewise.
        * bi-*, bc-*: Delete bytecode related files.
Bytecode suppors disappears :-)

From-SVN: r17432
1998-01-20 01:55:07 -07: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
Jeff Law
c85f7c16ad Bring in final gcc-2.8.0 changes.
From-SVN: r17355
1998-01-14 13:57:58 -07:00
Richard Henderson
6c174fc0e6 c-decl.c (init_decl_processing): Provide proper fallback symbol for __builtin_memset.
* c-decl.c (init_decl_processing): Provide proper fallback symbol
for __builtin_memset.
* expr.c (expand_builtin) [MEMSET]: Arg 3 type code is INTEGER_TYPE
not INTEGER_CST.  Assert arg 3 is a constant.
* alpha.c (mode_width_operand): Accept 64-bit modes.
(mode_mask_operand): Likewise.
(print_operand): Likewise for 'M' and 'U' codes.
(alpha_expand_unaligned_load): New function.
(alpha_expand_unaligned_store): Likewise.
(alpha_expand_unaligned_load_words): Likewise.
(alpha_expand_unaligned_store_words): Likewise.
(alpha_expand_block_move): Likewise.
(alpha_expand_block_clear): Likewise.
* alpha.h (MOVE_RATIO): New define.
* alpha.md (extxl, ext*h, ins*l, mskxl): Name them.
(insql, insxh, mskxh, extv, extzv, insv, movstrqi, clrstrqi): New.
* alpha.h (ASM_OUTPUT_LOOP_ALIGN, ASM_OUTPUT_ALIGN_CODE): Set to 3.
(CONSTANT_ALIGNMENT, DATA_ALIGNMENT): Disable.

From-SVN: r17278
1998-01-01 20:48:04 -08:00
Jeff Law
2d48c13dc2 expr.c (expand_expr): For {BITFIELD,COMPONENT,ARRAY}_REF...
d
        * expr.c (expand_expr): For {BITFIELD,COMPONENT,ARRAY}_REF, if the
        offset's mode is not ptr_mode, convert it.

From-SVN: r17260
1997-12-29 06:15:21 -07:00
Ian Lance Taylor
18543a2208 expr.c (do_tablejump): Let CASE_VECTOR_PC_RELATIVE be an expression.
* expr.c (do_tablejump): Let CASE_VECTOR_PC_RELATIVE be an
        expression.
        * stmt.c (expand_end_case): Likewise.
        * alpha.h (CASE_VECTOR_PC_RELATIVE): Update.
        * fx80.h, gmicro.h, m68k.h, m88k.h, ns32k.h: Likewise.
        * rs6000.h, sh.h, tahoe.h, v850.h vax.h z8k.h: Likewise.

From-SVN: r17155
1997-12-19 09:43:29 -07:00
Jeff Law
6d8ccdbbb2 Bring over changes from latest gcc-2.8 pre-release.
Mirror sched.c change into haifa-sched.c

From-SVN: r17097
1997-12-15 00:05:04 -07:00
Per Bothner
14e83f2ef5 * expr.c (expand_builtin): Support BUILT_IN_FMOD - just call fmod.
From-SVN: r17090
1997-12-13 11:40:06 -08:00
Jeff Law
956d69504d Merge from gcc-2.8
From-SVN: r16987
1997-12-06 17:31:01 -07:00
Jeff Law
f45ebe4754 O Bring in changes from release branch (egcs_ss_971127).
From-SVN: r16866
1997-12-01 10:53:12 -07:00
Richard Henderson
f35bcbc5d0 expr.c (expand_builtin_setjmp): Set current_function_has_nonlocal_label.
* expr.c (expand_builtin_setjmp): Set
        current_function_has_nonlocal_label.
        * stupid.c (stupid_life_analysis): If has_nonlocal_label, kill
        call-saved registers across calls.

        * alpha.md (exception_receiver): Remove.
        (nonlocal_goto_receiver_osf): New
        (nonlocal_goto_receiver_vms): Renamed from nonlocal_goto_receiver.
        (nonlocal_goto_receiver): New, select _osf or _vms.

From-SVN: r16492
1997-11-14 07:51:00 -07:00
Paul Eggert
41c9120baf patch from paul eggert to fix -0.0/0.0 confusion that breaks glibc
* real.h (REAL_VALUES_IDENTICAL): New macro.
	* expr.c (is_zeros_p): Don't consider -0.0 to be all zeros.
	* fold-const.c (operand_equal_p): Don't consider -0.0 to be
	identical to 0.0.
	* tree.c (simple_cst_equal): Don't consider -0.0 to have the
	same tree structure as 0.0.
	* varasm.c (immed_real_const_1): Use new REAL_VALUES_IDENTICAL
	macro instead of doing it by hand.

From-SVN: r16472
1997-11-13 16:07:27 -08:00
Jeff Law
e9a25f70a0 Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
1997-11-02 14:19:36 -07:00
Jeffrey A Law
6cad9e3280 expr.c (expand_builtin_setjmp): Don't emit a SETJMP note or set current_function_calls_setjmp anymore.
* expr.c (expand_builtin_setjmp): Don't emit a SETJMP note
        or set current_function_calls_setjmp anymore.

From-SVN: r16267
1997-11-01 22:15:13 -07:00
J"orn Rennecke
59fe8c2c20 expr.c (expand_increment): When enqueing a postincrement for a MEM...
* expr.c (expand_increment): When enqueing a postincrement for a MEM,
	use copy_to_reg if address is not a general_operand.

From-SVN: r16247
1997-10-31 00:40:46 +00:00
Jim Wilson
7581a30fe2 expr.c (expand_expr, [...]): Optimize a reference to an element in a constant string.
* expr.c (expand_expr, case INDIRECT_REF): Optimize a reference
        to an element in a constant string.

From-SVN: r16195
1997-10-26 13:33:27 -07:00
Richard Henderson
ca0f22208f expr.c (get_inner_reference): Remove the array bias after converting the index to Pmode.
* expr.c (get_inner_reference): Remove the array bias after
        converting the index to Pmode.

From-SVN: r16178
1997-10-26 09:13:10 -07:00
Doug Evans
6bd35f8671 * expr.c (use_group_regs): Don't call use_reg for MEMs.
From-SVN: r16046
1997-10-18 19:48:25 +00:00
Jason Merrill
2f3ca9e7f4 c-decl.c (init_decl_processing): Add __builtin_dwarf_reg_size.
* c-decl.c (init_decl_processing): Add __builtin_dwarf_reg_size.
	* tree.h (built_in_function): Likewise.
	* expr.c (expand_builtin): Likewise.
	* except.h: Likewise.
	* dwarf2out.c (expand_builtin_dwarf_reg_size): New fn.
	* libgcc2.c (copy_reg): New fn.
	(__throw): Use it.

From-SVN: r15750
1997-09-27 14:16:15 -04:00
David S. Miller
9524f769a7 combine.c (try_combine): Use NULL_RTX instead of '0' where appropriate in calls to gen_rtx().
* combine.c (try_combine): Use NULL_RTX instead of '0' where
        appropriate in calls to gen_rtx().
        * cse.c (cse_main): Likewise.
        * emit-rtl.c (gen_label_rtx): Likewise.
        * expr.c (init_expr_once): Likewise.
        * haifa-sched.c (flush_pending_lists, sched_analyze_insn,
        sched_analyze, init_rgn_data_dependences,
        compute_block_backward_dependences): Likewise.
        * sched.c (schedule_insns): Likewise.
        * varasm.c (immed_double_const): Likewise.

From-SVN: r15630
1997-09-22 11:41:48 -06:00
Jim Wilson
21002281e5 Fix H.J. Lu's alpha-linux bug with TImode constructors.
* expr.c (expand_expr): Remove previous incorrect change.
	If target and slot has no DECL_RTL, then call mark_addressable
	again for the slot after we give it RTL.

From-SVN: r15496
1997-09-16 13:59:22 -07:00
Jason Merrill
610ce97e65 expr.c (expand_expr, [...]): Call mark_addressable again for the slot after we give it RTL.
* expr.c (expand_expr, case TARGET_EXPR): Call mark_addressable
 	again for the slot after we give it RTL.

From-SVN: r15482
1997-09-16 03:53:56 -04:00
Jason Merrill
ca55abaee7 dwarf2 EH support
From-SVN: r15464
1997-09-15 22:07:50 -04:00
Jeff Law
22cbb540d0 Remove last change. Not needed for egcs yet.
From-SVN: r15397
1997-09-10 21:01:15 -06:00
Jeffrey A Law
0680d17043 * expr.c (emit_block_move): Always return a value.
From-SVN: r15252
1997-09-10 10:52:45 -06:00
Jeff Law
66ed068304 Add port done awhile ago for the ARC cpu.
* arc/arc.h: New file.
        * arc/arc.c: New file.
        * arc/arc.md: New file.
        * arc/initfini.c: New file.
        * arc/lib1funcs.asm: New file.
        * arc/t-arc: New file.
        * arc/xm-arc.h: New file.
        * ginclude/va-arc.h: New file.
        * ginclude/stdarg.h: Include va-arc.h ifdef __arc__.
        * ginclude/varargs.h: Likewise.
        * Makefile.in (USER_H): Add va-arc.h.
        * configure.in (arc-*-elf*): Recognize.
        * longlong.h: Add ARC support.
Mostly so I can test changes in snapshot scripts.

        * expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
        when clearing non-BLKmode data.
Fixes sparc problem.

From-SVN: r15198
1997-09-09 16:21:04 -06:00
Jeffrey A Law
704af6a15f expr.c (convert_move): Handle truncation from TQFmode to QFmode.
* expr.c (convert_move): Handle truncation from TQFmode to QFmode.
From Christian Iseli.

From-SVN: r15054
1997-09-02 23:33:06 -06:00
Andreas Schwab
eae4b97034 expr.h (insn_gen_function): Reenable prototype.
* expr.h (insn_gen_function): Reenable prototype.

	* expr.c (move_by_pieces_1, clear_by_pieces_1): Fix prototype of
	first parameter.

From-SVN: r14994
1997-08-29 09:02:03 -06:00
Richard Kenner
921b3427bc (expand_builtin, case BUILT_IN_AGGREGATE_INCOMING_ADDRESS): New case.
(expand_assignment, expand_expr, emit_push_insn, store_expr):
Insert calls to chkr_check_addr, chkr_set_right, and chkr_copy_bitmap
when -fcheck-memory-usage.
(get_push_address, get_memory_usage_from_modifier): New functions.

From-SVN: r14611
1997-08-02 13:17:17 -04:00
Richard Kenner
2cde2255e0 (expand_expr, case PLACEHOLDER_EXPR): Find innermost matching and
don't check contains_placeholder_p.

From-SVN: r14605
1997-08-02 08:01:10 -04:00
Richard Kenner
d0977240cb (expand_expr, case LABEL_DECL): Treat inline_function_decl like current_function_decl.
(expand_expr, case LABEL_DECL): Treat inline_function_decl like
current_function_decl.
(expand_expr, case SAVE_EXPR): Handle top-level SVAE_EXPR by
moving into current function; abort if in incorrect context.

From-SVN: r14540
1997-07-27 19:35:23 -04:00
Richard Kenner
08293addce (get_inner_unaligned_p): Deleted.
(expand_assignment): Remove special-case of constant array.
(expand_expr, case ARRAY_REF): Likewise, and clean up remaining code.

From-SVN: r14536
1997-07-27 12:18:46 -04:00
Richard Kenner
b60334e840 (expand_expr, case MODIFY_EXPR): Don't preexpand calls if LHS is an
indirect via a constant pointer.

From-SVN: r14527
1997-07-25 08:36:42 -04:00
Richard Kenner
dcb7c3cea6 (expand_expr...
(expand_expr, case PLACEHOLDER_EXPR): Pick outermost object in
placeholder_list of right type without a PLACEHOLDER_EXPR.

From-SVN: r14498
1997-07-20 06:11:25 -04:00
Jim Wilson
d7d775a019 (emit_group_load): Add case using gen_lowpart.
From-SVN: r14224
1997-06-10 14:39:22 -07:00
Richard Kenner
47e538e888 (expand_builtin, case BUILT_IN_FRAME_ADDRESS): Use correct function
name in error message.

From-SVN: r14191
1997-06-09 17:24:32 -04:00
Mike Stump
6b023d0700 expr.c (expand_builtin_setjmp): Remove setting of current_function_has_nonlocal_goto, as this isn't a goto.
* expr.c (expand_builtin_setjmp): Remove setting of
	current_function_has_nonlocal_goto, as this isn't a goto.

From-SVN: r14066
1997-05-13 21:08:28 +00:00
Mike Stump
6e6a07d299 except.c (start_dynamic_handler): Fix so that we can use __builtin_setjmp...
* except.c (start_dynamic_handler): Fix so that we can use
 	__builtin_setjmp, and default to using __builtin_setjmp instead of
 	setjmp.
	* expr.c (expand_builtin_setjmp): New routine, split out from
	existing inline code from expand_builtin.
	(expand_builtin): Split out code into expand_builtin_setjmp.
	* expr.h (expand_builtin_setjmp): Add declaration.
	* libgcc2.c (__sjthrow): Default to using __builtin_setjmp instead
 	of setjmp.
	(__sjpopnthrow): Likewise.
	* optabs.c (init_optabs): Likewise.

From-SVN: r14045
1997-05-07 22:50:11 +00:00
Mike Stump
db3cf6fb33 reformat a little to match GNU coding standards.
From-SVN: r14024
1997-05-06 23:05:54 +00:00
Mike Stump
e976b8b277 Add setjmp/longjmp exception handling.
From-SVN: r13968
1997-04-23 20:04:25 +00:00
Richard Kenner
effbcc6a9e ({move,clear}_by_pieces_1, expand_assignment): Ensure we have unshared rtx before changing flags.
({move,clear}_by_pieces_1, expand_assignment): Ensure we have unshared rtx
before changing flags.
(store_{constructor,field}): Likewise.
(expand_expr, case COMPONENT_REF): Likewise.
(store_expr): Check if TEMP and TARGET are same with rtx_equal_p.

From-SVN: r13936
1997-04-20 12:19:20 -04:00
Jason Merrill
83b853c9fc x
From-SVN: r13909
1997-04-17 11:33:02 +00:00
Doug Evans
58a32c5c03 * expr.c (move_block_from_reg): Try using an integral mov operation first.
From-SVN: r13897
1997-04-13 23:29:50 +00:00
Doug Evans
e46a986ab9 expr.c (emit_push_insn): Delete emission of CLOBBER when doing partial push, no longer necessary.
* expr.c (emit_push_insn): Delete emission of CLOBBER
	when doing partial push, no longer necessary.

From-SVN: r13797
1997-03-25 19:43:45 +00:00
Jim Wilson
aff4d29bf4 (emit_group_load): Call operand_subword instead of creating
an explicit SUBREG.

From-SVN: r13743
1997-03-18 14:25:56 -08:00
Richard Kenner
dc500fa115 (expand_expr, case PLACEHOLDER_EXPR): Refine which object is picked.
From-SVN: r13718
1997-03-16 19:54:36 -05:00
Richard Kenner
08bbd316d8 (expand_expr, case COMPONENT_REF): Fix error in last change: don't
suppress conversion if just EXPAND_SUM.

From-SVN: r13383
1997-01-05 07:26:37 -05:00
Richard Kenner
0d15e60cd5 (get_inner_reference): Fix type error.
(expand_expr, case COMPONENT_REF): Don't convert if modifier
is EXPAND_CONST_ADDRESS, EXPAND_SUM, or EXPAND_INITIALIZER.

From-SVN: r13375
1997-01-04 22:21:00 -05:00
Richard Kenner
86b5812c18 (expand_expr, case COMPONENT_REF): If taking value from a CONSTRUCTOR,
must mask/sign-extend if bitfield.
(expand_builtin, case BUILT_IN_LONGJMP): Pass type, not IDENTIFIER,
to send arg of RETURN_POPS_ARGS.

From-SVN: r13373
1997-01-04 22:12:25 -05:00
Richard Kenner
ac01eace31 (expand_expr, case COND_EXPR): Add additional cases to "singleton"
cases.

From-SVN: r13372
1997-01-04 22:03:27 -05:00
Richard Kenner
2a8e278c94 (move_by_pieces): Abort only if length positive at end.
From-SVN: r13242
1996-12-07 18:48:44 -05:00
Richard Kenner
9293498fb3 (get_inner_reference): Fix error in previous change.
From-SVN: r13200
1996-11-17 20:23:00 -05:00
Richard Kenner
839c47964e (get_inner_reference): Add new arg PALIGNMENT and compute it.
(expand_assignment, do_jump): Pass new arg to get_inner_reference.
(expand_expr, case COMPONENT_REF): Likewise.

From-SVN: r13187
1996-11-16 06:18:33 -05:00
Jim Wilson
71bc03306f (emit_group_store): For REG case, call gen_lowpart if
modes are different.

From-SVN: r13152
1996-11-12 15:46:05 -08:00
Richard Kenner
b61b64100a (expand_assignment): Remove bogus resetting of alignment to inner alignment.
(expand_expr, case COMPONENT_REF): Likewise.

From-SVN: r13114
1996-11-08 17:40:11 -05:00
Jim Wilson
e9ac02a6f1 (expand_expr, case CONSTRUCTOR): Don't use a PARALLEL
target.

From-SVN: r13085
1996-10-31 10:30:25 -08:00
Ian Lance Taylor
96ff8a163e Zero extend when generating a CONST_DOUBLE in convert_modes
From-SVN: r13041
1996-10-27 02:08:23 +00:00
Torbjorn Granlund
bb60ac6305 (do_store_flag): Don't check if target is 0 in code
emitting store flag as compare-branch.

From-SVN: r12993
1996-10-22 00:26:25 +00:00
Richard Kenner
ab6c58f120 (store_expr): Disable optimization of using convert if exp's type is a
subtype.

From-SVN: r12992
1996-10-21 19:11:08 -04:00
Doug Evans
0cb1d109f4 expr.c (do_jump): Conditionalize cleanups for the COND_EXPR case...
* expr.c (do_jump): Conditionalize cleanups for the COND_EXPR case,
 	similarly to the way TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR are
 	handled.

From-SVN: r12974
1996-10-17 15:33:52 +00:00
Jim Wilson
df0faff11b (store_constructor): Delete unnecessary increment.
From-SVN: r12940
1996-10-09 13:42:42 -07:00
Richard Kenner
c2722ef63b (expand_expr, case COMPONENT_REF): Don't try to directly load a complex.
From-SVN: r12867
1996-09-29 19:04:49 -04:00
Richard Kenner
862424838e (store_expr): memset/bzero gets ptr_mode, not Pmode.
From-SVN: r12861
1996-09-29 18:42:12 -04:00
Michael Meissner
eaa9b4d930 Fix SI followed by 4 DFs under AIX
From-SVN: r12838
1996-09-24 22:14:57 +00:00
Richard Kenner
0842a17931 (expand_increment): If postincrement for MEM can't use add directly,
load address in reg and enqueue increment and store of reg.

From-SVN: r12785
1996-09-23 16:42:58 -04:00
Richard Kenner
01c8a7c858 (var_rtx): New function.
(expand_expr, case COND_EXPR): Also use target if same as singleton.

From-SVN: r12777
1996-09-23 14:40:48 -04:00
Richard Kenner
2b01c3263e (convert_move): Replace explicit checks for FP extend ops with use of can_extend_p.
(convert_move): Replace explicit checks for FP extend ops with use of
can_extend_p.
Add missing tests for FP trunc operations.

From-SVN: r12771
1996-09-22 11:30:04 -04:00
Richard Kenner
ef19912d09 (store_field): If storing a record on big endian targets,
set up so we store the high-order bits.
(expand_expr, case COMPONENT_REF): Likewise for loads.

From-SVN: r12714
1996-09-14 20:42:46 -04:00
Mike Stump
75bb87ea21 * expr.c (expand_builtin_return_addr): Fix order of parameters.
From-SVN: r12644
1996-08-15 19:59:00 +00:00
Richard Kenner
32ccb0aca0 (expand_builtin, case BUILT_IN_SETJMP): Add test and call for
nonlocal_goto_receiver pattern.

From-SVN: r12621
1996-08-12 07:44:42 -04:00
Jason Merrill
a3a58acc27 (store_expr): Handle COND_EXPR cleanups like expand_expr.
From-SVN: r12620
1996-08-12 05:52:13 +00:00
Mike Stump
26657dcad0 expr.c (do_jump, [...]): Ensure the end of an exception region comes after its start.
* expr.c (do_jump, case TRUTH_ORIF_EXPR): Ensure the end of an
	exception region comes after its start.
	(do_jump, case TRUTH_ANDIF_EXPR): Likewise.

From-SVN: r12565
1996-07-25 23:14:00 +00:00
Mike Stump
3d1953912d install EH code
From-SVN: r12548
1996-07-23 19:58:32 +00:00
Richard Kenner
8d8c9ba91b (get_inner_reference): Delete using alternate mode for bitfield; we
don't make bitfields anymore if not needed.

From-SVN: r12398
1996-07-04 11:44:14 -04:00
Mike Stump
0f41302f47 formatting tweaks
From-SVN: r12390
1996-07-03 22:07:53 +00:00
Jeff Law
5718612fc1 expr.c (compare): If function pointers need canonicalization before comparisons, canonicalize them.
* expr.c (compare): If function pointers need canonicalization
        before comparisons, canonicalize them.
        (do_store_flag): Do not use an sCC insn for a function pointer
        comparison if function pointers need canonicalization before
        comparing.

From-SVN: r12381
1996-07-02 16:59:02 -06:00
Richard Kenner
d7f21d631f (expand_builtin, case BUILTIN_MEMSET): Open code memset where val == 0.
From-SVN: r12363
1996-06-28 14:35:10 -04:00
Richard Kenner
85ab4aaaec (expand_builtin, case BUILT_IN_{SET,LONG}JMP): Properly handle case
when ptr_mode != Pmode.

From-SVN: r12294
1996-06-18 06:53:52 -04:00
Per Bothner
8f6562d026 * expr.c (safe_from_p): Allow Chill-style variable-sized arrays.
From-SVN: r12213
1996-06-07 12:11:44 -07:00
Jim Wilson
fffa9c1d2e (emit_group_load, emit_group_store): New functions.
(use_group_regs): New function.
(emit_push_insn): Handle PARALLEL parameter in REG.
(expand_assignment): Handle PARALLEL to_rtx.
(store_expr): Handle PARALLEL target.

From-SVN: r12189
1996-06-06 16:04:56 -07:00
Richard Kenner
0086427caf (store_field): Fix typo in last change; update TARGET addr.
From-SVN: r12142
1996-06-03 08:06:54 -04:00
Mike Stump
a4a3f053b7 tree.def (OFFSET_REF): Remove.
* tree.def (OFFSET_REF): Remove.
        * expr.c (expand_expr, case OFFSET_REF): Ditto.
        * tree.c (substitute_in_expr): Remove OFFSET_REF code.
Remove some old cruft

From-SVN: r12127
1996-05-31 05:08:47 +00:00
Richard Kenner
0fedef289f (expand_builtin, case BUILT_IN_{LONG,SET}JMP): Convert block address
from ptr_mode to Pmode.

From-SVN: r12120
1996-05-27 06:38:37 -04:00
Richard Kenner
06398f9dc9 (bc_runtime_type_code): Delete redundant declaration.
From-SVN: r12044
1996-05-19 12:23:40 -04:00
Mike Stump
4847c9386b expr.c (expand_expr, [...]): Make TARGET_EXPRs redoable for UNSAVE_EXPR.
* expr.c (expand_expr, cond TARGET_EXPR): Make TARGET_EXPRs
	redoable for UNSAVE_EXPR.
	* stmt.c (expand_decl_cleanup): Wrap the cleanup in an UNSAVE_EXPR
	to that we can redo it.
	* tree.c (unsave_expr_now): Handle TARGET_EXPRs fully now.
	* tree.def (TARGET_EXPR): Add a third field so that TARGET_EXPRs
	are redoable.

From-SVN: r12018
1996-05-17 21:48:14 +00:00
Mike Stump
679163cf4d expr.c (expand_expr, [...]): Move from the C++ frontend to the backend where it belongs.
* expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
	frontend to the backend where it belongs.
	* tree.c (unsave_expr): Ditto.
	(unsave_expr_now): Ditto.
	* tree.def (UNSAVE_EXPR): Ditto.
	* tree.h (unsave_expr): Ditto.
	(unsave_expr_now): Ditto.

From-SVN: r12015
1996-05-17 20:13:01 +00:00
Richard Kenner
a281e72d06 (store_field): Support BLKmode bitfield if aligned on byte boundary using emit_block_move.
(store_field): Support BLKmode bitfield if aligned on byte boundary using
emit_block_move.
(expand_expr, case COMPONENT_REF): Likewise.

From-SVN: r11971
1996-05-11 07:42:11 -04:00
Mike Stump
7b8b9722a4 expr.c (expand_increment): Add third parameter to know when to ignore the result value.
* expr.c (expand_increment): Add third parameter to know when to
        ignore the result value.
        (store_constructor): Ditto.
        (expand_expr, case PREINCREMENT_EXPR): Ditto.
        (expand_expr, case PREDECREMENT_EXPR): Ditto.
        (expand_expr, case POSTINCREMENT_EXPR): Ditto.
        (expand_expr, case POSTDECREMENT_EXPR): Ditto.
        * tree.c (stabilize_reference): Always ignore the first operand of
        COMPOUND_EXPRs.

From-SVN: r11939
1996-05-06 18:07:22 +00:00
Jim Wilson
405f0da64e (expand_expr, case INDIRECT_REF): Delete obsolete code
to special case a SAVE_EXPR operand.

From-SVN: r11938
1996-05-06 10:13:55 -07:00
Richard Kenner
477efd500b (expand_builtin, case BUILT_IN_SETJMP): CLOBBER the static chain after
label at setjmp point.

From-SVN: r11886
1996-04-25 14:05:09 -04:00
Per Bothner
8e958f701f * expr.c (store_constructor): Fix test for missing array elements.
From-SVN: r11869
1996-04-23 13:01:58 -07:00
Jim Wilson
8b29500078 (do_store_flag): Rewrite last change to avoid compiler
warnings.

From-SVN: r11832
1996-04-16 17:31:44 -07:00
Richard Kenner
b089937ac0 (expand_builtin, case BUILT_IN_LONGJMP): Make a decl for __dummy, so
we can call make_function_rtl on it.

From-SVN: r11805
1996-04-16 08:37:28 -04:00
Richard Kenner
b35cd3c16c (expand_assignment): Don't pre-evaluate RHS if a CALL_EXPR with a
variable-size return.

From-SVN: r11804
1996-04-16 06:21:39 -04:00
Jim Wilson
21b2a157ce (do_store_flag): Before calling exact_log2, remove any
sign extension bits.

From-SVN: r11803
1996-04-15 16:06:00 -07:00
Richard Kenner
0dc09c0fe2 (bc_expand_increment): Change declaration to return void.
From-SVN: r11779
1996-04-15 07:52:17 -04:00
Richard Kenner
43198be7c4 (preexpand_calls, case CALL_EXPR): Rework to properly avoid expanding
functions returning variable size objects.

From-SVN: r11698
1996-04-11 08:24:56 -04:00
Jim Wilson
22745c7e7a (emit_push_insn): Clobber register only if it is non-zero.
From-SVN: r11658
1996-04-03 14:30:07 -08:00
Richard Kenner
e8621b3c1c (get_inner_reference): When finding mode to access bitfield that ends up properly aligned...
(get_inner_reference): When finding mode to access bitfield that ends
up properly aligned, use mode class of its type unless type's mode was
BLKmode.

From-SVN: r11651
1996-04-01 16:16:06 -05:00
Jeff Law
2c7ee1a641 calls.c (expand_call): Remove current_call_is_indirect nonsense.
* calls.c (expand_call): Remove current_call_is_indirect nonsense.
	Add additional argument to INIT_CUMULATIVE_ARGS.
	(emit_library_call): Likewise.
	(emit_library_call_value): Likewise.
	* expr.c (expand_builtin): Likewise.
	* function.c (assign_parms): Likewise.
	* cp/method.c (emit_thunk): Likewise.
	* config/pa/pa.h (hppa_args): New field "indirect".
	(INIT_CUMULATIVE_ARGS): Initialize "indirect" field.
	(FUNCTION_ARG): Check "indirect" field, rather than
	"current_call_is_indirect".
	* All other backends updated with new argument to
	INIT_CUMULATIVE_ARGS

From-SVN: r11641
1996-03-29 07:37:11 -07:00
Jeff Law
9c7be814e6 expr.c (emit_push_insn): When doing a partial push...
* expr.c (emit_push_insn): When doing a partial push, emit
        a CLOBBER so that flow doesn't think the entire register
        is live.

From-SVN: r11622
1996-03-26 08:45:03 -07:00
Richard Kenner
7565a035be (expand_builtin, case BUILT_IN_SETJMP): Call "setjmp" pattern, if any.
Call dummy function pointed to by static chain pointer.
(expand_builtin, case BUILT_IN_LONJMP): Ignore second expression.
Set address of __dummy into static chain pointer.
Copy the label to return to into a pseudo earlier.

From-SVN: r11576
1996-03-20 08:13:06 -05:00
Jim Wilson
f2420d0b92 (expand_expr, case COMPONENT_REF): For unaligned object in
an aligned union, delete check for EXPAND_SUM.

From-SVN: r11519
1996-03-12 09:51:15 -08:00
Mike Stump
2a888d4cd0 expr.c (expand_expr, [...]): Delay putting the cleanup on the cleanup chain until after the subexpression...
* expr.c (expand_expr, case TARGET_EXPR): Delay putting the cleanup
	on the cleanup chain until after the subexpression has been expanded.
Fixes eh44.C and eh45.C

From-SVN: r11504
1996-03-08 23:44:26 +00:00
Jim Wilson
23ccec44cc (store_constructor_field): Add explanatory comment.
Call store_field if bitpos is nonzero and target is not a MEM.

From-SVN: r11503
1996-03-08 13:52:23 -08:00
Jason Merrill
38ee6ed956 (expand_expr, case *_DECL): If we make a non-local reference from a function with DECL_NO_STATIC_CHAIN set, abort.
(expand_expr, case *_DECL): If we make a non-local
        reference from a function with DECL_NO_STATIC_CHAIN set, abort.
        (expand_expr, case ADDR_EXPR): We don't need a trampoline for a
        function with DECL_NO_STATIC_CHAIN set.

From-SVN: r11461
1996-03-05 22:16:33 +00:00
Richard Kenner
3d8e9bc243 (bc_strdup): Delete.
(bc_load_externaddr_id): Use xstrdup instead of bc_xstrdup.

From-SVN: r11411
1996-03-04 08:39:11 -05:00
Richard Kenner
d80f96e9a8 (do_jump, case COMPOUND_EXPR): Call preserve_temp_slots.
From-SVN: r11401
1996-03-02 10:18:24 -05:00
Richard Kenner
0dddb42d90 (expand_builtin...
(expand_builtin, case BUILT_IN_SETJMP): Set CONST_CALL_P on
NOTE_INSN_SETJMP instead of emitting USE insns for call-saved regs.

From-SVN: r11340
1996-02-23 08:46:04 -05:00
Richard Kenner
a8a8cbb759 (expand_builtin, case BUILT_IN_SETJMP): Shows clobbers FP and all caller-save registers.
(expand_builtin, case BUILT_IN_SETJMP): Shows clobbers FP and all
caller-save registers.
Set current_function_has_nonlocal_goto.

From-SVN: r11276
1996-02-15 07:48:12 -05:00
Per Bothner
05c0b40505 expr.c (store_constructor): Fix flow control thinko (merge error).
* expr.c (store_constructor):  Fix flow control thinko (merge error).
* expr.c (store_constructor):  Pass correct value to recursive call.

From-SVN: r11272
1996-02-13 16:58:09 -08:00
Mike Stump
41531e5b36 expr.c (expand_expr, [...]): We must always store into the allocated slot for TAREGT_EXPRs.
* expr.c (expand_expr, case TARGET_EXPR): We must always store
       into the allocated slot for TAREGT_EXPRs.

From-SVN: r11271
1996-02-13 23:46:51 +00:00
Richard Kenner
8ab0613ce7 (convert_move): Fix typo in extendqfh2 case.
From-SVN: r11267
1996-02-13 18:11:23 -05:00
Jim Wilson
126e5b0d25 (store_constructor_field): Only call change_address if
bitpos is nonzero.

From-SVN: r11258
1996-02-13 10:28:57 -08:00
Richard Kenner
6692a31fda (expand_builtin, case BUILT_IN_NEXT_ARG): Strip off INDIRECT_REF when
checking second arg.

From-SVN: r11139
1996-01-31 08:42:23 -05:00
Richard Kenner
4ed6720543 Include hard-reg-set.h.
(arg_pointer_save_area): New declaration.
(expand_builtin, case BUILT_IN_{SET,LONG}JMP): New cases.

(expand_expr, case COMPONENT_REF): Pass EXPAND_INITIALIZER to
recursive call.

From-SVN: r11112
1996-01-27 07:57:21 -05:00
Per Bothner
e1a43f7338 Merged in a bunch of stuff related to store_constructor. See ChangeLog.
From-SVN: r11076
1996-01-19 17:41:05 -08:00
Mike Stump
9ba73d3880 expr.c (expand_expr, [...]): Make sure cleanups live on the function_obstack as they are used by the...
* expr.c (expand_expr, case COND_EXPR): Make sure cleanups live on
	the function_obstack as they are used by the exception handling code.
	(defer_cleanups_to): Ditto.
	(TRUTH_ANDIF_EXPR): Ditto.
	(TRUTH_ORIF_EXPR): Ditto.
Fixes eh43.C

From-SVN: r11033
1996-01-16 22:40:15 +00:00
Richard Kenner
43e046cbc1 (emit_move_insn_1): Don't emit clobber when moving by parts and source
equals destination.

From-SVN: r11018
1996-01-16 08:21:16 -05:00
Richard Kenner
3d27140a15 (expand_expr, case COMPONENT_REF): Don't make recursive call on object
with EXPAND_SUM.

From-SVN: r10989
1996-01-15 10:02:59 -05:00
Jeff Law
ff9b5bd87c * expr.c (expand_assignment): Fix alignment parm in emit_block_move.
From-SVN: r10977
1996-01-14 18:34:36 -07:00
Richard Kenner
06089a8b23 (save_nocopied_parts, expand_expr): Call assign_temp with extra arg.
(expand_expr, case SAVE_EXPR): Set TEMP to (const_int 0) if MODE is VOIDmode.
(expand_expr): Don't use assign_temp for pseudos when might want to be TMODE.

From-SVN: r10924
1995-12-31 21:26:50 -05:00
Richard Kenner
b7c2e1e2e4 (clear_pending_stack_adjust): Don't do optimization if -O0.
From-SVN: r10914
1995-12-31 15:02:34 -05:00
Per Bothner
32de057178 * expr.c (save_noncopied_parts, expand_expr): Use new assign_temp function.
From-SVN: r10902
1995-12-29 11:16:33 -08:00
Richard Kenner
dc6d66b319 (expand_expr, case VAR_DECL): Set REGNO_POINTER_ALIGN when copying address into memory.
(expand_expr, case VAR_DECL): Set REGNO_POINTER_ALIGN
when copying address into memory.
(expand_expr, case COMPONENT_REF, case ADDR_EXPR): Set alignment
of register when result or result's address.
(expand_expr, case CONVERT_EXPR): Don't handle -fforce-mem here.

From-SVN: r10869
1995-12-27 15:23:01 -05:00
Richard Kenner
9de0820010 (struct clear_by_pieces): New structure.
(clear_by_pieces{,_1}, {is,mostly}_zeros_p): New functions.
(clrstr_optab): New optab.
(clear_storage): Rework to try to use clear_by_pieces, then
new clrstr insn, then library call.
(store_constructor): Track if target is already cleared.
Clear target first if CONSTRUCTOR is mostly zeros.
Don't write zeros if target has been cleared.
Add new arg to clear_storage call.
(expand_expr, case CONSTRUCTOR): Don't put static constructor
in memory if mostly zero.

From-SVN: r10842
1995-12-24 06:37:15 -05:00
Richard Kenner
9151b3bf92 (store_constructor): Don't call change_address on REG.
(expand_expr, case CONSTRUCTOR): Likewise.

From-SVN: r10836
1995-12-22 17:55:49 -05:00
Jim Wilson
3b6f75e2d1 (emit_block_move): When call emit_libary_call for bcopy,
pass arguments using correct types and modes.
(emit_push_insn, expand_assignment): Likewise.
(clear_storage, store_expr): Likewise for memset and bzero.
(store_constructor): Likewise for memset.

From-SVN: r10808
1995-12-18 18:01:45 -08:00
Richard Kenner
fec535227f (store_constructor): Fix error in last change: just copy MEM, but be sure to share address.
(store_constructor): Fix error in last change: just
copy MEM, but be sure to share address.
(expand_expr, case CONSTRUCTOR): Likewise.

From-SVN: r10801
1995-12-18 16:39:20 -05:00
Torbjorn Granlund
b10af0c820 (expand_expr...
(expand_expr, case MULT_EXPR): Generalize code for widening
multiply to handle signed widening multiply when only unsigned optab
is defined, and vice versa.

From-SVN: r10788
1995-12-17 16:39:58 +00:00
Richard Kenner
db3ec607e7 (expand_assignment): Fix alignment parm in emit_block_move.
From-SVN: r10781
1995-12-16 18:24:02 -05:00
Mike Stump
3539e81693 * expr.c (expand_expr, case ADDR_EXPR): Ensure op0 isn't QUEUED.
From-SVN: r10715
1995-12-14 00:20:39 +00:00
Richard Kenner
05019f83a3 (expand_expr, case COMPONENT_REF): If result is BLKmode, use that to
access object too.

From-SVN: r10697
1995-12-10 09:51:54 -05:00
Richard Kenner
07604beb82 (expand_expr, case CONSTRUCTOR): If TREE_READONLY, set
RTX_UNCHANGING_P in TARGET.

From-SVN: r10696
1995-12-10 08:46:44 -05:00
Richard Kenner
5cb7a25a95 (expand_expr, case INDIRECT_REF): Correct typo in May 8 change.
From-SVN: r10695
1995-12-10 08:44:42 -05:00
Richard Kenner
cf04eb80b0 (store_constructor, record): If field is READONLY, set
RTX_UNCHANGING_P in TO_RTX.

From-SVN: r10671
1995-12-04 14:10:50 -05:00
Richard Kenner
16545b0a67 (truthvalue_conversion): Add declaration.
From-SVN: r10585
1995-11-26 11:19:51 -05:00
Richard Kenner
2ae342f72c (expand_expr, case ARRAY_REF): Properly convert types of index, size,
and multiplication.

From-SVN: r10573
1995-11-09 11:01:13 -05:00
Richard Kenner
4c08eef0d2 (clear_storage): SIZE is now rtx, not int.
(store_constructor): Call clear_storage with rtx.
(get_inner_reference): Convert index to precision of sizetype, not
POINTER_SIZE.
(expand_expr, case ARRAY_REF): Likewise.

From-SVN: r10529
1995-10-27 06:41:39 -04:00
Richard Kenner
3bb5826ab8 (safe_from_p, case RTL_EXPR): Return 0 if RTL_EXPR_SEQUENCE exists.
Delete code to return 0 if exp_rtl is zero.

From-SVN: r10492
1995-10-20 19:30:53 -04:00
Mike Stump
0ebba7fc0d fix small typo
From-SVN: r10431
1995-10-04 17:59:40 +00:00
Richard Kenner
15a7a8ec1c (emit_move_insn_1): When doing multi-word move, show output is
clobbered.

From-SVN: r10427
1995-10-03 12:31:19 -04:00
Richard Kenner
2bbf216f5e (expand_builtin_return_addr): Break out functionality from expand_builtin.
(expand_builtin): Call expand_builtin_return_addr.

From-SVN: r10418
1995-10-03 11:48:39 -04:00
Richard Kenner
b74f5ff2bd (expand_expr, case COMPONENT_REF): If getting component of union of
variable size, propagate TARGET.

From-SVN: r10415
1995-10-01 21:23:04 -04:00
Richard Kenner
f29369b9f2 (store_expr): When storing promoted value, don't return MEM if address
contains target.

From-SVN: r10414
1995-09-29 07:47:40 -04:00
Richard Kenner
5480a90cce (expand_builtin...
(expand_builtin, case BUILT_IN_MEMCPY): Strip off all NOP_EXPRs from
the source and destination nodes, then set MEM_IN_STRUCT_P.

From-SVN: r10397
1995-09-22 19:19:34 -04:00
Richard Kenner
f4510f3757 (safe_from_p): Only safe if EXP is variable-size and X is BLKmode.
From-SVN: r10243
1995-08-15 17:51:44 -04:00
Richard Kenner
402c7311a9 (preexpand_calls): Don't look past a CLEANUP_POINT_EXPR.
From-SVN: r10165
1995-07-26 09:09:44 -04:00
Richard Kenner
dabf8373fb (stor_expr): Force stack adjust before NO_DEFER_POP.
(expand_expr, case COND_EXPR): Likewise.

From-SVN: r10131
1995-07-14 18:18:14 -04:00
Richard Kenner
9c51f37585 (expand_expr, TARGET_EXPR): Only use original_target if !ignore.
From-SVN: r10061
1995-06-27 07:58:20 -04:00
Richard Kenner
0184223489 (expand_expr, case COND_EXPR): Protect the condition from being evaluated more than once.
(expand_expr, case COND_EXPR): Protect the condition from being evaluated more
than once.
(do_jump, case TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR): Likewise.

From-SVN: r10055
1995-06-26 18:57:58 -04:00
Richard Kenner
0f869a71da (expand_expr, TARGET_EXPR): Use original_target.
From-SVN: r10035
1995-06-22 21:41:40 -04:00
Richard Kenner
940d9d638b Update FSF address.
From-SVN: r9959
1995-06-15 07:33:25 -04:00
Richard Kenner
c816db88c3 (expand_builtin_apply_args): Put back original register save and
restore order.

From-SVN: r9952
1995-06-14 17:03:45 -04:00
Richard Kenner
330446eb52 (expand_expr, case PLACEHOLDER_EXPR): Consider two types identical if
their TYPE_MAIN_VARIANTs are the same.

From-SVN: r9897
1995-06-06 18:55:28 -04:00
Richard Kenner
9faa82d8c0 Fix typos in comments.
From-SVN: r9712
1995-05-16 08:39:54 -04:00
Richard Kenner
201012cbf9 (do_jump, case EX_EXPR, NE_EXPR): Fix typo for complex.
From-SVN: r9616
1995-05-11 06:44:14 -04:00
Richard Kenner
1125706fe4 (expand_expr, case INDIRECT_REF): Set RTX_UNCHANGING_P if both
TREE_READONLY and TREE_STATIC set.

From-SVN: r9591
1995-05-08 17:59:41 -04:00
Richard Kenner
c8465d869b (do_jump): Fix error in last change.
From-SVN: r9583
1995-05-05 17:36:40 -04:00
Richard Kenner
0e8c917222 (do_jump, case EQ_EXPR, NE_EXPR): Properly compare complex.
From-SVN: r9577
1995-05-05 07:03:41 -04:00
Jim Wilson
4c7a0be934 (expand_expr, case SAVE_EXPR): Handle the case where
mode is VOIDmode.

From-SVN: r9556
1995-05-01 16:26:28 -07:00
Richard Kenner
67225c151e (expand_expr, case CONSTRUCTOR): Don't set target to zero if more then one word.
(expand_expr, case CONSTRUCTOR): Don't set target to zero if more then one
word.
Pass size and alignment to move_by_pieces_ninsns in bytes, not bits.

From-SVN: r9548
1995-04-30 07:22:58 -04:00
Richard Kenner
33cf5823a5 (expand_builtin, case BUILT_IN_CONSTANT_P): A pointer to a string
constant is a constant.

From-SVN: r9475
1995-04-26 12:29:48 -04:00
Jim Wilson
e9cf6a9776 (struct move_by_pieces): Add to_struct and from_struct fields.
(move_by_pieces): Set to_struct and from_struct fields.
(move_by_pieces_1): Set MEM_IN_STRUCT_P of to1 and from1.
(expand_builtin, case BUILT_IN_MEMCPY): New variable type.
Set MEM_IN_STRUCT_P of src_mem and dest_mem.

From-SVN: r9468
1995-04-25 16:36:38 -07:00
Richard Kenner
ee33823f45 (expand_builtin_apply_args): If STACK_REGS is defined...
(expand_builtin_apply_args): If STACK_REGS is defined, generate USE
insns before the function body, thus showing which registers are
filled with parameters.
Reverse order of saving registers, more compact code for i387.
(expand_builtin_apply): Likewise.

From-SVN: r9462
1995-04-25 19:09:01 -04:00
Richard Kenner
34aa3599f1 (convert_move): Don't access a hard reg in an invalid mode when doing
a truncation.

From-SVN: r9447
1995-04-25 17:05:37 -04:00
Per Bothner
b09f334842 (store_constructor): Fix BITS_BIG_ENDIAN -> BYTES_BIG_ENDIAN for SET_TYPE.
From-SVN: r9416
1995-04-18 18:07:59 -07:00
Jim Wilson
85c53d245a (expand_builtin, case BUILT_IN_MEMCPY): Call force_operand
on dest_rtx before returning it.

From-SVN: r9393
1995-04-17 12:19:48 -07:00
Richard Kenner
e9cdf6e48c (expand_increment): Handle case where INCREMENTED has a non-trivial
conversion.

From-SVN: r9337
1995-04-08 16:32:01 -04:00
Richard Kenner
9fcfcce705 (expand_expr, case ADDR_EXPR): Always call convert_memory_address when
converting; add extra arg.

From-SVN: r9329
1995-04-07 12:35:49 -04:00
Richard Kenner
88f63c77d9 (clear_storage, expand_assignment, store_{expr,constructor}): Use ptr_mode instead of Pmode in some places.
(clear_storage, expand_assignment, store_{expr,constructor}): Use ptr_mode
instead of Pmode in some places.
(expand_expr, expand_builtin): Likewise.
(push_block, store_expr): Convert size to Pmode.
(expand_expr, case ADDR_EXPR): Convert from Pmode to ptr_mode.

From-SVN: r9305
1995-04-03 18:12:50 -04:00
Jim Wilson
01188446e8 (expand_assignment): When offset is zero, make new MEM
before setting MEM_VOLATILE_P.

From-SVN: r9167
1995-03-10 11:45:20 -08:00
Jason Merrill
f283f66b1f (expand_expr, CLEANUP_POINT_EXPR): Force the operand out
of memory before running cleanups.

From-SVN: r9117
1995-03-03 03:45:02 +00:00
Per Bothner
b001a02f29 Remove Feb 28's FUNCTION_NEEDS_STATIC_CHAIN changes.
From-SVN: r9106
1995-03-01 19:33:25 -08:00
Richard Kenner
f635a84d96 (store_expr): Do conversion in two steps for promoted lhs.
From-SVN: r9098
1995-03-01 06:39:01 -05:00
Per Bothner
7c38c3ad5e expr.c (expand_expr): If non-local variable is expanded...
* expr.c (expand_expr):  If non-local variable is expanded,
set FUNCTION_NEEDS_STATIC_CHAIN (current_function_decl).
* expr.c (expand_expr case ADDR_EXPR):  Check for trampoline
using FUNCTION_NEEDS_STATIC_CHAIN, instead of decl_function_context.

From-SVN: r9095
1995-02-28 15:05:01 -08:00
Jim Wilson
f9409c3ac3 (expand_expr, case COMPONENT_REF): Don't fetch unaligned
field if we only want its address.

From-SVN: r9069
1995-02-24 17:45:43 -08:00
Per Bothner
b4ee5a7269 * expr.c (store_constructor): Don't use get_set_constructor_words.
From-SVN: r8954
1995-02-14 22:40:27 -08:00
Jim Wilson
5b4ff0de30 (expand_builtin, case BUILT_IN_NEXT_ARG): Don't warn when
no argument if this is a varargs routine.

From-SVN: r8912
1995-02-11 15:12:05 -08:00
Richard Kenner
5b6c44ffbc (store_constructor, ARRAY_TYPE): Use code for non-integer INDEX for non-integer ELTTYPE size.
(store_constructor, ARRAY_TYPE): Use code for non-integer INDEX for
non-integer ELTTYPE size.
Allow INDEX to be zero in code and divide size by BITS_PER_UNIT.

From-SVN: r8902
1995-02-10 17:37:38 -05:00
Richard Kenner
2391bfeaa2 (expand_expr, case MINUS_EXPR): Remove bogus operand swap.
From-SVN: r8829
1995-01-27 18:51:02 -05:00
Jim Wilson
fa2981d865 (expand_expr, case MIN_EXPR): If must emit multiple
instructions, then don't allow a MEM target.

From-SVN: r8822
1995-01-25 15:09:41 -08:00