Mark Mitchell [Wed, 19 Aug 1998 12:30:47 +0000 (12:30 +0000)]
rtl.h (rtx_function): New type.
* rtl.h (rtx_function): New type.
(for_each_rtx): New function.
* rtlanal.c (for_each_rtx): Define it.
* recog.c (change_t): New type.
(change_objects, change_old_codes, change_locs, change_olds):
Replace with ...
(changes): New variable.
(validate_change): Dynamically allocate room for more changes, if
necessary. Uses changes array instead of change_objects, etc.
(apply_change_group): Use changes array instead of
change_objects, etc.
* loop.c (loop_mem_info): New type.
(loop_mems): New variable.
(loop_mems_idx): Likewise.
(looop_mems_allocated): Likewise.
(scan_loop): Remove nregs parameter.
(next_insn_in_loop): New function.
(load_mems_and_recount_loop_regs_set): Likewise.
(load_mems): Likewise.
(insert_loop_mem): Likewise.
(replace_loop_mem): Likewise.
(replace_label): Likewise.
(INSN_IN_RANGE_P): New macro.
(loop_optimize): Don't pass max_reg_num() to scan_loop.
(scan_loop): Remove nregs parameter, compute it after any new
registers are created by load_mems. Use INSN_IN_RANGE_P and
next_insn_in_loop rather than expanding them inline. Call
load_mems to load memory into pseudos, if appropriate.
(prescan_loop): Figure out whether or not there are jumps from the
loop to targets other than the label immediately following the
loop. Call insert_loop_mem to notice all the MEMs used in the
loop, if it could be safe to pull MEMs into REGs for the duration
of the loop.
(strength_reduce): Use next_insn_in_loop. Tweak comments.
David S. Miller [Wed, 19 Aug 1998 08:14:26 +0000 (08:14 +0000)]
sparc.c (finalize_pic): Check for the correct nonlocal_goto_receiver UNSPEC number.
* config/sparc/sparc.c (finalize_pic): Check for the correct
nonlocal_goto_receiver UNSPEC number.
* config/sparc/sparc.md (nonlocal_goto_receiver): Add comment
making note of this dependency existing in sparc.c
Jeffrey A Law [Tue, 18 Aug 1998 17:49:28 +0000 (17:49 +0000)]
expr.c (emit_block_move): Do not call memcpy as a libcall instead build up a 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.
David S. Miller [Tue, 18 Aug 1998 08:24:51 +0000 (01:24 -0700)]
From Kaveh R. Ghazi.
* config/sparc/sparc.c (ultra_find_type): Add empty semicolon
statement after end of loop label.
From me...
* config/sparc/sparc.c (ultra_types_avail): New variable.
(ultra_build_types_avail): New function to record mask of insn
types in ready list at this cycle.
(ultrasparc_sched_reorder): Call it.
(ultra_find_type): Use it to quicken the search. Also simplif
dependency check, don't use rtx_equal_p because we know exactly
what we are looking for.
* config/sparc/sparc.md (sltu, sgeu): Don't FAIL, call
gen_compare_reg.
(movsf_const_intreg, movsf_const_high, movsf_const_lo,
movdf_const_intreg and helper splits): New patterns to move float
constants into integer registers.
(negtf2, negdf2, abstf2, absdf2): Rework using new patterns and
splits.
Jeffrey A Law [Mon, 17 Aug 1998 20:26:47 +0000 (20:26 +0000)]
* From Graham
* tree.c (build_index_type): Copy TYPE_SIZE_UNIT from sizetype
to itype.
* c-decl.c (finish_enum): Copy TYPE_SIZ_UNIT from enumtype to tem.
Jeff Law [Mon, 17 Aug 1998 20:11:06 +0000 (14:11 -0600)]
rs6000.c (secondary_reload_class): For TARGET_ELF...
�
* rs6000.c (secondary_reload_class): For TARGET_ELF, indicate that
a BASE_REGS register is needed as an intermediate when copying
a symbolic value into any register class other than BASE_REGS.
Jeff Law [Mon, 17 Aug 1998 20:11:04 +0000 (14:11 -0600)]
rs6000.c (secondary_reload_class): For TARGET_ELF...
* rs6000.c (secondary_reload_class): For TARGET_ELF, indicate that
a BASE_REGS register is needed as an intermediate when copying
a symbolic value into any register class other than BASE_REGS.
Jason Merrill [Mon, 17 Aug 1998 16:29:17 +0000 (16:29 +0000)]
init.c (build_offset_ref): Don't mess with error_mark_node.
* init.c (build_offset_ref): Don't mess with error_mark_node.
* lex.c (do_scoped_id): Use cp_error.
* rtti.c (get_tinfo_fn): Don't mess with the context for now.
Kaveh R. Ghazi [Mon, 17 Aug 1998 11:39:32 +0000 (11:39 +0000)]
Makefile.in (cplus-dep.o): Use cplus-dem.c from libiberty.
* Makefile.in (cplus-dep.o): Use cplus-dem.c from libiberty.
* cplus-dem.c: Delete.
* Makefile.in (fold-const.o): depend on $(RTL_H).
* fold-const.c: Include rtl.h to get the prototype for
`set_identifier_local_value'.
* loop.c (express_from_1): Remove unused variable `tmp'.
(combine_givs): cast the first argument of bzero to char *.
* toplev.c (display_help): Remove unused variable `looking_for_start'.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r21785
* c-decl.c (init_decl_processing): Remove unneeded &.
* alpha.h (alpha_initialize_trampoline): Provide prototype.
* except.c (set_exception_lang_code, set_exception_version_code):
Change parameter from `short' to `int' to avoid using a gcc
extension.
* except.h (set_exception_lang_code, set_exception_version_code):
Likewise for prototypes.
* flow.c (count_reg_references): Remove unused variables `regno'
and `i'.
* gcse.c (hash_scan_insn): Declare parameter `in_libcall_block'.
* prefix.c (translate_name): Cast the result of `alloca'.
* varray.h (VARRAY_FREE): Reimplement as a `do-while(0)' statement.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r21781
Andreas Schwab [Mon, 17 Aug 1998 08:35:24 +0000 (08:35 +0000)]
m68k.c: Include "system.h" instead of <stdio.h>.
* config/m68k/m68k.c: Include "system.h" instead of <stdio.h>.
Include "toplev.h".
(valid_dbcc_comparison_p): Mark mode argument as unused.
(symbolic_operand): Likewise.
(legitimize_pic_address): Likewise.
(const_uint32_operand): Likewise.
(const_sint32_operand): Likewise.
* sched.c [!INSN_SCHEDULING]: Define only dummy function
schedule_insns and comment out rest of file.
David S. Miller [Sun, 16 Aug 1998 18:50:32 +0000 (18:50 +0000)]
sparc.c (ultra_code_from_mask, [...]): New functions to describe UltraSPARC pipeline exactly to Haifa.
* config/sparc/sparc.c (ultra_code_from_mask,
ultra_cmove_results_ready_p, ultra_fpmode_conflict_exists,
ultra_find_type, ultra_schedule_insn, ultra_flush_pipeline,
ultrasparc_sched_init, ultrasparc_variable_issue,
ultra_rescan_pipeline_state, ultrasparc_sched_reorder): New
functions to describe UltraSPARC pipeline exactly to Haifa.
(ultrasparc_adjust_cost): Indicate IMUL type insns have zero cost,
as there is nothing the scheduler can do about it. Indicate that
REG_DEP_OUTPUT's collide. Fixup formatting.
* config/sparc/sparc.h (RTX_COSTS): Fixup integer multiply and
divide costs on Ultra for DImode.
(MD_SCHED_INIT, MD_SCHED_REORDER, MD_SCHED_VARIABLE_ISSUE):
Define.
* config/sparc/sparc.md (ieu_unnamed function unit): Rename to
ieuN and add call_no_delay_slot to type list.
(cti function unit): New unit for branches on UltraSPARC.
(subx/addx insns): Set type to misc.
(sidi zero/sign extension insns on arch64): Set type to shift.
(sign_extendhidi2_insn): Set type to sload.
David Edelsohn [Sun, 16 Aug 1998 11:07:25 +0000 (11:07 +0000)]
rs6000.c (rs6000_stack_info): Use if == 0 for sizes.
* rs6000.c (rs6000_stack_info): Use if == 0 for sizes.
(output_epilog): Use if != 0 for offset.
(rs6000_fatal_bad_address): Prepare for Intl.
* rs6000.h (rs6000_fatal_bad_address): Declare.
* rs6000.md (movsfcc, movdfcc): Use else if.
(elf_high): Use {liu|lis}.
(elf_low): Use {cal|la}. Remove %a template from old mnemonics.
(movsi): Use rs6000_fatal_bad_address.
David S. Miller [Sat, 15 Aug 1998 07:36:04 +0000 (07:36 +0000)]
Fix all known bugs remaining in sparc64 constant formation.
* config/sparc/sparc.c (sparc_emit_set_const64_quick1): If
emitting a XOR of -1 at the end, emit a NOT instead for combine's
sake.
(sparc_emit_set_const64): Likewise, also when computing trailing
bits do not negate low_bits and make fast_int an int.
Jeffrey A Law [Sat, 15 Aug 1998 00:33:57 +0000 (00:33 +0000)]
loop.c (add_label_notes): Do not ignore references to labels before dispatch tables.
* loop.c (add_label_notes): Do not ignore references to labels
before dispatch tables. Mirrors Apr 8 change to mark_jump_label.
* gcse.c (add_label_notes): Similarly.
Jason Merrill [Fri, 14 Aug 1998 16:28:30 +0000 (12:28 -0400)]
i386.h (MODES_TIEABLE_P): Reorganize to shut up warnings.
* i386.h (MODES_TIEABLE_P): Reorganize to shut up warnings.
* alias.c (memrefs_conflict_p): Add braces to shut up warnings.
* cse.c (cse_basic_block): Add parens to shut up warnings.
David S. Miller [Fri, 14 Aug 1998 14:11:34 +0000 (14:11 +0000)]
sparc.c (sparc_emit_set_const64_quick2, [...]): Fix more bugs in 64-bit constant formation.
* config/sparc/sparc.c (sparc_emit_set_const64_quick2,
sparc_emit_set_const64_longway, const64_is_2insns,
create_simple_focus_bits, sparc_emit_set_const64): Fix more bugs
in 64-bit constant formation.
* config/sparc/sparc.md (snesi_zero_extend split): Generate
rtl for addx not subx.
(define_insn movdi_const64_special): Make available even when
HOST_BITS_PER_WIDE_INT is not 64.
(movdi_lo_sum_sp64_cint, movdi_high_sp64_cint): Remove.
(losum_di_medlow, sethm, setlo): Make op2 symbolic_operand.
(cmp_siqi_trunc_set, cmp_diqi_trunc_set): Encapsulate both
instances of operand 1 inside a QI subreg.
(xordi3_sp64_dbl): Remove '%' constraint for op1.
(one_cmpldi2_sp64): Fix output string.
(one_cmplsi2_not_liveg0): Rewrite to remove unneeded extra
alternative case.
(unnamed arch64 ashift DI): Truncate shift count if greater than
63, not 31.
John Carr [Fri, 14 Aug 1998 13:52:58 +0000 (13:52 +0000)]
genrecog.c (add_to_sequence): Fatal error if the modes of the operands of SET are incompatible.
* genrecog.c (add_to_sequence): Fatal error if the modes of the operands
of SET are incompatible.
* alpha.md: Fix max and min patterns so modes of SET operands match.
David S. Miller [Fri, 14 Aug 1998 01:49:23 +0000 (01:49 +0000)]
sparc.c (const64_operand, [...]): Get it right when HOST_BITS_PER_WIDE_INT is not 64.
* config/sparc/sparc.c (const64_operand, const64_high_operand):
Get it right when HOST_BITS_PER_WIDE_INT is not 64.
(input_operand): Fixup test for what we accept for constant
integers.
(sparc_emit_set_const32, sparc_emit_set_symbolic_const64): Give
set VOIDmode.
(safe_constDI): Remove.
(sparc_emit_set_safe_HIGH64, gen_safe_SET64, gen_safe_OR64,
gen_safe_XOR64): New functions.
(sparc_emit_set_const64_quick1, sparc_emit_set_const64_quick2,
sparc_emit_set_const64_longway, sparc_emit_set_const64): Use
them.
* config/sparc/sparc.md (define_insn xordi3_sp64_dbl): Only make
available when HOST_BITS_PER_WIDE_INT is not 64.
(define_insn movdi_sp64_dbl, movdi_const64_special): Likewise and
move before movdi_insn_sp64 pattern.
(define_insn movdi_lo_sum_sp64_dbl, movdi_high_sp64_dbl): Remove.
(define_insn sethi_di_medlow, seth44, setm44, sethh): Use
symbolic_operand as predicate for second operand.
(DImode minus split on arch32, negsi2 expander, one_cmplsi2
expander): Give set VOIDmode.
Jim Wilson [Fri, 14 Aug 1998 00:14:09 +0000 (00:14 +0000)]
reload1.c (eliminate_regs_in_insn): Handle another case when eliminating the frame pointer to the hard frame pointer.
* reload1.c (eliminate_regs_in_insn): Handle another case when
eliminating the frame pointer to the hard frame pointer. Add
missing ep->to_rtx check to one existing case.
Jason Merrill [Thu, 13 Aug 1998 16:12:55 +0000 (12:12 -0400)]
expr.c (safe_from_p): Change code to ERROR_MARK only when not accessing nodes.
* 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.