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.

From-SVN: r173365
This commit is contained in:
Stuart Henderson 2011-05-04 10:48:55 +00:00
parent 9f8d69ee24
commit 420ccc84ea
2 changed files with 22 additions and 3 deletions

View File

@ -1,3 +1,12 @@
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

View File

@ -1126,16 +1126,26 @@ do { \
#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;