public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/30192] New: [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf
@ 2006-12-13 2:53 John dot Tytgat at aaug dot net
2006-12-13 12:02 ` [Bug target/30192] " rearnsha at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: John dot Tytgat at aaug dot net @ 2006-12-13 2:53 UTC (permalink / raw)
To: gcc-bugs
In a private arm based target on gcc 4.1.1 I noticed that the sp stack value is
wrong after having called __floatdidf or __floatundidf (at
gcc/config/arm/ieee754-df.S).
The reason is that for this target I don't have __VFP_FP__ nor __SOFTFP__
defined which means that both routines will finally call f0_ret. The final
return statement is the macro RETLDM which is defined as 'ldr pc, [sp], #8' and
this is increasing the stack pointer with 4 too much as at that time the r4, r5
and ip of 'stmfd sp!, {r4, r5, ip, lr}' on entry of those routines are
consumed, so sp may only increase by 4, not 8.
The easy fix I did was:
--- gcc/config/arm/ieee754-df.S.orig 2006-12-13 02:54:07.000000000 +0100
+++ gcc/config/arm/ieee754-df.S 2006-12-13 02:53:40.000000000 +0100
@@ -528,7 +528,7 @@
LSYM(f0_ret):
stmfd sp!, {r0, r1}
ldfd f0, [sp], #8
- RETLDM
+ ldr pc, [sp], #4
#endif
--
Summary: [arm] Wrong sp value on exit after calling __floatdidf
or __floatundidf
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: John dot Tytgat at aaug dot net
GCC target triplet: arm-unknown-riscos
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30192
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30192] [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf
2006-12-13 2:53 [Bug target/30192] New: [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf John dot Tytgat at aaug dot net
@ 2006-12-13 12:02 ` rearnsha at gcc dot gnu dot org
2006-12-13 12:02 ` rearnsha at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2006-12-13 12:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rearnsha at gcc dot gnu dot org 2006-12-13 12:01 -------
Created an attachment (id=12793)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12793&action=view)
patch for fpa-related floating point problems
--
rearnsha at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rearnsha at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30192
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30192] [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf
2006-12-13 2:53 [Bug target/30192] New: [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf John dot Tytgat at aaug dot net
2006-12-13 12:02 ` [Bug target/30192] " rearnsha at gcc dot gnu dot org
@ 2006-12-13 12:02 ` rearnsha at gcc dot gnu dot org
2006-12-13 22:02 ` John dot Tytgat at aaug dot net
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2006-12-13 12:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rearnsha at gcc dot gnu dot org 2006-12-13 12:02 -------
Sorry, your proposed patch isn't interworking safe. Can you try the patch I've
attached and let me know if that works.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30192
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30192] [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf
2006-12-13 2:53 [Bug target/30192] New: [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf John dot Tytgat at aaug dot net
2006-12-13 12:02 ` [Bug target/30192] " rearnsha at gcc dot gnu dot org
2006-12-13 12:02 ` rearnsha at gcc dot gnu dot org
@ 2006-12-13 22:02 ` John dot Tytgat at aaug dot net
2006-12-13 22:03 ` John dot Tytgat at aaug dot net
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: John dot Tytgat at aaug dot net @ 2006-12-13 22:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from John dot Tytgat at aaug dot net 2006-12-13 22:01 -------
Proposed patch works fine. Interworking safeness isn't important for my target
so that's why didn't consider your approach. Thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30192
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30192] [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf
2006-12-13 2:53 [Bug target/30192] New: [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf John dot Tytgat at aaug dot net
` (2 preceding siblings ...)
2006-12-13 22:02 ` John dot Tytgat at aaug dot net
@ 2006-12-13 22:03 ` John dot Tytgat at aaug dot net
2007-01-29 0:00 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: John dot Tytgat at aaug dot net @ 2006-12-13 22:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from John dot Tytgat at aaug dot net 2006-12-13 22:03 -------
Just to avoid confusion, in comment #3 I was talking about patch with id 12793,
not mine. I've tested it and works equally well.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30192
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30192] [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf
2006-12-13 2:53 [Bug target/30192] New: [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf John dot Tytgat at aaug dot net
` (3 preceding siblings ...)
2006-12-13 22:03 ` John dot Tytgat at aaug dot net
@ 2007-01-29 0:00 ` mmitchel at gcc dot gnu dot org
2007-12-13 1:04 ` pbrook at gcc dot gnu dot org
2007-12-16 13:04 ` John dot Tytgat at aaug dot net
6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-01-29 0:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from mmitchel at gcc dot gnu dot org 2007-01-29 00:00 -------
Richard, this patch is OK for 4.1, 4.2 branches once applied to mainline.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30192
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30192] [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf
2006-12-13 2:53 [Bug target/30192] New: [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf John dot Tytgat at aaug dot net
` (4 preceding siblings ...)
2007-01-29 0:00 ` mmitchel at gcc dot gnu dot org
@ 2007-12-13 1:04 ` pbrook at gcc dot gnu dot org
2007-12-16 13:04 ` John dot Tytgat at aaug dot net
6 siblings, 0 replies; 8+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2007-12-13 1:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pbrook at gcc dot gnu dot org 2007-12-13 01:04 -------
Subject: Bug 30192
Author: pbrook
Date: Thu Dec 13 01:03:53 2007
New Revision: 130800
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130800
Log:
2007-12-13 Richard Earnshaw <rearnsha@arm.com>
PR target/30192
* config/arm/ieee754-df.S (floatundidf): Fix for wrong sp value on
exit when using hard FPA.
* config/arm/ieee754-df.S (floatdidf): Likewise.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/ieee754-df.S
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30192
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30192] [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf
2006-12-13 2:53 [Bug target/30192] New: [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf John dot Tytgat at aaug dot net
` (5 preceding siblings ...)
2007-12-13 1:04 ` pbrook at gcc dot gnu dot org
@ 2007-12-16 13:04 ` John dot Tytgat at aaug dot net
6 siblings, 0 replies; 8+ messages in thread
From: John dot Tytgat at aaug dot net @ 2007-12-16 13:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from John dot Tytgat at aaug dot net 2007-12-16 13:04 -------
Indeed fixed thanks.
--
John dot Tytgat at aaug dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30192
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-12-16 13:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-13 2:53 [Bug target/30192] New: [arm] Wrong sp value on exit after calling __floatdidf or __floatundidf John dot Tytgat at aaug dot net
2006-12-13 12:02 ` [Bug target/30192] " rearnsha at gcc dot gnu dot org
2006-12-13 12:02 ` rearnsha at gcc dot gnu dot org
2006-12-13 22:02 ` John dot Tytgat at aaug dot net
2006-12-13 22:03 ` John dot Tytgat at aaug dot net
2007-01-29 0:00 ` mmitchel at gcc dot gnu dot org
2007-12-13 1:04 ` pbrook at gcc dot gnu dot org
2007-12-16 13:04 ` John dot Tytgat at aaug dot net
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).