+2011-05-04 Stuart Henderson <shenders@gcc.gnu.org>
+
+ From Bernd Schmidt
+ * config/bfin/bfin.h (FUNCTION_PROFILER): Take TARGET_LONG_CALLS into
+ account and save/restore RETS.
+ (PROFILE_BEFORE_PROLOGUE): Define.
+ (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Add tab character. Correct
+ the push insn to use predecrement.
+
2011-05-04 Stuart Henderson <shenders@gcc.gnu.org>
From Jie Zhang
#define ASM_COMMENT_START "//"
+#define PROFILE_BEFORE_PROLOGUE
#define FUNCTION_PROFILER(FILE, LABELNO) \
do { \
- fprintf (FILE, "\tCALL __mcount;\n"); \
+ fprintf (FILE, "\t[--SP] = RETS;\n"); \
+ if (TARGET_LONG_CALLS) \
+ { \
+ fprintf (FILE, "\tP2.h = __mcount;\n"); \
+ fprintf (FILE, "\tP2.l = __mcount;\n"); \
+ fprintf (FILE, "\tCALL (P2);\n"); \
+ } \
+ else \
+ fprintf (FILE, "\tCALL __mcount;\n"); \
+ fprintf (FILE, "\tRETS = [SP++];\n"); \
} while(0)
#undef NO_PROFILE_COUNTERS
#define NO_PROFILE_COUNTERS 1
-#define ASM_OUTPUT_REG_PUSH(FILE, REGNO) fprintf (FILE, "[SP--] = %s;\n", reg_names[REGNO])
-#define ASM_OUTPUT_REG_POP(FILE, REGNO) fprintf (FILE, "%s = [SP++];\n", reg_names[REGNO])
+#define ASM_OUTPUT_REG_PUSH(FILE, REGNO) fprintf (FILE, "\t[--SP] = %s;\n", reg_names[REGNO])
+#define ASM_OUTPUT_REG_POP(FILE, REGNO) fprintf (FILE, "\t%s = [SP++];\n", reg_names[REGNO])
extern rtx bfin_cc_rtx, bfin_rets_rtx;