This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
target/6496: Sparc backend clobbers call-return stack of UltraSparc
- From: davem at redhat dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 28 Apr 2002 06:43:57 -0000
- Subject: target/6496: Sparc backend clobbers call-return stack of UltraSparc
- Reply-to: davem at redhat dot com
>Number: 6496
>Category: target
>Synopsis: Sparc backend clobbers call-return stack of UltraSparc
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Apr 27 23:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: davem@redhat.com
>Release: GCC 3.1 CVS
>Organization:
>Environment:
sparc*-*
>Description:
The Sparc backend peepholes for optimizing a
call followed by a jump should be disabled when
optimizing for UltraSPARC and later.
These optimizations corrupt the call-return stack
so that the end result is slower code not faster code.
>How-To-Repeat:
Compile enclosed testcase with -O2 -mtune=ultrasparc
Look at assembly for "add %o7, OFF, %o7" in delay
slot of calls to 'bar'.
>Fix:
When sparc_pu == PROCESSOR_ULTRASPARC or later, do not
match these peepholes.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="call_jump.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="call_jump.c"
ZXh0ZXJuIHZvaWQgYmFyKHZvaWQpOwoKaW50IGZvbyhpbnQgYSkKewoJaWYgKGEgPj0gMCAmJiBh
IDwgOCkKCXsKCQlhICs9IDB4NTAwMDA7CgkJYmFyKCk7Cgl9CgllbHNlIGlmIChhIDwgMTgpCgl7
CgkJYSArPSAweDgyMDAzMDsKCQliYXIoKTsKCX0KCWVsc2UgaWYgKGEgPiAzMikKCQlhICs9IDB4
OTkyMjg4MzsKCWVsc2UKCQliYXIoKTsKCglyZXR1cm4gYTsKfQo=