summaryrefslogtreecommitdiff
path: root/gcc/config/m68hc11/m68hc11.c
diff options
context:
space:
mode:
authoraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-05 19:38:27 +0000
committeraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-05 19:38:27 +0000
commitdd6b3fc939da6bb4ba17fa86d2a45bf0585dc493 (patch)
treef7f5aab59147443bd38a91a80e1495756a1c078d /gcc/config/m68hc11/m68hc11.c
parent06517bd4d841ffa7c8ebb91aeb4dfe1ddc9eba60 (diff)
downloadgcc-dd6b3fc939da6bb4ba17fa86d2a45bf0585dc493.tar.gz
* config/m68hc11/m68hc11.h (CLASS_LIKELY_SPILLED_P): Remove.
* config/m68hc11/m68hc11.c (TARGET_CLASS_LIKELY_SPILLED_P): Define. (m68hc11_class_likely_spilled_p): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165000 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m68hc11/m68hc11.c')
-rw-r--r--gcc/config/m68hc11/m68hc11.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index ea60db6a35c..bf9c26cbbef 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -76,6 +76,7 @@ static int m68hc11_rtx_costs_1 (rtx, enum rtx_code, enum rtx_code);
static bool m68hc11_rtx_costs (rtx, int, int, int *, bool);
static tree m68hc11_handle_fntype_attribute (tree *, tree, tree, int, bool *);
static tree m68hc11_handle_page0_attribute (tree *, tree, tree, int, bool *);
+static bool m68hc11_class_likely_spilled_p (reg_class_t);
void create_regs_rtx (void);
@@ -291,6 +292,9 @@ static const struct attribute_spec m68hc11_attribute_table[] =
#undef TARGET_CAN_ELIMINATE
#define TARGET_CAN_ELIMINATE m68hc11_can_eliminate
+#undef TARGET_CLASS_LIKELY_SPILLED_P
+#define TARGET_CLASS_LIKELY_SPILLED_P m68hc11_class_likely_spilled_p
+
#undef TARGET_TRAMPOLINE_INIT
#define TARGET_TRAMPOLINE_INIT m68hc11_trampoline_init
@@ -581,6 +585,32 @@ preferred_reload_class (rtx operand, enum reg_class rclass)
return rclass;
}
+/* Implement TARGET_CLASS_LIKELY_SPILLED_P. */
+
+static bool
+m68hc11_class_likely_spilled_p (reg_class_t rclass)
+{
+ switch (rclass)
+ {
+ case D_REGS:
+ case X_REGS:
+ case Y_REGS:
+ case A_REGS:
+ case SP_REGS:
+ case D_OR_X_REGS:
+ case D_OR_Y_REGS:
+ case X_OR_SP_REGS:
+ case Y_OR_SP_REGS:
+ case D_OR_SP_REGS:
+ return true;
+
+ default:
+ break;
+ }
+
+ return false;
+}
+
/* Return 1 if the operand is a valid indexed addressing mode.
For 68hc11: n,r with n in [0..255] and r in A_REGS class
For 68hc12: n,r no constraint on the constant, r in A_REGS class. */