* [Bug target/19683] MIPS wrong-code for 64-bit multiply from java program.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
@ 2005-01-29 1:00 ` daney at gcc dot gnu dot org
2005-01-29 1:16 ` daney at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: daney at gcc dot gnu dot org @ 2005-01-29 1:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From daney at gcc dot gnu dot org 2005-01-29 01:00 -------
Created an attachment (id=8096)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8096&action=view)
Testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/19683] MIPS wrong-code for 64-bit multiply from java program.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
2005-01-29 1:00 ` [Bug target/19683] " daney at gcc dot gnu dot org
@ 2005-01-29 1:16 ` daney at gcc dot gnu dot org
2005-02-23 5:37 ` daney at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: daney at gcc dot gnu dot org @ 2005-01-29 1:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From daney at gcc dot gnu dot org 2005-01-29 01:16 -------
I should probably add the the compiler was configured with:
configure --target=mipsel-linux --with-sysroot=/usr/local/mipsel-linux
--with-arch=mips32 --with-float=soft --enable-languages=c,c++,java
--prefix=/usr/local/mipsel-linux --with-system-zlib --disable-java-awt
--without-x --disable-jvmpi
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/19683] MIPS wrong-code for 64-bit multiply from java program.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
2005-01-29 1:00 ` [Bug target/19683] " daney at gcc dot gnu dot org
2005-01-29 1:16 ` daney at gcc dot gnu dot org
@ 2005-02-23 5:37 ` daney at gcc dot gnu dot org
2005-02-23 6:01 ` daney at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: daney at gcc dot gnu dot org @ 2005-02-23 5:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From daney at gcc dot gnu dot org 2005-02-22 21:40 -------
Created an attachment (id=8257)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8257&action=view)
C testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/19683] MIPS wrong-code for 64-bit multiply from java program.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-02-23 5:37 ` daney at gcc dot gnu dot org
@ 2005-02-23 6:01 ` daney at gcc dot gnu dot org
2005-02-23 6:58 ` [Bug target/19683] MIPS wrong-code for 64-bit multiply daney at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: daney at gcc dot gnu dot org @ 2005-02-23 6:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From daney at gcc dot gnu dot org 2005-02-22 21:41 -------
Created an attachment (id=8258)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8258&action=view)
C testcase driver.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/19683] MIPS wrong-code for 64-bit multiply.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-02-23 6:01 ` daney at gcc dot gnu dot org
@ 2005-02-23 6:58 ` daney at gcc dot gnu dot org
2005-02-23 9:04 ` daney at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: daney at gcc dot gnu dot org @ 2005-02-23 6:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From daney at gcc dot gnu dot org 2005-02-22 22:02 -------
The new 'C' test case will reproduce the bug on:
$ mipsel-linux-gcc -v
Using built-in specs.
Target: mipsel-linux
Configured with: ../gcccvsmain/gcc/configure --target=mipsel-linux
--with-sysroot=/usr/local/mipsel-linux-test --with-arch=mips32 --with-float=soft
--prefix=/usr/local/mipsel-linux-test --with-system-zlib
--enable-languages=c,c++,java
Thread model: posix
gcc version 4.0.0 20050222 (experimental)
I have not been able to generate a 'C' test case that fails on 3.4.x. A similar
java testcase failed on 3.3.1, but I have not tried the attached java case on 3.3.1.
Here is the setup for failure:
$ mipsel-linux-gcc -O3 -c tm.c
$ mipsel-linux-gcc -O3 -c tm_driver.c
$ mipsel-linux-gcc -o tm tm_driver.o tm.o
Then on the host:
#./tm
The answer is: 3989327253662920704
Here is the setup for success:
$ mipsel-linux-gcc -O0 -c tm.c
$ mipsel-linux-gcc -O3 -c tm_driver.c
$ mipsel-linux-gcc -o tm tm_driver.o tm.o
Then on the host:
# ./tm
The answer is: 1109030400000
If we look at the relevent part of the disassembly we see:
li $6,86376448 # 0x5260000
ori $6,$6,0x5c00
multu $2,$6
lw $28,16($sp)
li $5,92340224 # 0x5810000
ori $5,$5,0x1392
lw $25,%call16(f4)($28)
mflo $4
sw $4,24($sp)
lw $4,%got($LC0)($28)
madd $6,$3
The problem is that before the madd, we need to copy the contents of hi -> low
and then clear hi to zero. This is not happening.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.0.0 3.4.3 3.3.1
Summary|MIPS wrong-code for 64-bit |MIPS wrong-code for 64-bit
|multiply from java program. |multiply.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/19683] MIPS wrong-code for 64-bit multiply.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-02-23 6:58 ` [Bug target/19683] MIPS wrong-code for 64-bit multiply daney at gcc dot gnu dot org
@ 2005-02-23 9:04 ` daney at gcc dot gnu dot org
2005-02-23 9:50 ` rsandifo at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: daney at gcc dot gnu dot org @ 2005-02-23 9:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From daney at gcc dot gnu dot org 2005-02-22 22:06 -------
I should comment that yes I have tried to simplify tm.c. This is the best I
could do. It seems that register pressure is important to force the compiler
into the failure mode, as in simpler cases the madd form of the multiply is
never generated.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/19683] MIPS wrong-code for 64-bit multiply.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-02-23 9:04 ` daney at gcc dot gnu dot org
@ 2005-02-23 9:50 ` rsandifo at gcc dot gnu dot org
2005-02-25 5:15 ` rsandifo at redhat dot com
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-02-23 9:50 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rsandifo at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-02-22 22:40:58
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/19683] MIPS wrong-code for 64-bit multiply.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-02-23 9:50 ` rsandifo at gcc dot gnu dot org
@ 2005-02-25 5:15 ` rsandifo at redhat dot com
2005-02-27 4:30 ` [Bug rtl-optimization/19683] " rsandifo at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rsandifo at redhat dot com @ 2005-02-25 5:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rsandifo at redhat dot com 2005-02-24 22:37 -------
Subject: Re: MIPS wrong-code for 64-bit multiply.
David Daney <ddaney@avtrex.com> writes:
> Do you think that patch can/should be backported to 3.3.x and 3.4.x?
If it works. ;) I think it's one of those that has to prove itself
on mainline for a week or so first.
Richard
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/19683] MIPS wrong-code for 64-bit multiply.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-02-25 5:15 ` rsandifo at redhat dot com
@ 2005-02-27 4:30 ` rsandifo at gcc dot gnu dot org
2005-03-03 21:19 ` daney at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-02-27 4:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rsandifo at gcc dot gnu dot org 2005-02-26 10:16 -------
Patch posted here:
http://gcc.gnu.org/ml/gcc-patches/2005-02/msg01665.html
--
What |Removed |Added
----------------------------------------------------------------------------
Component|target |rtl-optimization
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/19683] MIPS wrong-code for 64-bit multiply.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-02-27 4:30 ` [Bug rtl-optimization/19683] " rsandifo at gcc dot gnu dot org
@ 2005-03-03 21:19 ` daney at gcc dot gnu dot org
2005-03-07 17:49 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: daney at gcc dot gnu dot org @ 2005-03-03 21:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From daney at gcc dot gnu dot org 2005-03-03 21:19 -------
Thanks Richard,
The patch applies cleanly against 3.4.3 (with an offset of something like 9
lines). I found no regressions with a top level make -k check for an i686-linux
-> mipsel-linux cross compiler with the patch applied to 3.4.3. I have been
using the patch for about a week now on 3.4.3 with no problems found.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/19683] MIPS wrong-code for 64-bit multiply.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
` (9 preceding siblings ...)
2005-03-03 21:19 ` daney at gcc dot gnu dot org
@ 2005-03-07 17:49 ` cvs-commit at gcc dot gnu dot org
2005-03-07 17:51 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-07 17:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-07 17:48 -------
Subject: Bug 19683
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: rsandifo@gcc.gnu.org 2005-03-07 17:48:47
Modified files:
gcc : ChangeLog reload1.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/torture: pr19683-1.c
Log message:
PR rtl-optimization/19683
* reload1.c (choose_reload_regs): Pass the number of bits, not the
number of bytes, to smallest_int_for_mode. Fix arguments to
REG_CANNOT_CHANGE_MODE_P.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7711&r2=2.7712
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload1.c.diff?cvsroot=gcc&r1=1.462&r2=1.463
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5118&r2=1.5119
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/torture/pr19683-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/19683] MIPS wrong-code for 64-bit multiply.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
` (10 preceding siblings ...)
2005-03-07 17:49 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-07 17:51 ` cvs-commit at gcc dot gnu dot org
2005-03-07 17:54 ` rsandifo at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-07 17:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-07 17:51 -------
Subject: Bug 19683
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: rsandifo@gcc.gnu.org 2005-03-07 17:51:36
Modified files:
gcc : ChangeLog reload1.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/torture: pr19683-1.c
Log message:
PR rtl-optimization/19683
* reload1.c (choose_reload_regs): Pass the number of bits, not the
number of bytes, to smallest_int_for_mode. Fix arguments to
REG_CANNOT_CHANGE_MODE_P.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.30&r2=2.7592.2.31
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload1.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.461&r2=1.461.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.22&r2=1.5084.2.23
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/torture/pr19683-1.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/19683] MIPS wrong-code for 64-bit multiply.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
` (11 preceding siblings ...)
2005-03-07 17:51 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-07 17:54 ` rsandifo at gcc dot gnu dot org
2005-03-17 21:12 ` cvs-commit at gcc dot gnu dot org
2005-03-17 21:13 ` rsandifo at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-03-07 17:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rsandifo at gcc dot gnu dot org 2005-03-07 17:54 -------
Patch applied to mainline and 4.0. Will apply to 3.4 branch
in a week or so if nothing goes wrong.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|4.0.0 3.4.3 3.3.1 |3.4.3 3.3.1
Known to work| |4.1.0 4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/19683] MIPS wrong-code for 64-bit multiply.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
` (12 preceding siblings ...)
2005-03-07 17:54 ` rsandifo at gcc dot gnu dot org
@ 2005-03-17 21:12 ` cvs-commit at gcc dot gnu dot org
2005-03-17 21:13 ` rsandifo at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-17 21:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-17 21:12 -------
Subject: Bug 19683
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: rsandifo@gcc.gnu.org 2005-03-17 21:11:49
Modified files:
gcc : ChangeLog reload1.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/torture: pr19683-1.c
Log message:
PR rtl-optimization/19683
* reload1.c (choose_reload_regs): Pass the number of bits, not the
number of bytes, to smallest_int_for_mode. Fix arguments to
REG_CANNOT_CHANGE_MODE_P.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.820&r2=2.2326.2.821
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.419.4.7&r2=1.419.4.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.371&r2=1.3389.2.372
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/torture/pr19683-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.6.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/19683] MIPS wrong-code for 64-bit multiply.
2005-01-29 0:59 [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program daney at gcc dot gnu dot org
` (13 preceding siblings ...)
2005-03-17 21:12 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-17 21:13 ` rsandifo at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-03-17 21:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rsandifo at gcc dot gnu dot org 2005-03-17 21:13 -------
Committed to 3.4 as promised, after bootstrapping & regression
testing on mips-sgi-irix6.5.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to fail|3.4.3 3.3.1 |3.3.1
Known to work|4.1.0 4.0.0 |4.1.0 4.0.0 3.4.4
Resolution| |FIXED
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683
^ permalink raw reply [flat|nested] 16+ messages in thread