summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/jump.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/jump.c')
-rw-r--r--contrib/gcc/jump.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/gcc/jump.c b/contrib/gcc/jump.c
index cad10ff..1a26b59 100644
--- a/contrib/gcc/jump.c
+++ b/contrib/gcc/jump.c
@@ -2428,3 +2428,15 @@ true_regnum (x)
}
return -1;
}
+
+/* Return regno of the register REG and handle subregs too. */
+unsigned int
+reg_or_subregno (reg)
+ rtx reg;
+{
+ if (REG_P (reg))
+ return REGNO (reg);
+ if (GET_CODE (reg) == SUBREG)
+ return REGNO (SUBREG_REG (reg));
+ abort ();
+}
OpenPOWER on IntegriCloud