Commit Graph

59 Commits

Author SHA1 Message Date
Ian Lance Taylor 1075dedade Skip inappropriate LOG_LINK entries when looking for reg-setting call
insn

From-SVN: r12442
1996-07-13 04:55:16 +00:00
Jim Wilson 20fef67b3a (calc_live_regs): For pragma_interrupt case...
(calc_live_regs): For pragma_interrupt case, exclude call
clobbered regs that are fixed, explicitly add MACH_REG and MACL_REG.

From-SVN: r12415
1996-07-08 15:33:09 -07:00
Ian Lance Taylor 9c0e838fa0 Don't call ADJUST_INSN_LENGTH on an insn inside a sequence
From-SVN: r12336
1996-06-27 15:05:07 +00:00
Ian Lance Taylor e4fa6b06f0 Align code at the start of loops and after branches.
Align code at the start of loops and after branches.  Don't accept
negative zero in fp_zero_operand.

From-SVN: r12155
1996-06-04 18:13:21 +00:00
Jim Wilson adade86813 (output_file_start): Delete misplaced semicolon.
From-SVN: r12061
1996-05-20 11:00:02 -07:00
Jim Wilson e22856e8fb (prepare_move_operands): If source is r0, and dest is reg+reg
MEM, then copy source to a pseudo-reg.

From-SVN: r12036
1996-05-18 17:34:10 -07:00
Doug Evans d787aec5bd sh.c (output_option, [...]): Delete.
* sh/sh.c (output_option, m_options, output_options): Delete.
	(output_file_start): Delete option output support.

From-SVN: r12002
1996-05-17 16:31:43 +00:00
Jim Wilson cff3d762dc (gen_shifty_op): Truncate VALUE to avoid out of bounds array access.
From-SVN: r11947
1996-05-06 16:39:46 -07:00
Jim Wilson 119d0c36a6 (process_pragma): Take the IDENTIFIER_POINTER tree
node instead of a character.

From-SVN: r11840
1996-04-17 12:11:28 -07:00
Jim Wilson 8b760293d7 (reg_unused_after): Return 0 if see a JUMP_INSN.
From-SVN: r11501
1996-03-08 11:10:35 -08:00
Jim Wilson 3adbde603a (find_barrier): Set si_limit to 1018 instead of 1020, and
hi_limit to 510 instead of 512.

From-SVN: r11464
1996-03-05 15:28:32 -08:00
Jim Wilson c1e8e6bd23 (machine_dependent_reorg): In TARGET_RELAX code...
(machine_dependent_reorg): In TARGET_RELAX code, when scan
forward from LINK, fail if pass a CODE_LABEL before finding INSN.
Fail if SCAN not INSN is a JUMP_INSN.

From-SVN: r11419
1996-03-04 14:37:57 -08:00
Jim Wilson 1a95a96373 (ctype.h): Delete.
(regno_reg_class, reg_class_from_letter, prepare_scc_operands,
broken_move, push, pop, push_regs, calc_live_regs, sh_expand_prologue,
sh_expand_epilogue, initial_elimination_offset, arith_reg_operand):
Add SH3e support.
(sh_builtin_saveregs, fp_zero_operand, fp_one_operand): New functions.
(sh_function_arg, sh_function_arg_partial_nregs): Delete.

From-SVN: r11068
1996-01-18 14:41:00 -08:00
Doug Evans 05a81fe58a c-lex.c (check_newline): Pass character after `#pragma' to HANDLE_PRAGMA.
* c-lex.c (check_newline): Pass character after `#pragma' to
	HANDLE_PRAGMA.  Don't call get_directive_line if at end of line.
	* c-common.c (get_directive_line): Watch for EOF.
	* h8300/h8300.h (HANDLE_PRAGMA): New argument `c'.
	Must issue `return' now.
	* i960/i960.h (HANDLE_PRAGMA): Likewise.
	* sh/sh.h (HANDLE_PRAGMA): Likewise.
	* nextstep.h (HANDLE_PRAGMA): Likewise.
	* h8300/h8300.c (handle_pragma): New argument `ch'.
	Simplify pragma processing.  Delete support for `#pragma section'.
	* i960/i960.c (process_pragma): New argument `c'.  Change result to
	terminating character.
	* nextstep.c (handle_pragma): Likewise.
	* sh/sh.c (handle_pragma): Likewise.  Also simplified.

From-SVN: r10999
1996-01-15 22:25:24 +00:00
Jim Wilson c17f53a8cb (gen_shifty_op): Output a NOP for a shift by 0.
(find_barrier): New variables si_limit, hi_limit.  Set them depending
on whether we are optimizing.  Set found_hi if the destination is
HImode.
(machine_dependent_reorg): If not optimizing, then change scan to a
note instead of calling delete_insn.

From-SVN: r10937
1996-01-02 13:27:38 -08:00
Jim Wilson 49b6d06b41 (shiftcosts): For SH3, max cost of arithmetic right shift is 3.
(shiftcosts): For SH3, max cost of arithmetic right
shift is 3.
(expand_ashiftrt): For SH3, if shift cost is more than 3, then
call gen_ashrsi3_d to use shad instruction.

From-SVN: r10674
1995-12-04 18:28:45 -08:00
Jim Wilson 24a25d4575 (from_compare): Get mode from operands instead of using SImode.
From-SVN: r10659
1995-11-30 17:02:34 -08:00
Jim Wilson 933c3ba3e7 (noncall_uses_reg): New function.
(machine_dependent_reorg): Add support for TARGET_RELAX.
(final_prescan_insn): Likewise.

From-SVN: r10651
1995-11-30 12:47:56 -08:00
Jim Wilson 956a5206b0 (insn-attr.h): Include.
(pragma_nosave_low_regs): New global variable.
(calc_live_regs): If SH3 and pragma_nosave_low_regs, then don't
save registers r0 through r7 for interrupt functions.
(function_epilogue): Clear pragma_nosave_low_regs.
(handle_pragma): Set pragma_nosave_low_regs if see pragma for it.

From-SVN: r10649
1995-11-30 12:31:06 -08:00
Richard Kenner 9374bd85eb (prepare_scc_operands): New local variable mode.
(prepare_scc_operands): New local variable mode.  Set it from
sh_compare_op0 or sh_compare_op1.  Use it instead of SImode in
force_reg calls.

From-SVN: r10500
1995-10-21 18:31:06 -04:00
Richard Kenner c8f6f18d84 (reg_unused_after): Ifdef out code for handling labels.
From-SVN: r10499
1995-10-21 18:29:14 -04:00
Richard Kenner e081ed261f (find_barrier): When create new label, set LABEL_NUSES to 1.
From-SVN: r10497
1995-10-21 18:25:06 -04:00
Richard Kenner 5dbcc9c0dc (find_barrier): Always use get_attr_length to compute length of instructions.
(find_barrier): Always use get_attr_length to compute length of
instructions.  If count_hi or count_si out of range at end, need two
PREV_INSN calls not one.

From-SVN: r10496
1995-10-21 18:22:27 -04:00
Richard Kenner 00e94d6531 (find_barrier): When hi_const returns true, increment count_si by two
if found_si is true.

From-SVN: r10495
1995-10-21 18:20:06 -04:00
Richard Kenner 8783b15e06 (reg_unused_after): For a SEQUENCE, make sure all insns are safe
before returning 1.

From-SVN: r10261
1995-08-21 13:04:26 -04:00
Richard Kenner 46d81ffa4a (output_stack_adjust): Add new argument reg.
(output_stack_adjust): Add new argument reg.  Use it instead of
stack_pointer_rtx.
(sh_expand_prologue, sh_expand_epilogue): Pass new argument to
output_stack_adjust.

From-SVN: r10259
1995-08-21 12:11:05 -04:00
Richard Kenner a55e9d2b21 (reg_unused_after): New function.
From-SVN: r10183
1995-07-28 09:06:19 -04:00
Richard Kenner c15c907559 Change FSF address.
From-SVN: r9984
1995-06-15 16:46:00 -04:00
Jim Wilson 79b2746ad7 (print_operand): Check for annulled branches.
(output_movedouble): Handle SUBREG addresses.
(output_branch): Handle annulled branches.
(sh_expand_prologue): Correct number of saved registers for
varargs functions.

From-SVN: r9886
1995-06-06 10:45:16 -07:00
Jim Wilson 20b04867c8 (shiftcosts, genshifty_op): Add SH3 support.
From-SVN: r9813
1995-05-24 18:38:04 -07:00
Jim Wilson 1d3534c0e7 (shift_amounts): Correct entry for shifts by 29.
From-SVN: r9784
1995-05-23 14:38:27 -07:00
Jim Wilson 97f8690b74 (general_movsrc_operand, general_movdst_operand): Delete
references to POST_DEC and PRE_INC.

From-SVN: r9571
1995-05-04 11:12:10 -07:00
Jim Wilson 8aa2a30584 Completely rewritten.
From-SVN: r9423
1995-04-20 18:19:27 -07:00
Jim Wilson df87c8b70b (shiftby_operand): Delete.
From-SVN: r9363
1995-04-11 14:02:20 -07:00
Jim Wilson 9a4bdb8649 (gen_shifty_op, case ASHIFTRT): Return 0 if shift count is not a constant.
From-SVN: r9301
1995-04-03 15:00:32 -07:00
Jim Wilson a6f71af520 (andcosts): Modify costs to match the hardware, and add
explanatory comments.

From-SVN: r9245
1995-03-29 13:58:12 -08:00
Jim Wilson 16bea517d3 Correct typos and formatting problems.
(add_constant, current_function_pretend_args_size,
flag_traditional, table_lab): Delete unnecessary declarations.
(sh_cpu): Change type from attr_cpu to processor_type.
(need_slot, output_shift, lshiftrt_insns, howshift,
pop_operand): Delete.
(print_operand, output_branch): Delete calls to need_slot.
(synth_constant): Comment that it doesn't work.
(output_movedouble): Handle PRE_DEC dest not POST_INC dest.
(output_options): Don't use flag_traditional.
(shift_insns): Correct numbers to optimal sequences.
(shift_amounts): New table.
(shift_insns_rtx): New function.
(shiftinsns): Combine LSHIFTRT and ASHIFT cases.
(shiftcosts): Return true costs of shifts instead of estimate of 1.
(gen_ashift): Handle negative shift amounts.  Call gen_lshrsi3_m
for single bit LSHIFTRT, and gen_lshrisi3_k for multiple bit shifts.
(gen_shifty_op): Handle negative shift amounts at top.  Generate
optimal sequences for ASHIFT and LSHIFTRT.
(find_barrier): Correct pattern for matching mova instructions.
(general_movsrc_operand): Delete redundant test for (MEM LABEL_REF).
Don't reject POST_INC address for size > 4.
(general_movdst_operand): Don't reject PRE_DEC address for size > 4.

From-SVN: r9062
1995-02-24 14:19:23 -08:00
Jim Wilson e553bfb99a (prepare_scc_operands, from_compare): Force constant 0 into
register for unsigned comparisons.

From-SVN: r8891
1995-02-07 12:57:00 -08:00
Jim Wilson 5325c0fa57 Correct errors in comments.
(calc_live_regs, expand_acall): Delete TARGET_SMALLCALL support.
(need_slot): Add comment.  Delete test of INSN_ANNULLED_BRANCH_P.
(print_operand_address): Delete '*', '^', '!' support.
(synth_constant): Call zero_extend* instead of and*.  Call ashlsi3_k
instead of ashlsi3_n.
(prepare_scc_operands): Abort for NE case.
(output_move_double, output_far_jump, output_branch): Delete commented
out code.  Don't output assembler comments.
(gen_ashift): Don't call addsi3.
(fixit): Delete redundant test for QImode constants.
(hi_const): Delete TARGET_SHORTADDR support.
(find_barrier): Don't put constant pool between mova and its label.
(add_function, seen_function, bsr_operand, mac_operand,
fake_shift): Delete.
(sh_expand_prologue, expand_acall): Delete TARGET_BSR support.
(general_movsrc_operand): Don't reject non-I CONST_INT.

From-SVN: r8889
1995-02-07 12:18:43 -08:00
Jim Wilson 3385bb9103 (sh_function_arg): Don't reject unaligned structures.
(sh_function_arg_partial_nregs): Likewise.

From-SVN: r8881
1995-02-06 15:26:58 -08:00
Jim Wilson 22e1ebf1d7 (prepare_scc_operands): Force sh_compare_op1 to a register if it is an invalid constant.
(prepare_scc_operands): Force sh_compare_op1 to a register if
it is an invalid constant.
(output_branch): Add cases for 4, 8, and 18.  Correct branch offsets
in comments.
(find_barrier): Correct test for move instructions that need to be
fixed by verifying that the set source is a bad constant.
(arith_reg_or_0_operand): New function.

From-SVN: r8824
1995-01-25 16:40:27 -08:00
Jim Wilson 23ed92ca4c (machine_dependent_reorg): When remove SUBREG, add in
SUBREG_WORD to new register number.

From-SVN: r8778
1995-01-20 17:23:12 -08:00
Jim Wilson a7771f7854 (multcosts): Do not compute cost of constant power-of-two multiplies as if they were shifts.
(multcosts): Do not compute cost of constant power-of-two
multiplies as if they were shifts.  Reduce multiply cost from 5 to 3.
Delete variable insn_cost.

From-SVN: r8777
1995-01-20 17:11:01 -08:00
Jim Wilson 40d2032bdf (sh_expand_prologue): Clear extra_push at start.
(sh_expand_prologue): Clear extra_push at start.  Clear
current_function_anonymous_args if set.  Clear shiftsyms array.
(sh_expand_epilogue): Don't clear extra_push,
current_function_pretend_args_size, current_function_anonymous_args,
and shiftsyms array.

From-SVN: r8697
1994-12-28 18:31:51 -08:00
Steve Chamberlain 00f8ff66e9 *** empty log message ***
From-SVN: r8563
1994-11-24 04:38:49 +00:00
Jim Wilson 07c109c894 (arith_reg_operand): Disallow MACH_REG and MACL_REG.
From-SVN: r8556
1994-11-23 11:25:55 -08:00
Steve Chamberlain c3898ccd98 *** empty log message ***
From-SVN: r8064
1994-09-09 23:43:17 +00:00
Steve Chamberlain 07bd02ca78 *** empty log message ***
From-SVN: r8046
1994-09-08 22:48:52 +00:00
Steve Chamberlain 4fdd1f85ce *** empty log message ***
From-SVN: r8026
1994-09-06 18:37:01 +00:00
Steve Chamberlain 2d1aa7d8f5 *** empty log message ***
From-SVN: r7959
1994-08-23 02:16:00 +00:00