Commit eda44c78 by J"orn Rennecke Committed by Joern Rennecke

sh.c (prepare_scc_operands): Abort if no compare insn is available.

	* sh.c (prepare_scc_operands): Abort if no compare insn is available.
	(find_barrier, gen_block_redirect, split_branches): Fix indentation.
	(calc_live_regs): Likewise.

From-SVN: r31507
parent d64264ff
Wed Jan 19 19:54:38 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.c (prepare_scc_operands): Abort if no compare insn is available.
(find_barrier, gen_block_redirect, split_branches): Fix indentation.
(calc_live_regs): Likewise.
Wed Jan 19 19:12:36 2000 J"orn Rennecke <amylaar@cygnus.co.uk> Wed Jan 19 19:12:36 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.md (fpu_single, fp_mode): New attributes. * sh.md (fpu_single, fp_mode): New attributes.
......
...@@ -501,6 +501,7 @@ prepare_scc_operands (code) ...@@ -501,6 +501,7 @@ prepare_scc_operands (code)
/* First need a compare insn. */ /* First need a compare insn. */
switch (code) switch (code)
{ {
default:
case NE: case NE:
/* It isn't possible to handle this case. */ /* It isn't possible to handle this case. */
abort (); abort ();
...@@ -516,8 +517,6 @@ prepare_scc_operands (code) ...@@ -516,8 +517,6 @@ prepare_scc_operands (code)
case LEU: case LEU:
code = GEU; code = GEU;
break; break;
default:
break;
} }
if (code != oldcode) if (code != oldcode)
{ {
...@@ -2212,23 +2211,23 @@ find_barrier (num_mova, mova, from) ...@@ -2212,23 +2211,23 @@ find_barrier (num_mova, mova, from)
} }
if (num_mova) if (num_mova)
{ {
if (leading_mova) if (leading_mova)
{ {
/* Try as we might, the leading mova is out of range. Change /* Try as we might, the leading mova is out of range. Change
it into a load (which will become a pcload) and retry. */ it into a load (which will become a pcload) and retry. */
SET_SRC (PATTERN (mova)) = XVECEXP (SET_SRC (PATTERN (mova)), 0, 0); SET_SRC (PATTERN (mova)) = XVECEXP (SET_SRC (PATTERN (mova)), 0, 0);
INSN_CODE (mova) = -1; INSN_CODE (mova) = -1;
return find_barrier (0, 0, mova); return find_barrier (0, 0, mova);
} }
else else
{ {
/* Insert the constant pool table before the mova instruction, /* Insert the constant pool table before the mova instruction,
to prevent the mova label reference from going out of range. */ to prevent the mova label reference from going out of range. */
from = mova; from = mova;
good_barrier = found_barrier = barrier_before_mova; good_barrier = found_barrier = barrier_before_mova;
} }
} }
if (found_barrier) if (found_barrier)
{ {
...@@ -2530,7 +2529,8 @@ gen_block_redirect (jump, addr, need_block) ...@@ -2530,7 +2529,8 @@ gen_block_redirect (jump, addr, need_block)
break; break;
} }
} }
for (used = dead = 0, scan = JUMP_LABEL (jump); (scan = NEXT_INSN (scan)); ) for (used = dead = 0, scan = JUMP_LABEL (jump);
(scan = NEXT_INSN (scan)); )
{ {
enum rtx_code code; enum rtx_code code;
...@@ -2549,12 +2549,12 @@ gen_block_redirect (jump, addr, need_block) ...@@ -2549,12 +2549,12 @@ gen_block_redirect (jump, addr, need_block)
break; break;
} }
if (code == JUMP_INSN) if (code == JUMP_INSN)
{ {
if (jump_left-- && simplejump_p (scan)) if (jump_left-- && simplejump_p (scan))
scan = JUMP_LABEL (scan); scan = JUMP_LABEL (scan);
else else
break; break;
} }
} }
} }
/* Mask out the stack pointer again, in case it was /* Mask out the stack pointer again, in case it was
...@@ -2624,7 +2624,7 @@ struct far_branch ...@@ -2624,7 +2624,7 @@ struct far_branch
int address; int address;
}; };
static void gen_far_branch PARAMS ((struct far_branch *)); static void gen_far_branch PARAMS ((struct far_branch *));
enum mdep_reorg_phase_e mdep_reorg_phase; enum mdep_reorg_phase_e mdep_reorg_phase;
void void
gen_far_branch (bp) gen_far_branch (bp)
...@@ -3326,12 +3326,12 @@ split_branches (first) ...@@ -3326,12 +3326,12 @@ split_branches (first)
bp->near_label = label; bp->near_label = label;
} }
else if (label && ! NEXT_INSN (label)) else if (label && ! NEXT_INSN (label))
{ {
if (addr + 2 - bp->address <= CONDJUMP_MAX) if (addr + 2 - bp->address <= CONDJUMP_MAX)
bp->insert_place = insn; bp->insert_place = insn;
else else
gen_far_branch (bp); gen_far_branch (bp);
} }
} }
if (! label if (! label
|| (NEXT_INSN (label) && bp->address - addr < CONDJUMP_MIN)) || (NEXT_INSN (label) && bp->address - addr < CONDJUMP_MIN))
...@@ -3737,25 +3737,25 @@ calc_live_regs (count_ptr, live_regs_mask2) ...@@ -3737,25 +3737,25 @@ calc_live_regs (count_ptr, live_regs_mask2)
live_regs_mask |= 1 << reg; live_regs_mask |= 1 << reg;
count++; count++;
if (TARGET_SH4 && TARGET_FMOVD && reg >= FIRST_FP_REG) if (TARGET_SH4 && TARGET_FMOVD && reg >= FIRST_FP_REG)
{ {
if (reg <= LAST_FP_REG) if (reg <= LAST_FP_REG)
{ {
if (! TARGET_FPU_SINGLE && ! regs_ever_live[reg ^ 1]) if (! TARGET_FPU_SINGLE && ! regs_ever_live[reg ^ 1])
{ {
if (reg >= 32) if (reg >= 32)
*live_regs_mask2 |= 1 << ((reg ^ 1) - 32); *live_regs_mask2 |= 1 << ((reg ^ 1) - 32);
else else
live_regs_mask |= 1 << (reg ^ 1); live_regs_mask |= 1 << (reg ^ 1);
count++; count++;
} }
} }
else if (reg <= LAST_XD_REG) else if (reg <= LAST_XD_REG)
{ {
/* Must switch to double mode to access these registers. */ /* Must switch to double mode to access these registers. */
target_flags &= ~FPU_SINGLE_BIT; target_flags &= ~FPU_SINGLE_BIT;
count++; count++;
} }
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment