summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-03 11:52:38 +0000
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-03 11:52:38 +0000
commit1a860023ea53c8cadddfadbcdf35bd440d2e2164 (patch)
treedc3bbe7405a10d42294c4caae5ec270171109bcf /gcc/config
parent3efe00adc6f0716ab5f8ba1d4107fcad03899c48 (diff)
downloadgcc-1a860023ea53c8cadddfadbcdf35bd440d2e2164.tar.gz
* gengenrtl.c (special_rtx): PC, CC0 and RETURN are special.
* genemit.c (gen_exp): Handle RETURN. * emit-rtl.c (verify_rtx_sharing): Likewise. (init_emit_regs): Create pc_rtx, ret_rtx and cc0_rtx specially. * rtl.c (copy_rtx): RETURN is shared. * rtl.h (enum global_rtl_index): Add GR_RETURN. (ret_rtx): New. * jump.c (redirect_exp_1): Don't use gen_rtx_RETURN. * config/s390/s390.c (s390_emit_epilogue): Likewise. * config/rx/rx.c (gen_rx_rtsd_vector): Likewise. * config/cris/cris.c (cris_expand_return): Likewise. * config/m68k/m68k.c (m68k_expand_epilogue): Likewise. * config/rs6000/rs6000.c (rs6000_make_savres_rtx, rs6000_emit_epilogue, rs6000_output_mi_thunk): Likewise. * config/picochip/picochip.c (picochip_expand_epilogue): Likewise. * config/h8300/h8300.c (h8300_push_pop, h8300_expand_epilogue): Likewise. * config/v850/v850.c (expand_epilogue): Likewise. * config/bfin/bfin.c (bfin_expand_call): Likewise. * config/arm/arm.md (epilogue): Likewise. * config/mn10300/mn10300.c (mn10300_expand_epilogue): Likewise. * config/sparc/sparc.c (sparc_struct_value_rtx): Rename ret_rtx variable to ret_reg. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173300 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/arm/arm.md4
-rw-r--r--gcc/config/bfin/bfin.c2
-rw-r--r--gcc/config/cris/cris.c2
-rw-r--r--gcc/config/h8300/h8300.c4
-rw-r--r--gcc/config/m68k/m68k.c2
-rw-r--r--gcc/config/mn10300/mn10300.c2
-rw-r--r--gcc/config/picochip/picochip.c2
-rw-r--r--gcc/config/rs6000/rs6000.c8
-rw-r--r--gcc/config/rx/rx.c2
-rw-r--r--gcc/config/s390/s390.c2
-rw-r--r--gcc/config/sparc/sparc.c8
-rw-r--r--gcc/config/v850/v850.c2
12 files changed, 19 insertions, 21 deletions
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 9e23d9bd175..40ebf35d547 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -10006,9 +10006,7 @@
DONE;
}
emit_jump_insn (gen_rtx_UNSPEC_VOLATILE (VOIDmode,
- gen_rtvec (1,
- gen_rtx_RETURN (VOIDmode)),
- VUNSPEC_EPILOGUE));
+ gen_rtvec (1, ret_rtx), VUNSPEC_EPILOGUE));
DONE;
"
)
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 25316cf679c..9369d1d0d67 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -2334,7 +2334,7 @@ bfin_expand_call (rtx retval, rtx fnaddr, rtx callarg1, rtx cookie, int sibcall)
XVECEXP (pat, 0, n++) = gen_rtx_USE (VOIDmode, picreg);
XVECEXP (pat, 0, n++) = gen_rtx_USE (VOIDmode, cookie);
if (sibcall)
- XVECEXP (pat, 0, n++) = gen_rtx_RETURN (VOIDmode);
+ XVECEXP (pat, 0, n++) = ret_rtx;
else
XVECEXP (pat, 0, n++) = gen_rtx_CLOBBER (VOIDmode, retsreg);
call = emit_call_insn (pat);
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index c1aa94380e4..110e98593f7 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -1790,7 +1790,7 @@ cris_expand_return (bool on_stack)
we do that until they're fixed. Currently, all return insns in a
function must be the same (not really a limiting factor) so we need
to check that it doesn't change half-way through. */
- emit_jump_insn (gen_rtx_RETURN (VOIDmode));
+ emit_jump_insn (ret_rtx);
CRIS_ASSERT (cfun->machine->return_type != CRIS_RETINSN_RET || !on_stack);
CRIS_ASSERT (cfun->machine->return_type != CRIS_RETINSN_JUMP || on_stack);
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index de41d702f46..28c232e3bc1 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -643,7 +643,7 @@ h8300_push_pop (int regno, int nregs, bool pop_p, bool return_p)
/* Add the return instruction. */
if (return_p)
{
- RTVEC_ELT (vec, i) = gen_rtx_RETURN (VOIDmode);
+ RTVEC_ELT (vec, i) = ret_rtx;
i++;
}
@@ -927,7 +927,7 @@ h8300_expand_epilogue (void)
}
if (!returned_p)
- emit_jump_insn (gen_rtx_RETURN (VOIDmode));
+ emit_jump_insn (ret_rtx);
}
/* Return nonzero if the current function is an interrupt
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index b286347e44f..47f47af888c 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -1308,7 +1308,7 @@ m68k_expand_epilogue (bool sibcall_p)
EH_RETURN_STACKADJ_RTX));
if (!sibcall_p)
- emit_jump_insn (gen_rtx_RETURN (VOIDmode));
+ emit_jump_insn (ret_rtx);
}
/* Return true if X is a valid comparison operator for the dbcc
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index 635b1cb4583..1bae9f30eef 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -1255,7 +1255,7 @@ mn10300_expand_epilogue (void)
/* Adjust the stack and restore callee-saved registers, if any. */
if (mn10300_can_use_rets_insn ())
- emit_jump_insn (gen_rtx_RETURN (VOIDmode));
+ emit_jump_insn (ret_rtx);
else
emit_jump_insn (gen_return_ret (GEN_INT (size + REG_SAVE_BYTES)));
}
diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c
index 1ca95b4920d..cab639b2333 100644
--- a/gcc/config/picochip/picochip.c
+++ b/gcc/config/picochip/picochip.c
@@ -2273,7 +2273,7 @@ picochip_expand_epilogue (int is_sibling_call ATTRIBUTE_UNUSED)
rtvec p;
p = rtvec_alloc (2);
- RTVEC_ELT (p, 0) = gen_rtx_RETURN (VOIDmode);
+ RTVEC_ELT (p, 0) = ret_rtx;
RTVEC_ELT (p, 1) = gen_rtx_USE (VOIDmode,
gen_rtx_REG (Pmode, LINK_REGNUM));
emit_jump_insn (gen_rtx_PARALLEL (VOIDmode, p));
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 899699f8aa1..1bf717c6cf7 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -20358,7 +20358,7 @@ rs6000_make_savres_rtx (rs6000_stack_t *info,
p = rtvec_alloc ((lr ? 4 : 3) + n_regs);
if (!savep && lr)
- RTVEC_ELT (p, offset++) = gen_rtx_RETURN (VOIDmode);
+ RTVEC_ELT (p, offset++) = ret_rtx;
RTVEC_ELT (p, offset++)
= gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (Pmode, 65));
@@ -21350,7 +21350,7 @@ rs6000_emit_epilogue (int sibcall)
alloc_rname = ggc_strdup (rname);
j = 0;
- RTVEC_ELT (p, j++) = gen_rtx_RETURN (VOIDmode);
+ RTVEC_ELT (p, j++) = ret_rtx;
RTVEC_ELT (p, j++) = gen_rtx_USE (VOIDmode,
gen_rtx_REG (Pmode,
LR_REGNO));
@@ -21966,7 +21966,7 @@ rs6000_emit_epilogue (int sibcall)
else
p = rtvec_alloc (2);
- RTVEC_ELT (p, 0) = gen_rtx_RETURN (VOIDmode);
+ RTVEC_ELT (p, 0) = ret_rtx;
RTVEC_ELT (p, 1) = ((restoring_FPRs_inline || !lr)
? gen_rtx_USE (VOIDmode, gen_rtx_REG (Pmode, 65))
: gen_rtx_CLOBBER (VOIDmode,
@@ -22405,7 +22405,7 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
gen_rtx_USE (VOIDmode,
gen_rtx_REG (SImode,
LR_REGNO)),
- gen_rtx_RETURN (VOIDmode))));
+ ret_rtx)));
SIBLING_CALL_P (insn) = 1;
emit_barrier ();
diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c
index d9894c2a50d..ccf1a5d11b9 100644
--- a/gcc/config/rx/rx.c
+++ b/gcc/config/rx/rx.c
@@ -1567,7 +1567,7 @@ gen_rx_rtsd_vector (unsigned int adjust, unsigned int low, unsigned int high)
: plus_constant (stack_pointer_rtx,
i * UNITS_PER_WORD)));
- XVECEXP (vector, 0, count - 1) = gen_rtx_RETURN (VOIDmode);
+ XVECEXP (vector, 0, count - 1) = ret_rtx;
return vector;
}
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 2454c4f61d2..e0f98e686e3 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -8485,7 +8485,7 @@ s390_emit_epilogue (bool sibcall)
p = rtvec_alloc (2);
- RTVEC_ELT (p, 0) = gen_rtx_RETURN (VOIDmode);
+ RTVEC_ELT (p, 0) = ret_rtx;
RTVEC_ELT (p, 1) = gen_rtx_USE (VOIDmode, return_reg);
emit_jump_insn (gen_rtx_PARALLEL (VOIDmode, p));
}
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 2abfdf4a6bd..46be9040785 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -6063,7 +6063,7 @@ sparc_struct_value_rtx (tree fndecl, int incoming)
/* We must check and adjust the return address, as it is
optional as to whether the return object is really
provided. */
- rtx ret_rtx = gen_rtx_REG (Pmode, 31);
+ rtx ret_reg = gen_rtx_REG (Pmode, 31);
rtx scratch = gen_reg_rtx (SImode);
rtx endlab = gen_label_rtx ();
@@ -6080,12 +6080,12 @@ sparc_struct_value_rtx (tree fndecl, int incoming)
it's an unimp instruction (the most significant 10 bits
will be zero). */
emit_move_insn (scratch, gen_rtx_MEM (SImode,
- plus_constant (ret_rtx, 8)));
+ plus_constant (ret_reg, 8)));
/* Assume the size is valid and pre-adjust */
- emit_insn (gen_add3_insn (ret_rtx, ret_rtx, GEN_INT (4)));
+ emit_insn (gen_add3_insn (ret_reg, ret_reg, GEN_INT (4)));
emit_cmp_and_jump_insns (scratch, size_rtx, EQ, const0_rtx, SImode,
0, endlab);
- emit_insn (gen_sub3_insn (ret_rtx, ret_rtx, GEN_INT (4)));
+ emit_insn (gen_sub3_insn (ret_reg, ret_reg, GEN_INT (4)));
/* Write the address of the memory pointed to by temp_val into
the memory pointed to by mem */
emit_move_insn (mem, XEXP (temp_val, 0));
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index 86509e0ac4c..45dad92c356 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -1890,7 +1890,7 @@ expand_epilogue (void)
int offset;
restore_all = gen_rtx_PARALLEL (VOIDmode,
rtvec_alloc (num_restore + 2));
- XVECEXP (restore_all, 0, 0) = gen_rtx_RETURN (VOIDmode);
+ XVECEXP (restore_all, 0, 0) = ret_rtx;
XVECEXP (restore_all, 0, 1)
= gen_rtx_SET (VOIDmode, stack_pointer_rtx,
gen_rtx_PLUS (Pmode,