aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/cris
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-05-07 16:58:46 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2015-05-07 16:58:46 +0000
commit1f1555facd601ed1a05ab8c52c5f5dcbc6a1cee9 (patch)
treed586b7005253121ffef57e4f1d75d48de1056334 /gcc/config/cris
parentb30f51698fcf9843bbce744f33a7fc9d1e0b3757 (diff)
gcc/
* rtl.h (always_void_p): New function. * gengenrtl.c (always_void_p): Likewise. (genmacro): Don't add a mode parameter to gen_rtx_foo if rtxes with code foo are always VOIDmode. * genemit.c (gen_exp): Update gen_rtx_foo calls accordingly. * builtins.c, caller-save.c, calls.c, cfgexpand.c, combine.c, compare-elim.c, config/aarch64/aarch64.c, config/aarch64/aarch64.md, config/alpha/alpha.c, config/alpha/alpha.md, config/arc/arc.c, config/arc/arc.md, config/arm/arm-fixed.md, config/arm/arm.c, config/arm/arm.md, config/arm/ldrdstrd.md, config/arm/thumb2.md, config/arm/vfp.md, config/avr/avr.c, config/bfin/bfin.c, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16.c, config/cris/cris.c, config/cris/cris.md, config/darwin.c, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv.c, config/frv/frv.md, config/h8300/h8300.c, config/i386/i386.c, config/i386/i386.md, config/i386/sse.md, config/ia64/ia64.c, config/ia64/vect.md, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32.c, config/lm32/lm32.md, config/m32c/m32c.c, config/m32r/m32r.c, config/m68k/m68k.c, config/m68k/m68k.md, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep.c, config/microblaze/microblaze.c, config/mips/mips.c, config/mips/mips.md, config/mmix/mmix.c, config/mn10300/mn10300.c, config/msp430/msp430.c, config/nds32/nds32-memory-manipulation.c, config/nds32/nds32.c, config/nds32/nds32.md, config/nios2/nios2.c, config/nvptx/nvptx.c, config/pa/pa.c, config/pa/pa.md, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000.c, config/rs6000/rs6000.md, config/rs6000/vector.md, config/rs6000/vsx.md, config/rx/rx.c, config/rx/rx.md, config/s390/s390.c, config/s390/s390.md, config/sh/sh.c, config/sh/sh.md, config/sh/sh_treg_combine.cc, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu.c, config/spu/spu.md, config/stormy16/stormy16.c, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro.c, config/tilepro/tilepro.md, config/v850/v850.c, config/v850/v850.md, config/vax/vax.c, config/visium/visium.c, config/xtensa/xtensa.c, cprop.c, dse.c, expr.c, gcse.c, ifcvt.c, ira.c, jump.c, lower-subreg.c, lra-constraints.c, lra-eliminations.c, lra.c, postreload.c, ree.c, reg-stack.c, reload.c, reload1.c, reorg.c, sel-sched.c, var-tracking.c: Update calls accordingly. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@222883 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/cris')
-rw-r--r--gcc/config/cris/cris.c100
-rw-r--r--gcc/config/cris/cris.md6
2 files changed, 37 insertions, 69 deletions
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index 650402e422e..a9451b57174 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -2922,12 +2922,10 @@ cris_split_movdx (rtx *operands)
/* We normally copy the low-numbered register first. However, if
the first register operand 0 is the same as the second register of
operand 1, we must copy in the opposite order. */
- emit_insn (gen_rtx_SET (VOIDmode,
- operand_subword (dest, reverse, TRUE, mode),
+ emit_insn (gen_rtx_SET (operand_subword (dest, reverse, TRUE, mode),
operand_subword (src, reverse, TRUE, mode)));
- emit_insn (gen_rtx_SET (VOIDmode,
- operand_subword (dest, !reverse, TRUE, mode),
+ emit_insn (gen_rtx_SET (operand_subword (dest, !reverse, TRUE, mode),
operand_subword (src, !reverse, TRUE, mode)));
}
/* Constant-to-reg copy. */
@@ -2935,12 +2933,10 @@ cris_split_movdx (rtx *operands)
{
rtx words[2];
split_double (src, &words[0], &words[1]);
- emit_insn (gen_rtx_SET (VOIDmode,
- operand_subword (dest, 0, TRUE, mode),
+ emit_insn (gen_rtx_SET (operand_subword (dest, 0, TRUE, mode),
words[0]));
- emit_insn (gen_rtx_SET (VOIDmode,
- operand_subword (dest, 1, TRUE, mode),
+ emit_insn (gen_rtx_SET (operand_subword (dest, 1, TRUE, mode),
words[1]));
}
/* Mem-to-reg copy. */
@@ -2969,8 +2965,7 @@ cris_split_movdx (rtx *operands)
manually. */
mem = change_address (src, SImode, addr);
insn
- = gen_rtx_SET (VOIDmode,
- operand_subword (dest, 0, TRUE, mode), mem);
+ = gen_rtx_SET (operand_subword (dest, 0, TRUE, mode), mem);
insn = emit_insn (insn);
if (GET_CODE (XEXP (mem, 0)) == POST_INC)
REG_NOTES (insn)
@@ -2979,8 +2974,7 @@ cris_split_movdx (rtx *operands)
mem = copy_rtx (mem);
insn
- = gen_rtx_SET (VOIDmode,
- operand_subword (dest, 1, TRUE, mode), mem);
+ = gen_rtx_SET (operand_subword (dest, 1, TRUE, mode), mem);
insn = emit_insn (insn);
if (GET_CODE (XEXP (mem, 0)) == POST_INC)
REG_NOTES (insn)
@@ -2997,15 +2991,13 @@ cris_split_movdx (rtx *operands)
fatal_insn ("unexpected side-effects in address", addr);
emit_insn (gen_rtx_SET
- (VOIDmode,
- operand_subword (dest, reverse, TRUE, mode),
+ (operand_subword (dest, reverse, TRUE, mode),
change_address
(src, SImode,
plus_constant (Pmode, addr,
reverse * UNITS_PER_WORD))));
emit_insn (gen_rtx_SET
- (VOIDmode,
- operand_subword (dest, ! reverse, TRUE, mode),
+ (operand_subword (dest, ! reverse, TRUE, mode),
change_address
(src, SImode,
plus_constant (Pmode, addr,
@@ -3033,8 +3025,7 @@ cris_split_movdx (rtx *operands)
ourselves, we must add a post-inc note manually. */
mem = change_address (dest, SImode, addr);
insn
- = gen_rtx_SET (VOIDmode,
- mem, operand_subword (src, 0, TRUE, mode));
+ = gen_rtx_SET (mem, operand_subword (src, 0, TRUE, mode));
insn = emit_insn (insn);
if (GET_CODE (XEXP (mem, 0)) == POST_INC)
REG_NOTES (insn)
@@ -3042,10 +3033,7 @@ cris_split_movdx (rtx *operands)
REG_NOTES (insn));
mem = copy_rtx (mem);
- insn
- = gen_rtx_SET (VOIDmode,
- mem,
- operand_subword (src, 1, TRUE, mode));
+ insn = gen_rtx_SET (mem, operand_subword (src, 1, TRUE, mode));
insn = emit_insn (insn);
if (GET_CODE (XEXP (mem, 0)) == POST_INC)
REG_NOTES (insn)
@@ -3061,13 +3049,11 @@ cris_split_movdx (rtx *operands)
fatal_insn ("unexpected side-effects in address", addr);
emit_insn (gen_rtx_SET
- (VOIDmode,
- change_address (dest, SImode, addr),
+ (change_address (dest, SImode, addr),
operand_subword (src, 0, TRUE, mode)));
emit_insn (gen_rtx_SET
- (VOIDmode,
- change_address (dest, SImode,
+ (change_address (dest, SImode,
plus_constant (Pmode, addr,
UNITS_PER_WORD)),
operand_subword (src, 1, TRUE, mode)));
@@ -3138,8 +3124,7 @@ cris_expand_prologue (void)
stdarg_regs > 0;
regno--, pretend -= 4, stdarg_regs--)
{
- insn = emit_insn (gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
+ insn = emit_insn (gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode,
stack_pointer_rtx,
-4)));
@@ -3167,8 +3152,7 @@ cris_expand_prologue (void)
/* Save SRP if not a leaf function. */
if (return_address_on_stack)
{
- insn = emit_insn (gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
+ insn = emit_insn (gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode, stack_pointer_rtx,
-4 - pretend)));
pretend = 0;
@@ -3184,8 +3168,7 @@ cris_expand_prologue (void)
/* Set up the frame pointer, if needed. */
if (frame_pointer_needed)
{
- insn = emit_insn (gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
+ insn = emit_insn (gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode, stack_pointer_rtx,
-4 - pretend)));
pretend = 0;
@@ -3250,8 +3233,7 @@ cris_expand_prologue (void)
else
{
insn
- = gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
+ = gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode, stack_pointer_rtx,
-(n_saved * 4 + size)));
insn = emit_insn (insn);
@@ -3268,8 +3250,7 @@ cris_expand_prologue (void)
size = 0;
}
- insn = emit_insn (gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
+ insn = emit_insn (gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode,
stack_pointer_rtx,
-4 - size)));
@@ -3310,8 +3291,7 @@ cris_expand_prologue (void)
else
{
insn
- = gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
+ = gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode, stack_pointer_rtx,
-(n_saved * 4 + size)));
insn = emit_insn (insn);
@@ -3326,8 +3306,7 @@ cris_expand_prologue (void)
/* We have to put outgoing argument space after regs. */
if (cfoa_size)
{
- insn = emit_insn (gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
+ insn = emit_insn (gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode,
stack_pointer_rtx,
-cfoa_size)));
@@ -3337,8 +3316,7 @@ cris_expand_prologue (void)
}
else if ((size + cfoa_size) > 0)
{
- insn = emit_insn (gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
+ insn = emit_insn (gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode,
stack_pointer_rtx,
-(cfoa_size + size))));
@@ -3436,8 +3414,7 @@ cris_expand_epilogue (void)
{
/* There is an area for outgoing parameters located before
the saved registers. We have to adjust for that. */
- emit_insn (gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
+ emit_insn (gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode, stack_pointer_rtx,
argspace_offset)));
/* Make sure we only do this once. */
@@ -3462,8 +3439,7 @@ cris_expand_epilogue (void)
if (argspace_offset)
{
- emit_insn (gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
+ emit_insn (gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode, stack_pointer_rtx,
argspace_offset)));
argspace_offset = 0;
@@ -3521,8 +3497,7 @@ cris_expand_epilogue (void)
yet. */
size += argspace_offset;
- emit_insn (gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
+ emit_insn (gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode, stack_pointer_rtx, size)));
}
@@ -3583,8 +3558,7 @@ cris_expand_epilogue (void)
= alloc_EXPR_LIST (REG_INC, stack_pointer_rtx, REG_NOTES (insn));
}
- emit_insn (gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
+ emit_insn (gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode, stack_pointer_rtx,
pretend)));
}
@@ -3634,20 +3608,19 @@ cris_gen_movem_load (rtx src, rtx nregs_rtx, int nprefix)
if (GET_CODE (XEXP (src, 0)) == POST_INC)
{
RTVEC_ELT (vec, nprefix + 1)
- = gen_rtx_SET (VOIDmode, srcreg,
- plus_constant (Pmode, srcreg, nregs * 4));
+ = gen_rtx_SET (srcreg, plus_constant (Pmode, srcreg, nregs * 4));
eltno++;
}
src = replace_equiv_address (src, srcreg);
RTVEC_ELT (vec, nprefix)
- = gen_rtx_SET (VOIDmode, gen_rtx_REG (SImode, regno), src);
+ = gen_rtx_SET (gen_rtx_REG (SImode, regno), src);
regno += regno_inc;
for (i = 1; i < nregs; i++, eltno++)
{
RTVEC_ELT (vec, nprefix + eltno)
- = gen_rtx_SET (VOIDmode, gen_rtx_REG (SImode, regno),
+ = gen_rtx_SET (gen_rtx_REG (SImode, regno),
adjust_address_nv (src, SImode, i * 4));
regno += regno_inc;
}
@@ -3690,7 +3663,7 @@ cris_emit_movem_store (rtx dest, rtx nregs_rtx, int increment,
registers so there's a three cycles penalty for use. */
if (nregs == 1)
{
- rtx mov = gen_rtx_SET (VOIDmode, dest, gen_rtx_REG (SImode, 0));
+ rtx mov = gen_rtx_SET (dest, gen_rtx_REG (SImode, 0));
if (increment == 0)
{
@@ -3705,9 +3678,8 @@ cris_emit_movem_store (rtx dest, rtx nregs_rtx, int increment,
vec = rtvec_alloc (2);
RTVEC_ELT (vec, 0) = mov;
- RTVEC_ELT (vec, 1) = gen_rtx_SET (VOIDmode, destreg,
- plus_constant (Pmode, destreg,
- increment));
+ RTVEC_ELT (vec, 1) = gen_rtx_SET (destreg, plus_constant (Pmode, destreg,
+ increment));
if (frame_related)
{
RTX_FRAME_RELATED_P (mov) = 1;
@@ -3718,8 +3690,7 @@ cris_emit_movem_store (rtx dest, rtx nregs_rtx, int increment,
{
vec = rtvec_alloc (nregs + (increment != 0 ? 1 : 0));
RTVEC_ELT (vec, 0)
- = gen_rtx_SET (VOIDmode,
- replace_equiv_address (dest,
+ = gen_rtx_SET (replace_equiv_address (dest,
plus_constant (Pmode, destreg,
increment)),
gen_rtx_REG (SImode, regno));
@@ -3734,10 +3705,9 @@ cris_emit_movem_store (rtx dest, rtx nregs_rtx, int increment,
if (increment != 0)
{
RTVEC_ELT (vec, 1)
- = gen_rtx_SET (VOIDmode, destreg,
- plus_constant (Pmode, destreg,
- increment != 0
- ? increment : nregs * 4));
+ = gen_rtx_SET (destreg, plus_constant (Pmode, destreg,
+ increment != 0
+ ? increment : nregs * 4));
eltno++;
if (frame_related)
@@ -3752,7 +3722,7 @@ cris_emit_movem_store (rtx dest, rtx nregs_rtx, int increment,
for (i = 1; i < nregs; i++, eltno++)
{
RTVEC_ELT (vec, eltno)
- = gen_rtx_SET (VOIDmode, adjust_address_nv (dest, SImode, i * 4),
+ = gen_rtx_SET (adjust_address_nv (dest, SImode, i * 4),
gen_rtx_REG (SImode, regno));
if (frame_related)
RTX_FRAME_RELATED_P (RTVEC_ELT (vec, eltno)) = 1;
diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md
index bcc91a38de4..04104d9ea81 100644
--- a/gcc/config/cris/cris.md
+++ b/gcc/config/cris/cris.md
@@ -2754,8 +2754,7 @@
reg1 = reg0;
}
- emit_insn (gen_rtx_SET (SImode, reg0,
- gen_rtx_AND (SImode, reg1, operands[2])));
+ emit_insn (gen_rtx_SET (reg0, gen_rtx_AND (SImode, reg1, operands[2])));
/* Make sure we get the right *final* destination. */
if (! REG_P (operands[0]))
@@ -2856,8 +2855,7 @@
reg1 = reg0;
}
- emit_insn (gen_rtx_SET (HImode, reg0,
- gen_rtx_AND (HImode, reg1, operands[2])));
+ emit_insn (gen_rtx_SET (reg0, gen_rtx_AND (HImode, reg1, operands[2])));
/* Make sure we get the right destination. */
if (! REG_P (operands[0]))