diff options
author | John Hassey <hassey@gnu.org> | 1993-02-23 02:10:03 +0000 |
---|---|---|
committer | John Hassey <hassey@gnu.org> | 1993-02-23 02:10:03 +0000 |
commit | d4f8225ab778ea7989d56fdede19e8fc25f8026b (patch) | |
tree | 0c38155c1db654631f13fadd65a50f412b00e1a3 /gcc/config/m88k | |
parent | 0ef08a071a3d6a5bf36afd8e0e181322a8b89eaf (diff) | |
download | gcc-d4f8225ab778ea7989d56fdede19e8fc25f8026b.zip gcc-d4f8225ab778ea7989d56fdede19e8fc25f8026b.tar.gz gcc-d4f8225ab778ea7989d56fdede19e8fc25f8026b.tar.bz2 |
(output_call): Don't use the delay slot of a bsr.n
to modify the return address, unless -O2 specified.
From-SVN: r3513
Diffstat (limited to 'gcc/config/m88k')
-rw-r--r-- | gcc/config/m88k/m88k.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c index c4718fb..e2465e3 100644 --- a/gcc/config/m88k/m88k.c +++ b/gcc/config/m88k/m88k.c @@ -861,14 +861,20 @@ output_call (operands, addr) NOTE_LINE_NUMBER (jump) = NOTE_INSN_DELETED; NOTE_SOURCE_FILE (jump) = 0; - /* If we loose, we must use the non-delay form. This is unlikely + /* We only do this optimization if -O2, modifying the value of + r1 in the delay slot confuses debuggers and profilers on some + systems. + + If we loose, we must use the non-delay form. This is unlikely to ever happen. If it becomes a problem, claim that a call has two delay slots and only the second can be filled with a jump. */ #ifdef AS_BUG_IMMEDIATE_LABEL /* The assembler restricts immediate values. */ - if (! ADD_INTVAL (delta * 2)) + if (optimize < 2 + || ! ADD_INTVAL (delta * 2)) #else - if (! ADD_INTVAL (delta)) + if (optimize < 2 + || ! ADD_INTVAL (delta)) #endif { operands[1] = dest; |