summaryrefslogtreecommitdiff
path: root/gcc/config/sh/sh.md
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-16 21:41:20 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-16 21:41:20 +0000
commit41fafa66e3a981c1b87149ebd136f1a6531024ee (patch)
tree6bdbd9cf60de950e5058b8fdfbdd21aeb5837078 /gcc/config/sh/sh.md
parent7e7c8e9d3ff0101b0255805298da946111f45e22 (diff)
downloadgcc-41fafa66e3a981c1b87149ebd136f1a6531024ee.tar.gz
prologue / epilogue / warning patches:
2003-07-16 J"orn Rennecke <joern.rennecke@superh.com> Con Bradley <con.bradley@superh.com> * sh-protos.h (sh_get_pr_initial_val): Declare. * sh.c (regno_reg_class): Make its elements type enum reg_class. (output_stack_adjust): Remove emit_fn argument. Add epilogue_p and live_regs_mask arguments. Changed all callers. (save_schedule_s): New structure. (save_schedule): New typedef. (scavenge_reg, sh5_schedule_saves, sh5_schedule_saves): New functions. (calc_live_regs): For TARGET_SHMEDIA, use leaf_function_p. In interrupts handlers, also save registers that are usually partially saved, and make sure there is at least one general purpose register saved if a target register needs saving. Add casts in comparisons to avoid warnings. (sh_media_register_for_return): return -1 for interrupt handlers. (MAX_SAVED_REGS, MAX_TEMPS): New defines. (sh_expand_prologue): Use sh5_schedule_saves. Check that any temp registers used are available. Set RTX_FRAME_RELATED_P where appropriate. Add an REG_FRAME_RELATED_EXPR for r0 + offset addressing. (sh_expand_epilogue, sh_set_return_address): Use sh5_schedule_saves. (initial_elimination_offset): Likewise. * sh.h (DWARF_CIE_DATA_ALIGNMENT): Set to -4. (LOCAL_ALIGNMENT, GENERAL_REGISTER_P): Add casts to avoid warnings. (FP_REGISTER_P): Add casts to fix broken handling of unsigned REGNO. (XD_REGISTER_P, TARGET_REGISTER_P): Likewise. (HARD_REGNO_CALL_PART_CLOBBERED): Also yield nonzero for r15, and for target registers. (RETURN_IN_MEMORY): Add parentheses to avoid warnings. (regno_reg_class): Make its elements type enum reg_class. (CONSTRAINT_LEN): Don't use isdigit. (FUNCTION_ARG_REGNO_P): Add casts to avoid warnings. (FUNCTION_ARG): Add parentheses to avoid warnings. (RETURN_ADDR_RTX): Use sh_get_pr_initial_val. (RETURN_ADDR_OFFSET): Define to -1 for TARGET_SH5. (SH_DBX_REGISTER_NUMBER): Add casts to avoid warnings. (EH_RETURN_DATA_REGNO): Use unsigned constants to avoid warnings. * sh.md (xordi3+1): Remove unused variable regno. (return_media): Check that tr0 is available before using it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69480 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sh/sh.md')
-rw-r--r--gcc/config/sh/sh.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 2af568b772c..8e012d75f7b 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -2052,7 +2052,7 @@
"
{
enum machine_mode inmode = GET_MODE (operands[1]);
- int regno, offset = 0;
+ int offset = 0;
if (GET_CODE (operands[0]) == SUBREG)
{
@@ -7247,6 +7247,8 @@ mov.l\\t1f,r0\\n\\
{
rtx r18 = gen_rtx_REG (DImode, PR_MEDIA_REG);
+ if (! call_used_regs[TR0_REG] || fixed_regs[TR0_REG])
+ abort ();
tr_regno = TR0_REG;
tr = gen_rtx_REG (DImode, tr_regno);
emit_move_insn (tr, r18);