aboutsummaryrefslogtreecommitdiff
path: root/gcc/hard-reg-set.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/hard-reg-set.h')
-rw-r--r--gcc/hard-reg-set.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/hard-reg-set.h b/gcc/hard-reg-set.h
index 33ac640..8fd787a 100644
--- a/gcc/hard-reg-set.h
+++ b/gcc/hard-reg-set.h
@@ -511,4 +511,13 @@ extern const char * reg_class_names[];
#define REG_CAN_CHANGE_MODE_P(REGN, FROM, TO) \
(targetm.can_change_mode_class (FROM, TO, REGNO_REG_CLASS (REGN)))
+/* Return true if register REGNO is either fixed or call-used
+ (aka call-clobbered). */
+
+inline bool
+call_used_or_fixed_reg_p (unsigned int regno)
+{
+ return fixed_regs[regno] || call_used_regs[regno];
+}
+
#endif /* ! GCC_HARD_REG_SET_H */