summaryrefslogtreecommitdiff
path: root/gcc/config/bfin
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-27 11:57:01 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-27 11:57:01 +0000
commit8560c588b8e703a936e09b8b1c5381289b6fe2a8 (patch)
tree6551aaedcd3c7893355d5933f81fbb2dce9863de /gcc/config/bfin
parentc3986c7ab5d242067928f202cc5f7c661242ce2a (diff)
downloadgcc-8560c588b8e703a936e09b8b1c5381289b6fe2a8.tar.gz
2010-09-27 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 164647 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@164648 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/bfin')
-rw-r--r--gcc/config/bfin/bfin.c26
-rw-r--r--gcc/config/bfin/bfin.h9
2 files changed, 26 insertions, 9 deletions
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 8ff9e2fd0a7..da5a8eef237 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -2543,6 +2543,29 @@ bfin_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
return NO_REGS;
}
+
+/* Implement TARGET_CLASS_LIKELY_SPILLED_P. */
+
+static bool
+bfin_class_likely_spilled_p (reg_class_t rclass)
+{
+ switch (rclass)
+ {
+ case PREGS_CLOBBERED:
+ case PROLOGUE_REGS:
+ case P0REGS:
+ case D0REGS:
+ case D1REGS:
+ case D2REGS:
+ case CCREGS:
+ return true;
+
+ default:
+ break;
+ }
+
+ return false;
+}
/* Implement TARGET_HANDLE_OPTION. */
@@ -6635,6 +6658,9 @@ bfin_expand_builtin (tree exp, rtx target ATTRIBUTE_UNUSED,
#undef TARGET_SECONDARY_RELOAD
#define TARGET_SECONDARY_RELOAD bfin_secondary_reload
+#undef TARGET_CLASS_LIKELY_SPILLED_P
+#define TARGET_CLASS_LIKELY_SPILLED_P bfin_class_likely_spilled_p
+
#undef TARGET_DELEGITIMIZE_ADDRESS
#define TARGET_DELEGITIMIZE_ADDRESS bfin_delegitimize_address
diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
index 037e5be20f7..30b298d76e1 100644
--- a/gcc/config/bfin/bfin.h
+++ b/gcc/config/bfin/bfin.h
@@ -750,15 +750,6 @@ enum reg_class
registers. */
#define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true
-#define CLASS_LIKELY_SPILLED_P(CLASS) \
- ((CLASS) == PREGS_CLOBBERED \
- || (CLASS) == PROLOGUE_REGS \
- || (CLASS) == P0REGS \
- || (CLASS) == D0REGS \
- || (CLASS) == D1REGS \
- || (CLASS) == D2REGS \
- || (CLASS) == CCREGS)
-
/* Do not allow to store a value in REG_CC for any mode */
/* Do not allow to store value in pregs if mode is not SI*/
#define HARD_REGNO_MODE_OK(REGNO, MODE) hard_regno_mode_ok((REGNO), (MODE))