public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15869] New: No NOP after LW (with -mips1 -O0)
@ 2004-06-08 8:10 niva at niisi dot msk dot ru
2004-06-08 11:47 ` [Bug target/15869] " pinskia at gcc dot gnu dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: niva at niisi dot msk dot ru @ 2004-06-08 8:10 UTC (permalink / raw)
To: gcc-bugs
* the complete command line that triggers the bug;
mips64-none-elf-gcc bar.c -v -O0 -G0 -mips1 -mabi=32 -S -v
* The resultant code works incorrectly because there is no NOP between
the following commands:
lw $2,%lo(lastc.1)($2)
xor $2,$3,$2
* the preprocessed file (*.i*) that triggers the bug, generated by
adding -save-temps to the complete compilation command, or, in the
case of a bug report for the GNAT front end, a complete set of
source files (see below).
void bar (int n, int c)
{
static int lastn = -1, lastc = -1;
if (lastn != n)
{
if (lastc != lastn)
abort ();
lastc = 0;
lastn = n;
}
if (c != (char) (lastc ^ (n << 3)))
abort ();
lastc++;
}
* The resultant assembler code
.file 1 "bar.c"
.section .mdebug.abi32
.previous
.data
.align 2
.type lastn.0, @object
.size lastn.0, 4
lastn.0:
.word -1
.align 2
.type lastc.1, @object
.size lastc.1, 4
lastc.1:
.word -1
.text
.align 2
.globl bar
.ent bar
bar:
.frame $fp,24,$31 # vars= 0, regs= 2/0, args= 16, gp= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
.set noreorder
.set nomacro
addiu $sp,$sp,-24
sw $31,20($sp)
sw $fp,16($sp)
move $fp,$sp
sw $4,24($fp)
sw $5,28($fp)
lui $2,%hi(lastn.0)
lw $3,%lo(lastn.0)($2)
lw $2,24($fp)
nop
beq $3,$2,$L2
nop
lui $2,%hi(lastc.1)
lui $3,%hi(lastn.0)
lw $4,%lo(lastc.1)($2)
lw $2,%lo(lastn.0)($3)
nop
beq $4,$2,$L3
nop
jal abort
nop
$L3:
lui $2,%hi(lastc.1)
sw $0,%lo(lastc.1)($2)
lui $3,%hi(lastn.0)
lw $2,24($fp)
nop
sw $2,%lo(lastn.0)($3)
$L2:
lw $2,24($fp)
nop
sll $3,$2,3
lui $2,%hi(lastc.1)
lw $2,%lo(lastc.1)($2)
xor $2,$3,$2
sll $3,$2,24
sra $3,$3,24
lw $2,28($fp)
nop
beq $3,$2,$L4
nop
jal abort
nop
$L4:
lui $3,%hi(lastc.1)
lui $2,%hi(lastc.1)
lw $2,%lo(lastc.1)($2)
nop
addiu $2,$2,1
sw $2,%lo(lastc.1)($3)
move $sp,$fp
lw $31,20($sp)
lw $fp,16($sp)
addiu $sp,$sp,24
j $31
nop
.set macro
.set reorder
.end bar
--
Summary: No NOP after LW (with -mips1 -O0)
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: niva at niisi dot msk dot ru
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: mips64-none-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15869] No NOP after LW (with -mips1 -O0)
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
@ 2004-06-08 11:47 ` pinskia at gcc dot gnu dot org
2004-06-22 8:18 ` rsandifo at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-08 11:47 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|c |target
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15869] No NOP after LW (with -mips1 -O0)
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
2004-06-08 11:47 ` [Bug target/15869] " pinskia at gcc dot gnu dot org
@ 2004-06-22 8:18 ` rsandifo at gcc dot gnu dot org
2004-06-22 21:28 ` cvs-commit at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2004-06-22 8:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rsandifo at gcc dot gnu dot org 2004-06-22 08:18 -------
Confirmed. Seems to be caused by some no-op moves that get deleted
after machine_dependent_reorg.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rsandifo at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15869] No NOP after LW (with -mips1 -O0)
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
2004-06-08 11:47 ` [Bug target/15869] " pinskia at gcc dot gnu dot org
2004-06-22 8:18 ` rsandifo at gcc dot gnu dot org
@ 2004-06-22 21:28 ` cvs-commit at gcc dot gnu dot org
2004-06-22 21:32 ` rsandifo at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-22 21:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-06-22 21:28 -------
Subject: Bug 15869
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: rsandifo@gcc.gnu.org 2004-06-22 21:28:06
Modified files:
gcc : ChangeLog
gcc/config/mips: mips.c
Log message:
PR target/15869
* config/mips/mips.c (mips_avoid_hazards): Call split_all_insns_noflow.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4081&r2=2.4082
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/mips.c.diff?cvsroot=gcc&r1=1.418&r2=1.419
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15869] No NOP after LW (with -mips1 -O0)
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
` (2 preceding siblings ...)
2004-06-22 21:28 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-22 21:32 ` rsandifo at gcc dot gnu dot org
2004-06-22 21:38 ` [Bug target/15869] [3.4 Regression] " pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2004-06-22 21:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rsandifo at gcc dot gnu dot org 2004-06-22 21:32 -------
Patch applied to HEAD:
http://gcc.gnu.org/ml/gcc-patches/2004-06/msg01798.html
CC'ing Mark since this is a 3.4 regression.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15869] [3.4 Regression] No NOP after LW (with -mips1 -O0)
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
` (3 preceding siblings ...)
2004-06-22 21:32 ` rsandifo at gcc dot gnu dot org
@ 2004-06-22 21:38 ` pinskia at gcc dot gnu dot org
2004-06-23 6:55 ` rsandifo at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-22 21:38 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Known to fail| |3.4.0
Known to work| |3.3.3 3.5.0
Summary|No NOP after LW (with -mips1|[3.4 Regression] No NOP
|-O0) |after LW (with -mips1 -O0)
Target Milestone|--- |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15869] [3.4 Regression] No NOP after LW (with -mips1 -O0)
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
` (4 preceding siblings ...)
2004-06-22 21:38 ` [Bug target/15869] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2004-06-23 6:55 ` rsandifo at gcc dot gnu dot org
2004-06-23 7:05 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2004-06-23 6:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rsandifo at gcc dot gnu dot org 2004-06-23 06:46 -------
Adding a target milestone of 3.4.2 is probably just a formality,
and I seem to remember only Mark can set it to 3.4.1, but for
avoidance of doubt...I'd really like to see this go into 3.4.1
if possible. It's entirely contained within the MIPS backend,
so there should be no risk to other targets. And I think the
patch is low risk for MIPS too.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15869] [3.4 Regression] No NOP after LW (with -mips1 -O0)
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
` (5 preceding siblings ...)
2004-06-23 6:55 ` rsandifo at gcc dot gnu dot org
@ 2004-06-23 7:05 ` mmitchel at gcc dot gnu dot org
2004-06-23 7:10 ` rsandifo at redhat dot com
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-23 7:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-06-23 06:55 -------
I think this one needs a bit more testing; apply it after 3.4.1 is out.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15869] [3.4 Regression] No NOP after LW (with -mips1 -O0)
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
` (6 preceding siblings ...)
2004-06-23 7:05 ` mmitchel at gcc dot gnu dot org
@ 2004-06-23 7:10 ` rsandifo at redhat dot com
2004-06-23 16:04 ` mark at codesourcery dot com
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rsandifo at redhat dot com @ 2004-06-23 7:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rsandifo at redhat dot com 2004-06-23 07:05 -------
Subject: Re: [3.4 Regression] No NOP after LW (with
-mips1 -O0)
"mmitchel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
> ------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-06-23 06:55 -------
> I think this one needs a bit more testing; apply it after 3.4.1 is out.
Sorry to be pushy, but from whom? I don't think anyone other than me &
David Billinghurst are testing CVS sources at the moment.
If you're thinking about Maciej's offer to test on r3000 h/w: well,
that's going to be useful to see if there are more cases we're missing.
But it's easy to verify (by looking at assembler sources) that the
instance reported in the PR has been fixed. And knowing the code
(and having written it myself ;) I don't think it can introduce
_more_ problems of the same kind.
Could I ask you to reconsider? (Don't worry, if you say no, I won't
ask again.)
Richard
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15869] [3.4 Regression] No NOP after LW (with -mips1 -O0)
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
` (7 preceding siblings ...)
2004-06-23 7:10 ` rsandifo at redhat dot com
@ 2004-06-23 16:04 ` mark at codesourcery dot com
2004-06-23 17:00 ` rsandifo at redhat dot com
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mark at codesourcery dot com @ 2004-06-23 16:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mark at codesourcery dot com 2004-06-23 15:54 -------
Subject: Re: [3.4 Regression] No NOP after LW (with -mips1
-O0)
rsandifo at redhat dot com wrote:
>------- Additional Comments From rsandifo at redhat dot com 2004-06-23 07:05 -------
>Subject: Re: [3.4 Regression] No NOP after LW (with
> -mips1 -O0)
>
>"mmitchel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
>
>
>>------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-06-23 06:55 -------
>>I think this one needs a bit more testing; apply it after 3.4.1 is out.
>>
>>
>
>Sorry to be pushy, but from whom? I don't think anyone other than me &
>David Billinghurst are testing CVS sources at the moment.
>
>
From whomever is using the MIPS toolchains, in general. :-)
Since this is on the mainline, people will be banging away on it, and if
there are problems, they'll likely find them.
These things are judgement calls -- it's always hard to justify them
precisely one way or the other. My instincts with this patch are a
little different from yours; I feel like it might cause problems, not
because it's wrong per se, but because it might trigger some other
weirdness. If it had gone in a month ago, I'd feel different.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15869] [3.4 Regression] No NOP after LW (with -mips1 -O0)
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
` (8 preceding siblings ...)
2004-06-23 16:04 ` mark at codesourcery dot com
@ 2004-06-23 17:00 ` rsandifo at redhat dot com
2004-07-07 6:28 ` cvs-commit at gcc dot gnu dot org
2004-07-07 6:33 ` rsandifo at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: rsandifo at redhat dot com @ 2004-06-23 17:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rsandifo at redhat dot com 2004-06-23 16:38 -------
Subject: Re: [3.4 Regression] No NOP after LW (with
-mips1 -O0)
"mark at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> writes:
> These things are judgement calls -- it's always hard to justify them
> precisely one way or the other. My instincts with this patch are a
> little different from yours; I feel like it might cause problems, not
> because it's wrong per se, but because it might trigger some other
> weirdness. If it had gone in a month ago, I'd feel different.
Fair enough ;) 3.4.2 it is.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15869] [3.4 Regression] No NOP after LW (with -mips1 -O0)
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
` (9 preceding siblings ...)
2004-06-23 17:00 ` rsandifo at redhat dot com
@ 2004-07-07 6:28 ` cvs-commit at gcc dot gnu dot org
2004-07-07 6:33 ` rsandifo at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-07-07 6:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-07-07 06:28 -------
Subject: Bug 15869
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: rsandifo@gcc.gnu.org 2004-07-07 06:28:20
Modified files:
gcc : ChangeLog
gcc/config/mips: mips.c
Log message:
PR target/15869
* config/mips/mips.c (mips_avoid_hazards): Call split_all_insns_noflow.
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.533&r2=2.2326.2.534
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/mips.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.362.4.13&r2=1.362.4.14
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15869] [3.4 Regression] No NOP after LW (with -mips1 -O0)
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
` (10 preceding siblings ...)
2004-07-07 6:28 ` cvs-commit at gcc dot gnu dot org
@ 2004-07-07 6:33 ` rsandifo at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2004-07-07 6:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rsandifo at gcc dot gnu dot org 2004-07-07 06:33 -------
Fixed for 3.4.2.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15869
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2004-07-07 6:33 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-08 8:10 [Bug c/15869] New: No NOP after LW (with -mips1 -O0) niva at niisi dot msk dot ru
2004-06-08 11:47 ` [Bug target/15869] " pinskia at gcc dot gnu dot org
2004-06-22 8:18 ` rsandifo at gcc dot gnu dot org
2004-06-22 21:28 ` cvs-commit at gcc dot gnu dot org
2004-06-22 21:32 ` rsandifo at gcc dot gnu dot org
2004-06-22 21:38 ` [Bug target/15869] [3.4 Regression] " pinskia at gcc dot gnu dot org
2004-06-23 6:55 ` rsandifo at gcc dot gnu dot org
2004-06-23 7:05 ` mmitchel at gcc dot gnu dot org
2004-06-23 7:10 ` rsandifo at redhat dot com
2004-06-23 16:04 ` mark at codesourcery dot com
2004-06-23 17:00 ` rsandifo at redhat dot com
2004-07-07 6:28 ` cvs-commit at gcc dot gnu dot org
2004-07-07 6:33 ` rsandifo 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).