* mn10300.h (RETURN_ADDR_RTX): Define.
* mn10300.c (count_tst_insns): New function.
(expand_prologue): Load zero into data and/or address registers
if any are free and the function has optimizable tst insns.
(output_tst): If a suitable register is known to have the
value zero, use it instead of searching for a suitable register.
* mn10300.h (zero_dreg, zero_areg): Declare.
(FRAME_POINTER_NEEDED): Frame pointers are not needed if the
outgoing argument size is zero.
* mn10300.md (movXX): Optimize loading zero i register if possible. Optimize loading a DF/DI mode value
into an address register from a constant memory address.
(addsi3): Provide alternative which doesn't require a matching
inout operand.
(return): Optimize consecutive return instructions.
From-SVN: r13845
(incscc): Use a match_operand with cc_register to match
the condition code register.
(decscc, *condbranch, *condbranch_reversed, *mov_scc): Likewise.
(*mov_negscc, *mov_notscc, *cond_return): Likewise.
(*cond_return_inverted, *ior_scc, *cond_move): Likewise.
(insv): New expand.
(andsi_notsi_si): Renamed from *andsi_notsi_si.
(andsi_not_shiftsi_si): New insn.
(*minmax_arithsi): Don't match this insn if operand1 is an
eliminable register.
({sin,cos}*): Delete, since the ARM always emulates these its
faster to call a library function.
(movsicc, *movsicc_insn): Make operand0 an s_register_operand,
and operand3 an arm_not_operand. Use cc_register to match the
condition code register.
(mov[sd]fcc*): Make operand[0,2] s_register_operands, and operand3
the nonmemory_operand. Use cc_register to match the condition
code register.
(*ifcompare_plus_move): Move before *ifcompare_arith_move. Just do
a split for the output.
(*ifcompare_move_plus): Similarly, but relative
to *ifcompare_move_arith.
(*if_plus_move, *if_move_plus): New patterns.
(*ifcompare_arith_arith): Simplify the alternatives down to just one,
and split the insn before output.
(*if_arith_arith, *if_arith_move, *if_move_arith): New patterns.
(*ifcompare_move_not, *ifcompare_not_move): Simplify and split the
insn before output.
(*if_move_not, *if_not_move): New patterns.
(*ifcompare_shift_move, *ifcompare_move_shift): Simplify and split the
insn before output.
(*if_shift_move, *if_move_shift): New patterns.
(*ifcompare_shift_shift): Simplify and split the insn before output.
(*if_shift_shift): New pattern.
(*ifcompare_not_arith, *ifcompare_arith_not): Simplify and split the
insn before output.
(*if_not_arith, *if_arith_not): New patterns.
(*ifcompare_neg_move, *ifcompare_move_neg): Simplify and split the
insn before output.
(*if_neg_move, *if_move_neg): New patterns..
From-SVN: r13840
* mn10300.c (can_use_return_insn): Add size of fixed stack space
for function calls into the size of the frame. */
(expand_prologue, expand_epilogue): Likewise.
(initial_offset): Corresponding changes..
* mn10300.h (OUTGOING_REG_PARM_STACK_SPACE): No longer define.
(STACK_POINTER_OFFSET): Define.
* mn10300.md (call, call_value expanders): Don't adjust the stack
pointer here anymore.
* mn10300.md (ashlsi3): Remove some alternatives which are no longer
needed or desired.
From-SVN: r13837
* libgcc2.c (find_exception_table): Fix to logic to deal with
functions that are in their own section, such as template
instantiations, that cause overlapping EH tables.
From-SVN: r13830
* ginclude/stdarg.h: Include va-mn10300.h.
* ginclude/varargs.h: Likewise.
* ginclude/va-mn10300.h: New file.
* mn10300/mn10300.c (expand_prologue): If current_function_varargs is
nonzero, then flush d0/d1 back into the stack.
(mn10300_builtin_saveregs): New function.
(function_arg, function_arg_partial_nregs): New functions.
(initial_offset): Tweak now that the RP save area is allocated
and deallocated around each call again.
* mn10300/mn10300.h (FIRST_PARM_OFFSET): Now 4.
(FRAME_POINTER_REQUIRED): Require a frame pointer for all non-leaf
functions.
(REG_PARM_STACK_SPACE): Now 8 bytes.
(FUNCTION_ARG_REGNO_P): Update for new parameter passing conventions.
(CUMULATIVE_ARGS, INIT_CUMULATIVE_ARGS): Likewise.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Likewise.
(FUNCTION_ARG_PARTIAL_NREGS): Likewise.
(TRAMPOLINE_TEMPLATE): Don't clobber d0 anymore.
(TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE): Corresponding changes.
(EXPAND_BUILTIN_SAVEREGS): Define.
* mn10300/mn10300.md (call, call_value patterns): Allocate and
deallocate a stack slot for the return pointer around each call.
* mn10300/mn10300.h (RTX_COSTS): Refine.
(CASE_VALUES_THRESHHOLD, NO_FUNCTION_CSE): Likewise.
* mn10300/mn10300.c (output_tst): New function.
* mn10300/mn10300.md (movdi, movdf): Improve code to load constants
into registers.
(tst insns): Use output_tst to optimize some cases. Add versions to
encourage more zero extensions instead of sign extensions of HImode
and QImode values.
(divsi3, udivsi3): Remove patterns. Replaced by...
(divmodsi4, udivmodsi4): New expanders/patterns.
(andsi3): Optimize "and" operations with certain constants.
From-SVN: r13827
* jump.c (jump_optimize, follow_jumps, mark_jump_label): Disable some
optimizations when flag_test_coverage and there is a line number note
in the way.
(invert_jump): Add REG_BR_PROB when flag_branch_probabililties.
From-SVN: r13817
* final.c (LONG_TYPE_SIZE): Define.
(count_instrumented_arcs): New variable.
(end_final, profile_after_prologue, leaf_function_p): Add support
for profile_arc_flag.
(add_bb): Only call CC_STATUS_INIT if HAVE_cc0.
From-SVN: r13813