public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/28011] New: [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified
@ 2006-06-13 10:43 saito at densan dot co dot jp
2006-06-13 11:53 ` [Bug target/28011] " saito at densan dot co dot jp
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: saito at densan dot co dot jp @ 2006-06-13 10:43 UTC (permalink / raw)
To: gcc-bugs
g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified.
I did following tests. In the case of 1, wrong code was generated.
1. sh4-linux-g++ -S -O -fno-exceptions testcase.cc
2. sh4-linux-g++ -S -O2 -fno-exceptions testcase.cc
Source code is as follows but I will attach the testcase.
PRBool dummy;
asm("POST:");
return target->DispatchEvent(event, aDefaultAction ? aDefaultAction :
&dummy);
The result of case 1.
#APP
POST:
#NO_APP
mov.w .L76,r0
mov.w .L79,r3
add r14,r3
mov.l @(r0,r3),r4
mov.l @r4,r1
mov.l @(20,r1),r2
mov.l @r8,r5
mov.l @(44,r3),r1
tst r1,r1
bf .L27
mov.w .L66,r1 # .L66: .short -188
mov.w .L79,r3 # .L79: .short 188
add r14,r3
add r1,r3
mov.l r3,@(44,r3) # this code is wrong because 44 is not right value
.L27: # the value should be 232 - (188 - 188) but not 232 - 188
mov.w .L68,r0 # .L68: .short 232
mov.l @(r0,r14),r6
jsr @r2
nop
The result of case 2. It seems that this case is right.
#APP
POST:
#NO_APP
mov.w .L62,r3
mov.l @r13,r5
add r14,r3
mov.l @(0,r3),r4
mov.l @(44,r3),r2
mov.l @r4,r1
tst r2,r2
mov.l @(20,r1),r1
bt .L34
.L27:
mov.w .L58,r0
mov.l @(r0,r14),r6
jsr @r1
nop
mov r0,r9
.L24:
mov.l .L63,r1
jsr @r1
mov r8,r4
...
.L34:
mov.w .L67,r2
mov.w .L68,r0
add r14,r2
mov.l r2,@(r0,r14)
bra .L27
nop
--
Summary: [SH] g++ generates wrong code, if '-fno-exceptions' and
'-O' options are specified
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: saito at densan dot co dot jp
GCC build triplet: sh4-linux
GCC host triplet: sh4-linux
GCC target triplet: sh4-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28011
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/28011] [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified
2006-06-13 10:43 [Bug target/28011] New: [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified saito at densan dot co dot jp
@ 2006-06-13 11:53 ` saito at densan dot co dot jp
2007-05-08 22:11 ` [Bug rtl-optimization/28011] " kkojima at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: saito at densan dot co dot jp @ 2006-06-13 11:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from saito at densan dot co dot jp 2006-06-13 10:43 -------
Created an attachment (id=11660)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11660&action=view)
testcase
This testcase is very large because this file already includes header files and
this came from firefox's build.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28011
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/28011] [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified
2006-06-13 10:43 [Bug target/28011] New: [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified saito at densan dot co dot jp
2006-06-13 11:53 ` [Bug target/28011] " saito at densan dot co dot jp
@ 2007-05-08 22:11 ` kkojima at gcc dot gnu dot org
2007-05-08 22:23 ` kkojima at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2007-05-08 22:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from kkojima at gcc dot gnu dot org 2007-05-08 23:11 -------
It turned out that this is a generic reload issue rather than
a target problem. See
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg00476.html
--
kkojima at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kkojima at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Component|target |rtl-optimization
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-05-08 23:11:07
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28011
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/28011] [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified
2006-06-13 10:43 [Bug target/28011] New: [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified saito at densan dot co dot jp
2006-06-13 11:53 ` [Bug target/28011] " saito at densan dot co dot jp
2007-05-08 22:11 ` [Bug rtl-optimization/28011] " kkojima at gcc dot gnu dot org
@ 2007-05-08 22:23 ` kkojima at gcc dot gnu dot org
2007-06-20 5:47 ` [Bug rtl-optimization/28011] [4.1/4.2 Regression] " kkojima at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2007-05-08 22:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from kkojima at gcc dot gnu dot org 2007-05-08 23:23 -------
Subject: Bug 28011
Author: kkojima
Date: Tue May 8 22:22:49 2007
New Revision: 124557
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124557
Log:
PR rtl-optimization/28011
* reload.c (push_reload): Set dont_share if IN appears in OUT
also when IN is a PLUS rtx.
(reg_overlap_mentioned_for_reload_p): Return true if X and IN
are same PLUS rtx.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/reload.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28011
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/28011] [4.1/4.2 Regression] [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified
2006-06-13 10:43 [Bug target/28011] New: [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified saito at densan dot co dot jp
` (2 preceding siblings ...)
2007-05-08 22:23 ` kkojima at gcc dot gnu dot org
@ 2007-06-20 5:47 ` kkojima at gcc dot gnu dot org
2007-06-20 5:52 ` kkojima at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2007-06-20 5:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from kkojima at gcc dot gnu dot org 2007-06-20 05:47 -------
Subject: Bug 28011
Author: kkojima
Date: Wed Jun 20 05:47:09 2007
New Revision: 125871
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125871
Log:
PR rtl-optimization/28011
Backport from mainline.
* reload.c (push_reload): Set dont_share if IN appears in OUT
also when IN is a PLUS rtx.
(reg_overlap_mentioned_for_reload_p): Return true if X and IN
are same PLUS rtx.
Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/reload.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28011
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/28011] [4.1/4.2 Regression] [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified
2006-06-13 10:43 [Bug target/28011] New: [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified saito at densan dot co dot jp
` (3 preceding siblings ...)
2007-06-20 5:47 ` [Bug rtl-optimization/28011] [4.1/4.2 Regression] " kkojima at gcc dot gnu dot org
@ 2007-06-20 5:52 ` kkojima at gcc dot gnu dot org
2007-06-20 5:54 ` kkojima at gcc dot gnu dot org
2007-12-18 19:56 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2007-06-20 5:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from kkojima at gcc dot gnu dot org 2007-06-20 05:52 -------
Subject: Bug 28011
Author: kkojima
Date: Wed Jun 20 05:52:05 2007
New Revision: 125872
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125872
Log:
PR rtl-optimization/28011
Backport from mainline.
* reload.c (push_reload): Set dont_share if IN appears in OUT
also when IN is a PLUS rtx.
(reg_overlap_mentioned_for_reload_p): Return true if X and IN
are same PLUS rtx.
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/reload.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28011
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/28011] [4.1/4.2 Regression] [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified
2006-06-13 10:43 [Bug target/28011] New: [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified saito at densan dot co dot jp
` (4 preceding siblings ...)
2007-06-20 5:52 ` kkojima at gcc dot gnu dot org
@ 2007-06-20 5:54 ` kkojima at gcc dot gnu dot org
2007-12-18 19:56 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2007-06-20 5:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from kkojima at gcc dot gnu dot org 2007-06-20 05:54 -------
Fixed.
--
kkojima at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28011
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/28011] [4.1/4.2 Regression] [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified
2006-06-13 10:43 [Bug target/28011] New: [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified saito at densan dot co dot jp
` (5 preceding siblings ...)
2007-06-20 5:54 ` kkojima at gcc dot gnu dot org
@ 2007-12-18 19:56 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-18 19:56 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28011
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-12-18 19:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-13 10:43 [Bug target/28011] New: [SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified saito at densan dot co dot jp
2006-06-13 11:53 ` [Bug target/28011] " saito at densan dot co dot jp
2007-05-08 22:11 ` [Bug rtl-optimization/28011] " kkojima at gcc dot gnu dot org
2007-05-08 22:23 ` kkojima at gcc dot gnu dot org
2007-06-20 5:47 ` [Bug rtl-optimization/28011] [4.1/4.2 Regression] " kkojima at gcc dot gnu dot org
2007-06-20 5:52 ` kkojima at gcc dot gnu dot org
2007-06-20 5:54 ` kkojima at gcc dot gnu dot org
2007-12-18 19:56 ` pinskia at gcc dot gnu dot org
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).