summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorjonathan <jonathan@NetBSD.org>1999-02-27 03:36:28 +0000
committerjonathan <jonathan@NetBSD.org>1999-02-27 03:36:28 +0000
commit1192ce7d8f9af193da4bebfb6036aecb1f769aa2 (patch)
tree85ac789a46f1f9cd309fde2a12ae316e8350b9b3 /gnu
parentff6c8ce5573c1f6616470f5063c9d076ee2e87f0 (diff)
Patch FUNCTION_PROFILER to avoid code-scheduling botch when compiling
with -mabicalls: the gcc/egcs code emits hand-scheduled code with an insn in a "jal _mcount" delayslot. But with -mabicalls, the "jal" expands into a call via $t9 and the delay-slot is already filled. See PR#5248.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/dist/gcc/config/mips/mips.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/dist/gcc/config/mips/mips.h b/gnu/dist/gcc/config/mips/mips.h
index 27256e5919c..ff61c9b5638 100644
--- a/gnu/dist/gcc/config/mips/mips.h
+++ b/gnu/dist/gcc/config/mips/mips.h
@@ -2519,13 +2519,14 @@ typedef struct mips_args {
fprintf (FILE, "\t.set\tnoat\n"); \
fprintf (FILE, "\tmove\t%s,%s\t\t# save current return address\n", \
reg_names[GP_REG_FIRST + 1], reg_names[GP_REG_FIRST + 31]); \
- fprintf (FILE, "\tjal\t_mcount\n"); \
fprintf (FILE, \
"\t%s\t%s,%s,%d\t\t# _mcount pops 2 words from stack\n", \
TARGET_64BIT ? "dsubu" : "subu", \
reg_names[STACK_POINTER_REGNUM], \
reg_names[STACK_POINTER_REGNUM], \
Pmode == DImode ? 16 : 8); \
+ fprintf (FILE, "\tjal\t_mcount\n"); \
+ fprintf (FILE, "\tnop\n"); \
fprintf (FILE, "\t.set\treorder\n"); \
fprintf (FILE, "\t.set\tat\n"); \
}