aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
AgeCommit message (Collapse)AuthorFilesLines
1999-01-06Fix copyrights.Jeff Law1-1/+1
From-SVN: r24531
1999-01-06expr.c (expand_builtin): Use value_mode for the return mode.Richard Henderson1-1/+1
* expr.c (expand_builtin) [case BUILT_IN_CONSTANT_P]: Use value_mode for the return mode. From-SVN: r24525
1999-01-05expr.c (store_expr): If the lhs is a memory location pointed to be a ↵Charles M. Hannum1-15/+15
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
1998-12-29Richard Kenner <kenner@vlsi1.ultra.nyu.edu>:Richard Henderson1-36/+29
* 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-17Do not generate CLOBBERs for non-pseudo regs.Nick Clifton1-4/+22
From-SVN: r24364
1998-11-24cse.c (fold_rtx): Make autoincrement addressing mode tests be runtime ↵Jeffrey A Law1-32/+12
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-19expr.c (STACK_BYTES): Delete unused macro.Bernd Schmidt1-3/+0
* 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-18expr.c (store_expr): Don't generate load-store pair if TEMP is identical ↵J"orn Rennecke1-2/+13
(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-10-28Add code written by rth to generate use shifts to perform an extension if noNick Clifton1-2/+14
suitable extend patterns can be found. From-SVN: r23398
1998-10-22expr.c (pending_chain): Move up.Jason Merrill1-5/+6
* 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-13Warning fixes:Kaveh R. Ghazi1-4/+4
* 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-13expr.c (push_block): Handle targets where the stack grows to higher addresses...Herman A.J. ten Brugge1-1/+7
* 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-11Fine-grained control of -fcheck-memory-usage with new no_check_memory_usage ↵Ken Raeburn1-23/+26
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-07Fix for irix6 -O0 bug, see testcase gcc.c-torture/compile/981007-1.c.Jim Wilson1-1/+20
* expr.c (emit_group_store): Handle a PARALLEL destination. From-SVN: r22893
1998-10-05tree.def (GOTO_EXPR): Modified documentation.Alexandre Petit-Bianco1-0/+7
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-01calls.c (expand_call): Encapsulate code into copy_blkmode_from_reg.Gavin Romig-Koch1-0/+82
* 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-09-30expr.c (expand_expr): Handle COMPONENT_REF...Jeffrey A Law1-0/+8
* 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-28c-common.c (c_get_alias_set): Tighten slightly for FUNCTION_TYPEs and ↵Mark Mitchell1-7/+16
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-24expr.c (store_constructor): When initializing a field that is smaller than a ↵J"orn Rennecke1-1/+31
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-15tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.Richard Henderson1-14/+6
* 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-08expr.c: Corrected comment about what MOVE_RATIO does.Hans-Peter Nilsson1-2/+2
* 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-08-30expr.c (expand_expr): Change ">" to ">=" making MOVE_RATIO use consistent.Hans-Peter Nilsson1-1/+1
* 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-21tree.def (LABELED_BLOCK_EXPR, [...]): New tree nodes.Alexandre Petit-Bianco1-0/+12
� * tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR): New tree nodes. * tree.h (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, EXIT_BLOCK_LABELED_BLOCK, EXIT_BLOCK_RETURN, LOOP_EXPR_BODY): New macros. * expr.c (expand_expr): Handle LABELED_BLOCK_EXPR and EXIT_BLOCK_EXPR. From-SVN: r21897
1998-08-18expr.c (emit_block_move): Do not call memcpy as a libcall instead build up a ↵Jeffrey A Law1-17/+116
CALL_EXPR and call it like... * expr.c (emit_block_move): Do not call memcpy as a libcall instead build up a CALL_EXPR and call it like any other function. (clear_storage): Similarly for memset. From-SVN: r21831
1998-08-17expr.c (move_by_pieces): No longer static.Jeffrey A Law1-2/+1
* expr.c (move_by_pieces): No longer static. Remove prototype. * rtl.h (move_by_pieces): Add extern prototype. * mips.c (expand_block_move): Handle aligned straight line copy by calling move_by_pieces. From-SVN: r21794
1998-08-17expr.c (expand_expr): Allow assignments from TImode PARM_DECLs and VAR_DECLs.Jeff Law1-1/+6
8 * expr.c (expand_expr): Allow assignments from TImode PARM_DECLs and VAR_DECLs. From-SVN: r21784
1998-08-14expr.c (store_expr): Don't optimize away load-store pair when either source ↵J"orn Rennecke1-1/+4
or destination have a... * expr.c (store_expr): Don't optimize away load-store pair when either source or destination have a side effect. From-SVN: r21732
1998-08-13expr.c (safe_from_p): Change code to ERROR_MARK only when not accessing nodes.Jason Merrill1-4/+10
* expr.c (safe_from_p): Change code to ERROR_MARK only when not accessing nodes. * toplev.c (display_help): Add braces to shut up warnings. * fold-const.c (non_lvalue): Don't deal with null pointer constants here. (fold, case COMPOUND_EXPR): Wrap a constant 0 in a NOP_EXPR. From-SVN: r21698
1998-07-27stor-layout.c (layout_type): Handle arrays of bits, for Chill.Dave Brolley1-1/+13
Mon Jul 27 17:18:52 1998 Dave Brolley <brolley@cygnus.com> * stor-layout.c (layout_type): Handle arrays of bits, for Chill. * expr.c (get_inner_reference): Handle zero-based, unsigned, array index conversion. From-SVN: r21416
1998-07-23expr.c (check_max_integer_computation_mode): Allow conversions of constant ↵Jeffrey A Law1-2/+8
integers to MAX_INTEGER_COMPUTATION_MODE. * expr.c (check_max_integer_computation_mode): Allow conversions of constant integers to MAX_INTEGER_COMPUTATION_MODE. (expand_expr): Likewise. From-SVN: r21349
1998-07-23expr.c (expand_expr): Expand RETURN_EXPR.Alexandre Petit-Bianco1-0/+7
8 * expr.c (expand_expr): Expand RETURN_EXPR. From-SVN: r21347
1998-07-13expr.c (expand_expr): Only set MEM_IN_STRUCT_P if the memory address is not ↵Jeffrey A Law1-14/+21
varying for... * expr.c (expand_expr): Only set MEM_IN_STRUCT_P if the memory address is not varying for REFERENCE_TYPE or when we think we might have found an optimized access to the first element in an array. From-SVN: r21099
1998-07-07expr.c (emit_queue): If emitting a SEQUENCE, set QUEUED_INSN to the first ↵J"orn Rennecke1-1/+9
insn of the sequence. * expr.c (emit_queue): If emitting a SEQUENCE, set QUEUED_INSN to the first insn of the sequence. From-SVN: r20997
1998-06-30expr.c (emit_group_load, [...]): Rewrite considering the size and alignment ↵Richard Henderson1-68/+154
of the structure being manipulated. * expr.c (emit_group_load, emit_group_store): Rewrite considering the size and alignment of the structure being manipulated. * expr.c, calls.c, function.c: Update all callers. * expr.h: Update prototypes. * cse.c (invalidate): Cope with parallels. From-SVN: r20867
1998-06-30expr.c (expand_assignment, [...]): Use convert_memory_address instead of ↵Richard Henderson1-3/+3
convert_to_mode when possible. * expr.c (expand_assignment, store_constructor, expand_expr): Use convert_memory_address instead of convert_to_mode when possible. From-SVN: r20865
1998-06-30rtl.def (CONSTANT_P_RTX): New.Richard Henderson1-6/+43
* rtl.def (CONSTANT_P_RTX): New. * rtl.h (CONSTANT_P): Recognize it. * cse.c (fold_rtx): Eliminate it. * expr.c (can_handle_constant_p): New variable. (init_expr_once): Initialize it. (expand_builtin): Generate CONSTANT_P_RTX if the expression is not immediately recognizable as a constant. From-SVN: r20846
1998-06-29* Merge from gcc2 June 9, 1998 snapshot. See ChangeLog.13 forJeff Law1-18/+46
details. From-SVN: r20808
1998-06-29Warning fixes:Kaveh R. Ghazi1-2/+0
* Makefile.in (fix-header): Don't needlessly depend on cpperror.o. * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): Cast expansion to void since it is evaluated in a comma list. * mips.h (ASM_GENERATE_INTERNAL_LABEL): Always sprintf `NUM' argument as a long and cast `NUM' to long to ensure it is of the proper width. Wrap macro arguments in parens when they appear in the expansion. * sol2.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. * sparc.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. (ASM_DECLARE_RESULT): Fix fprintf format specifier to match function argument return type. (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P, REGNO_OK_FOR_FP_P, REGNO_OK_FOR_CCFP_P): Use `(unsigned)' not `U'. * cpplib.c (cpp_message_from_errno): Remove unneeded argument to cpp_message. * dbxout.c: Fix the comments after an #endif to reflect the actual condition tested in the preceding #if. * except.c (find_all_handler_type_matches): Switch to old-style function definition. * expr.c (expand_builtin): Remove unused variable `type' twice. * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Cast -1 before comparing it to an unsigned long. * haifa-sched.c (print_insn_chain): Remove unused function. * objc/objc-act.c (build_msg_pool_reference): Hide prototype and definition. * toplev.c: When testing whether to include dbxout.h, also include it when XCOFF_DEBUGGING_INFO is defined. * unroll.c (unroll_loop): Add parentheses around assignment used as truth value. From-SVN: r20801
1998-06-25invoke.texi (-fstrict-aliasing): Document.Mark Mitchell1-1/+11
* invoke.texi (-fstrict-aliasing): Document. * rtl.texi (MEM_ALIAS_SET): Document. * flags.h (flag_strict_aliasing): Declare. * toplev.c (flag_strict_aliasing): Define. (f_options): Add -strict-aliasing. (main): Set flag_strict_aliasing if -O2 or higher. * tree.h (tree_type): Add alias_set field. (TYPE_ALIAS_SET): New macro. (TYPE_ALIAS_SET_KNOWN_P): Likewise. (get_alias_set): Declare. * tree.c (lang_get_alias_set): Define. (make_node): Initialize TYPE_ALIAS_SET. (get_alias_set): New function. * print-tree.c (print_node): Dump the alias set for a type. * c-tree.h (c_get_alias_set): Declare. * c-common.c (c_get_alias_set): New function. * c-decl.c (init_decl_processing): Set lang_get_alias_set. * expr.c (protect_from_queue): Propogage alias sets. (expand_assignment): Calculate alias set for new MEMs. (expand_expr): Likewise. * function.c (put_var_into_stack): Likewise. (put_reg_into_stack): Likewise. (gen_mem_addressof): Likewise. (assign_parms): Likewise. * stmt.c (expand_decl): Likewise. * varasm.c (make_decl_rtl): Eliminate redundant clearing of DECL_RTL. Calculate alias set for new MEMs. * rtl.def (REG): Add dummy operand. (MEM): Add extra operand to store the MEM_ALIAS_SET. * rtl.h (MEM_ALIAS_SET): New macro. (gen_rtx_MEM): Declare. * emit-rtl.c (gen_rtx_MEM): New function. * gengenrtl.c (sepcial_rtx): Make MEMs special. * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): New macro. (DIFFERENT_ALIAS_SETS_P): Likewise. (canon_rtx): Propogate the alias set to the new MEM. (true_dependence): Check the alias sets. (anti_dependence): Likewise. (output_dependence): Likewise. * explow.c (stabilize): Progoate alias sets. * integrate.c (copy_rtx_and_substitute): Likewise. * final.c (alter_subreg): Make sure not to leave MEM_IN_STRUCT_P in an unpredictable state. Propogate alias sets. * reload1.c (reload): Clear MEM_ALIAS_SET for new MEMs about which we have no alias information. From-SVN: r20719
1998-06-24expr.c (expand_assignment): Rework address calculation for structure field ↵Herman A.J. ten Brugge1-0/+41
members to expose more invariant... * expr.c (expand_assignment): Rework address calculation for structure field members to expose more invariant computations to the loop optimizer. (expand_expr): Likewise. From-SVN: r20705
1998-06-24optabs.c: Use gen_rtx_FOO (...) instead of gen_rtx (FOO, ...).John Carr1-2/+2
* optabs.c: Use gen_rtx_FOO (...) instead of gen_rtx (FOO, ...). * expr.c: Likewise. * explow.c: Likewise. * combine.c: Likewise. * reload1.c: Likewise. * gcse.c: Likewise. From-SVN: r20701
1998-06-24expr.c (get_memory_rtx): New function.John Carr1-47/+61
* 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-19expr.c (do_jump_by_parts_greater_rtx): Removed.H.J. Lu1-2/+0
* expr.c (do_jump_by_parts_greater_rtx): Removed. (truthvalue_conversion): Likewise. From-SVN: r20611
1998-06-17haifa-sched.c (haifa_classify_insn): TRAP_IF is risky.John Carr1-0/+17
* haifa-sched.c (haifa_classify_insn): TRAP_IF is risky. (sched_analyze_2): Allow scheduling TRAP_IF. * reorg.c (mark_referenced_resources): Examine operands of TRAP_IF. * rtl.h (TRAP_CODE): New macro. * rtl.def (TRAP_IF): Change second operand type to rtx. * optabs.c (gen_cond_trap): New function. (init_traps): New function. (init_optabs): Call init_traps. * expr.h: Declare gen_cond_trap. * jump.c (jump_optimize): Optimize jumps to and around traps. * sparc.md: Define trap instructions. * rs6000.md: Define trap instructions. * rs6000.c (print_operand): New code 'V' for trap condition. (trap_comparison_operator): New function. * m88k.md: Update use of TRAP_IF. * tree.h (enum built_in_function): New function code BUILT_IN_TRAP. * c-decl.c (init_decl_processing): New builtin __builtin_trap. * expr.c (expand_builtin): Handle BUILT_IN_TRAP. * expr.c (expand_builtin): Error if __builtin_longjmp second argument is not 1. From-SVN: r20543
1998-06-17expr.c (check_max_integer_computation_mode): New function.Jeffrey A Law1-0/+67
* expr.c (check_max_integer_computation_mode): New function. (expand_expr): Avoid integer computations in modes wider than MAX_INTEGER_COMPUTATION_MODE. * fold-const.c (fold): Likewise. * tree.h (check_max_integer_computation_mode): Declare. * tm.texi (MAX_INTEGER_COMPUTATION_MODE): Document it. From-SVN: r20538
1998-06-12expr.c (do_jump, [...]): When comparing complex prevent operands from being ↵Andreas Schwab1-36/+44
evaluated twice. * expr.c (do_jump, case EQ_EXPR, NE_EXPR): When comparing complex prevent operands from being evaluated twice. From-SVN: r20440
1998-06-10Fix build failure when pointers smaller than integers.Jim Wilson1-32/+13
* expr.c (expand_builtin_setjmp): Store const1_rtx in target. (expand_builtin_longjmp): Abort if value isn't const1_rtx. Delete code storing value in static_chain_rtx. (expand_builtin, case BUILT_IN_LONGJMP): Pass NULL_RTX for target to second expand_expr call. From-SVN: r20418
1998-06-08[multiple changes]Andrew MacLeod1-0/+2
Thu Jun 8 14:16:15 EDT 1998 Andrew MacLeod <amacleod@cygnus.com> * eh-common.h: Remove NEW_EH_MODEL compile time flag, and replace with flag_new_exceptions runtime flag. (struct old_exception_table): New struct which represents what the exception table looks like without the new model. (NEW_EH_RUNTIME): New value used as a tag in the exception table to flag that this is a new style table. * except.h: Remove compile time flag NEW_EH_MODEL. (expand_builtin_eh_stub_old): New prototype. * tree.h (enum built_in_function): Add BUILT_IN_EH_STUB_OLD. * expr.c (expand_builtin): New builtin func BUILT_IN_EH_STUB_OLD. * c-decl.c (init_decl_processing): Add new builtin function __builtin_eh_stub_old. * final.c (final_scan_insn): Replace compile time flag NEW_EH_MODEL. * flags.h (flag_new_exceptions): New runtime flag. * toplev.c (flag_new_exceptions): Initialize default to 0, -fnew-exceptions sets to 1. * except.c (output_exception_table_entry): Output New style exception identifier into table, and replace compile time flag NEW_EH_MODEL with runtime flag flag_new_exceptions. (output_exception_table): Replace compile time flag NEW_EH_MODEL. (expand_builtin_eh_stub_old): Duplicates original functionality of expand_builtin_eh_stub. (expand_builtin_eh_stub): Replace compile time flag NEW_EH_MODEL. * libgcc2.c (find_exception_handler): Remove NEW_EH_MODEL #ifdefs. (old_find_exception_handler): New func, same as find_exception_handler except it works on the old style exception table. (__throw): Replace NEW_EH_MODEL. Detect new model based on presence of identifier in the exception table, and call appropriate routines. 1998-06-08 Andrew MacLeod <amacleod@cygnus.com> * except.c (init_exception_processing): Remove NEW_EH_MODEL compile time flag. Call __cp_eh_info instead of __cp_exception_info. * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag. (__cp_exception_info): Return offset into cp_eh_info structure to match what use to be the start of this structure. (__cp_eh_info): New function to return a pointer to cp_eh_info struct. (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL compile time flag. (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call __cp_eh_info instead of __cp_exception_info. From-SVN: r20336
1998-06-08expr.c (force_operand): Detect PIC address loads before splitting arithmetic.Richard Henderson1-0/+14
* expr.c (force_operand): Detect PIC address loads before splitting arithmetic. From-SVN: r20331
1998-06-04tree.c (get_inner_array_type): New function.David Edelsohn1-15/+3
Thu Jun 4 14:35:27 1998 David Edelsohn <edelsohn@mhpcc.edu> * tree.c (get_inner_array_type): New function. * tree.h (get_inner_array_type): Prototype. * expr.h (STACK_SAVEAREA_MODE): New macro. * expr.c (expand_builtin_setjmp): Initialize sa_mode using STACK_SAVEAREA_MODE. (expand_builtin_longjmp): Likewise. * explow.c (emit_stack_save): Likewise. (allocate_dynamic_stack_space): Use Pmode not insn_operand_mode. * rs6000/aix41.h (ASM_CPU_SPEC): Define relative to ASM_DEFAULT_SPEC. (CPP_CPU_SPEC): Define relative to CPU_DEFAULT_SPEC. * rs6000/aix43.h: New file. * rs6000/t-aix43: New file. * rs6000/x-aix41: New file. * rs6000/x-aix43: New file. * configure.in (rs6000-ibm-aix*): Use them. * rs6000/powerpc.h: Delete. * rs6000/sysv4.h: Move necessary powerpc.h definitions to here. * rs6000/netware.h: and here. * rs6000/win-nt.h: and here. * rs6000/rs6000.c (processor_target_table, 620): Do not affect MASK_POWERPC64. (rs6000_override_options): Ignore flag_pic for AIX. (rs6000_immed_double_const): Delete. (u_short_cint_operand): Don't assume 32-bit CONST_INT. (reg_or_u_short_operand): Don't assume 32-bit CONST_INT. (num_insns_constant): mask64_operand() is 2 insns. (logical_operand): Don't assume 32-bit CONST_INT. (non_logical_cint_operand): Don't assume 32-bit CONST_INT. (easy_fp_constant): Any CONST_DOUBLE_HIGH is okay for 64-bit. (mask_constant): HOST_WIDE_INT parameter. (non_and_cint_operand): Delete. (mask64_operand): New function. (and64_operand): New function. (function_arg_advance): DImode arguments do not need special alignment when 64-bit. (function_arg): Likewise. (setup_incoming_varargs): Reverse reg_size assignment. (print_operand): HOST_WIDE_INT second parameter. (print_operand, 'B'): New case. (print_operand, 'M'): Fix typo in lossage string. (print_operandm 'S'): New case. (rs6000_stack_info): Reverse reg_size assignment. Use total_raw_size to compute AIX push_p. Use reg_size to compute {cr,lr}_save_offset. (rs6000_output_load_toc_table): Reverse init_ptr assignment. Use TARGET_64BIT not TARGET_POWERPC64. Convert fprintf to fputs. Load GOT highpart, don't add it. Add lowpart with {cal|la}. (rs6000_allocate_stack_space): Use {cal|la}. (output_epilog): Use {cal|la} (output_function_profiler): Add call glue to mcount call. Load GOT highpart, don't add it. Add lowpart with {cal|la}. * rs6000/rs6000.h (TARGET_SWITCHES): Add powerpc64. (STACK_BOUNDARY): Depend on TARGET_32BIT. (ADJUST_FIELD_ALIGN): Calculate array alignment using innermost type. (CONST_OK_FOR_LETTER_P): Don't assume 32-bit CONST_INT. (EXTRA_CONSTRAINTS): Remove NT 'S' and 'T'. Replace 'S' with 64-bit mask operand. (RS6000_SAVE_TOC): Depend on TARGET_32BIT. (STACK_SAVEAREA_MODE): New macro. (LEGITIMATE_CONSTANT_P): DImode okay for 64bit. (LEGITIMIZE_RELOAD_ADDRESS): New macro. (RTX_COSTS, AND/IOR/XOR): Reflect current machine description. (ASM_FILE_START): Emit 64-bit ABI directive. (ASM_DECLARE_FUNCTION_NAME): Align CSECT on doubleword in 64-bit mode. (ASM_OUTPUT_SPECIAL_POOL_ENTRY): DImode okay for 64-bit. (PREDICATE_CODES): Add "and64_operand" and "mask64_operand". Delete "non_and_cint_operand". "input_operand" includes CONST_DOUBLE. * rs6000/rs6000.md (iorsi3, xorsi3): Use HOST_WIDE_INT for mask. Restore define_splits. (floatsidf2, floatunssidf2): Remove !TARGET_POWERPC64 final constraint. (floatsidf2_internal, floatunssidf2_internal2): Likewise. Do not specify base register operand mode. (floatsidf2_loadaddr): Do not specify base register operand mode. (floatsidf2_store1, floatsidf2_store2): Operand 1 must be base register; do not specify mode. Remove !TARGET_POWERPC64 final constraint. (floatsidf2_load): Do not specify base register operand mode. Remove !TARGET_POWERPC64 final constraint. (fix_truncdfsi2_internal, fix_truncdfsi2_{store,load}): Do not specify base register operand mode. (adddi3): Split large constants early. (absdi3): Shift by 63, not 31. (*mulsidi3_ppc64): New pattern. (rotldi3): Add masking combiner patterns. (anddi3): Add rldic{r,l} masking. Remove split of large constants because PPC insns zero-extend. (iordi3, xordi3): Split large constants early. (movsi matcher): Remove S and T constraints. (movsf const_double): create SImode constant from TARGET_DOUBLE. (movdf_hardfloat32): Add default abort() case. (movdf easy_fp_const): create DImode constant from TARGET_DOUBLE. (movdi): Remove 64-bit constant generator. Try to convert CONST_DOUBLE to CONST_INT. Handle TOC memory constants. (movdi_32): Add default abort() case. (movdi_64): Add numerous ways to split 64-bit constants. Make catch-all define_split more optimal and never FAIL. (movti_ppc64): Add default abort() case. (allocate_stack): Remove operand modes. Use Pmode. (restore_stack_block): Remove operand modes. Generate Pmode temporary. (save_stack_nonlocal, restore_stack_nonlocal): Generate Pmode temporary. Save area is double Pmode. (call_indirect_aix64, call_value_indirect_aix64): New patterns. (call, call_value): Do not specify address operand mode. Choose appropriate AIX ABI. (*call_local64, *ret_call_local64): New patterns. (*call_nonlocal_aix64, *ret_call_nonlocal_aix64): New patterns. (*ret_call_nonlocal_aix32): Use call_value_indirect for REG. (compare): Materialize DImode truthvalues. From-SVN: r20229