aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-05-11 16:50:16 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-05-11 16:50:16 -0400
commitf5fa4507849214668430b923a811b6537c4e0272 (patch)
tree432730477ace1e106532e5fb330cdcabf6425f5c /gcc
parent13275056a75e6e614ee42c8a93f39fe8184f47e5 (diff)
downloadgcc-f5fa4507849214668430b923a811b6537c4e0272.zip
gcc-f5fa4507849214668430b923a811b6537c4e0272.tar.gz
gcc-f5fa4507849214668430b923a811b6537c4e0272.tar.bz2
(a29k_clobbers_to): New function.
From-SVN: r7276
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/a29k/a29k.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/config/a29k/a29k.c b/gcc/config/a29k/a29k.c
index 447751b..08363ed 100644
--- a/gcc/config/a29k/a29k.c
+++ b/gcc/config/a29k/a29k.c
@@ -802,6 +802,33 @@ incoming_reg (start, count)
return R_AR (start);
}
+/* Add CLOBBERs to CALL_INSN_FUNCTION_USAGE chain of INSN indicating
+ that LR2 up to, but not including, OP are clobbered. If OP is
+ zero, indicate all parameter registers are clobbered. */
+
+void
+a29k_clobbers_to (insn, op)
+ rtx insn;
+ rtx op;
+{
+ int i;
+ int high_regno;
+
+ if (op == 0)
+ high_regno = R_LR (18);
+ else if (GET_CODE (op) != REG || REGNO (op) < R_LR (0)
+ || REGNO (op) > R_LR (18))
+ abort ();
+ else
+ high_regno = REGNO (op);
+
+ for (i = R_LR (2); i < high_regno; i++)
+ CALL_INSN_FUNCTION_USAGE (insn)
+ = gen_rtx (EXPR_LIST, VOIDmode,
+ gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, i)),
+ CALL_INSN_FUNCTION_USAGE (insn));
+}
+
/* These routines are used in finding insns to fill delay slots in the
epilogue. */