public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: target/5126: m68k pic optimisation bug
@ 2003-01-14 23:11 bangerth
0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-01-14 23:11 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, rth, steve
Synopsis: m68k pic optimisation bug
State-Changed-From-To: feedback->closed
State-Changed-By: bangerth
State-Changed-When: Tue Jan 14 15:11:16 2003
State-Changed-Why:
No feedback.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5126
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: target/5126: m68k pic optimisation bug
@ 2002-03-29 17:48 rth
0 siblings, 0 replies; 3+ messages in thread
From: rth @ 2002-03-29 17:48 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, rth, steve
Synopsis: m68k pic optimisation bug
Responsible-Changed-From-To: unassigned->rth
Responsible-Changed-By: rth
Responsible-Changed-When: Fri Mar 29 17:48:53 2002
Responsible-Changed-Why:
.
State-Changed-From-To: open->feedback
State-Changed-By: rth
State-Changed-When: Fri Mar 29 17:48:53 2002
State-Changed-Why:
I remember this going around sometime last year. AFAICT, the
fix for this was
if (flag_pic && current_function_uses_pic_offset_table)
{
mask |= 1 << (15 - PIC_OFFSET_TABLE_REGNUM);
num_saved_regs++;
}
in the prologue and epilogue expanders.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5126
^ permalink raw reply [flat|nested] 3+ messages in thread
* target/5126: m68k pic optimisation bug
@ 2001-12-15 12:46 steve
0 siblings, 0 replies; 3+ messages in thread
From: steve @ 2001-12-15 12:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 5126
>Category: target
>Synopsis: m68k pic optimisation bug
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Dec 15 12:46:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Steve Woodford
>Release: gcc-2.95.3
>Organization:
>Environment:
NetBSD/mvme68k
(Any m68k platform will be affected)
>Description:
When generating PIC code for m68k, under certain circumstances,
gcc will load %a5 with the GOT address even if the reference
to global data in the function has been optimised away.
Unfortunately, in this case, %a5 is not saved in the function
prologue to non-pic callers which use %a5 will lose.
This bug has been reported before, but as far as I can tell,
there is no open PR and no apparent fix in gcc-current. See:
http://gcc.gnu.org/ml/gcc-bugs/1999-11n/msg00673.html.
>How-To-Repeat:
See http://gcc.gnu.org/ml/gcc-bugs/1999-11n/msg00673.html
for a very simple test case.
>Fix:
The following patch to gcc-2.95.3's gcc/config/m68k/m68k.c
fixes things.
--- m68k.c 2000/07/26 00:18:31 1.1.1.1
+++ m68k.c 2001/12/15 17:19:16
@@ -462,7 +462,8 @@
-cfa_store_offset + n_regs++ * 4);
}
}
- if (flag_pic && current_function_uses_pic_offset_table)
+ if (flag_pic && current_function_uses_pic_offset_table &&
+ regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
{
#ifdef MOTOROLA
asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-14 23:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-14 23:11 target/5126: m68k pic optimisation bug bangerth
-- strict thread matches above, loose matches on Subject: below --
2002-03-29 17:48 rth
2001-12-15 12:46 steve
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).