public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/105879] New: DI mode constants are incorrectly loaded into registers on big-endian xtensa
@ 2022-06-08 4:07 jcmvbkbc at gcc dot gnu.org
2022-06-08 4:27 ` [Bug target/105879] " jcmvbkbc at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: jcmvbkbc at gcc dot gnu.org @ 2022-06-08 4:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105879
Bug ID: 105879
Summary: DI mode constants are incorrectly loaded into
registers on big-endian xtensa
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: jcmvbkbc at gcc dot gnu.org
Target Milestone: ---
A lot of testsuite tests are failing in big-endian xtensa configuration, e.g.
gcc.c-torture/execute/20001031-1.c
For the following part
long long t4 (void)
{
long long i;
t3 ((i = 4096) + 0x7fffffffULL);
return i;
}
in the generated assembly I see the following:
.literal .LC7, -2147479553
.literal .LC8, t3@PLT
.literal .LC9, 4096
.align 4
.global t4
.type t4, @function
t4:
entry sp, 32
movi.n a3, 0
l32r a10, .LC7
mov.n a11, a3
l32r a8, .LC8
callx8 a8
l32r a2, .LC9
retw.n
(i.e. 0 in a11), while it should've been the following (i.e. 0 in a10):
.literal .LC7, -2147479553
.literal .LC8, t3@PLT
.literal .LC9, 4096
.align 4
.global t4
.type t4, @function
t4:
entry sp, 32
movi.n a2, 0
mov.n a10, a2
l32r a11, .LC7
l32r a8, .LC8
callx8 a8
l32r a3, .LC9
retw.n
This regression clearly traces back to the commit 64a54505ec82 ("gcc: xtensa:
rearrange DI mode constant loading") and is present in gcc-11.1+ and gcc-12.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/105879] DI mode constants are incorrectly loaded into registers on big-endian xtensa
2022-06-08 4:07 [Bug target/105879] New: DI mode constants are incorrectly loaded into registers on big-endian xtensa jcmvbkbc at gcc dot gnu.org
@ 2022-06-08 4:27 ` jcmvbkbc at gcc dot gnu.org
2022-06-08 15:48 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jcmvbkbc at gcc dot gnu.org @ 2022-06-08 4:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105879
jcmvbkbc at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |jcmvbkbc at gcc dot gnu.org
Last reconfirmed| |2022-06-08
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/105879] DI mode constants are incorrectly loaded into registers on big-endian xtensa
2022-06-08 4:07 [Bug target/105879] New: DI mode constants are incorrectly loaded into registers on big-endian xtensa jcmvbkbc at gcc dot gnu.org
2022-06-08 4:27 ` [Bug target/105879] " jcmvbkbc at gcc dot gnu.org
@ 2022-06-08 15:48 ` cvs-commit at gcc dot gnu.org
2022-06-08 16:17 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-08 15:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105879
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Max Filippov <jcmvbkbc@gcc.gnu.org>:
https://gcc.gnu.org/g:e94c6dbfb57a862dd8a8685eabc4886ad1aaea25
commit r13-1015-ge94c6dbfb57a862dd8a8685eabc4886ad1aaea25
Author: Max Filippov <jcmvbkbc@gmail.com>
Date: Tue Jun 7 21:01:01 2022 -0700
gcc: xtensa: fix PR target/105879
split_double operates with the 'word that comes first in memory in the
target' terminology, while gen_lowpart operates with the 'value
representing some low-order bits of X' terminology. They are not
equivalent and must be dealt with differently on little- and big-endian
targets.
gcc/
PR target/105879
* config/xtensa/xtensa.md (movdi): Rename 'first' and 'second'
to 'lowpart' and 'highpart' so that they match 'gen_lowpart' and
'gen_highpart' bitwise semantics and fix order of highpart and
lowpart depending on target endianness.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/105879] DI mode constants are incorrectly loaded into registers on big-endian xtensa
2022-06-08 4:07 [Bug target/105879] New: DI mode constants are incorrectly loaded into registers on big-endian xtensa jcmvbkbc at gcc dot gnu.org
2022-06-08 4:27 ` [Bug target/105879] " jcmvbkbc at gcc dot gnu.org
2022-06-08 15:48 ` cvs-commit at gcc dot gnu.org
@ 2022-06-08 16:17 ` cvs-commit at gcc dot gnu.org
2022-06-08 16:25 ` cvs-commit at gcc dot gnu.org
2022-06-08 16:27 ` jcmvbkbc at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-08 16:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105879
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Max Filippov
<jcmvbkbc@gcc.gnu.org>:
https://gcc.gnu.org/g:777a80af43eebb7506937cf04b54f17c4fce2b8e
commit r12-8466-g777a80af43eebb7506937cf04b54f17c4fce2b8e
Author: Max Filippov <jcmvbkbc@gmail.com>
Date: Tue Jun 7 21:01:01 2022 -0700
gcc: xtensa: fix PR target/105879
split_double operates with the 'word that comes first in memory in the
target' terminology, while gen_lowpart operates with the 'value
representing some low-order bits of X' terminology. They are not
equivalent and must be dealt with differently on little- and big-endian
targets.
gcc/
PR target/105879
* config/xtensa/xtensa.md (movdi): Rename 'first' and 'second'
to 'lowpart' and 'highpart' so that they match 'gen_lowpart' and
'gen_highpart' bitwise semantics and fix order of highpart and
lowpart depending on target endianness.
(cherry picked from commit e94c6dbfb57a862dd8a8685eabc4886ad1aaea25)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/105879] DI mode constants are incorrectly loaded into registers on big-endian xtensa
2022-06-08 4:07 [Bug target/105879] New: DI mode constants are incorrectly loaded into registers on big-endian xtensa jcmvbkbc at gcc dot gnu.org
` (2 preceding siblings ...)
2022-06-08 16:17 ` cvs-commit at gcc dot gnu.org
@ 2022-06-08 16:25 ` cvs-commit at gcc dot gnu.org
2022-06-08 16:27 ` jcmvbkbc at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-08 16:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105879
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Max Filippov
<jcmvbkbc@gcc.gnu.org>:
https://gcc.gnu.org/g:ee9cd6d6e504cb67b27b1a5e39f965bafd62653b
commit r11-10054-gee9cd6d6e504cb67b27b1a5e39f965bafd62653b
Author: Max Filippov <jcmvbkbc@gmail.com>
Date: Tue Jun 7 21:01:01 2022 -0700
gcc: xtensa: fix PR target/105879
split_double operates with the 'word that comes first in memory in the
target' terminology, while gen_lowpart operates with the 'value
representing some low-order bits of X' terminology. They are not
equivalent and must be dealt with differently on little- and big-endian
targets.
gcc/
PR target/105879
* config/xtensa/xtensa.md (movdi): Rename 'first' and 'second'
to 'lowpart' and 'highpart' so that they match 'gen_lowpart' and
'gen_highpart' bitwise semantics and fix order of highpart and
lowpart depending on target endianness.
(cherry picked from commit e94c6dbfb57a862dd8a8685eabc4886ad1aaea25)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/105879] DI mode constants are incorrectly loaded into registers on big-endian xtensa
2022-06-08 4:07 [Bug target/105879] New: DI mode constants are incorrectly loaded into registers on big-endian xtensa jcmvbkbc at gcc dot gnu.org
` (3 preceding siblings ...)
2022-06-08 16:25 ` cvs-commit at gcc dot gnu.org
@ 2022-06-08 16:27 ` jcmvbkbc at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jcmvbkbc at gcc dot gnu.org @ 2022-06-08 16:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105879
jcmvbkbc at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from jcmvbkbc at gcc dot gnu.org ---
Fix committed to master and gcc-11 and gcc-12 branches.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-08 16:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 4:07 [Bug target/105879] New: DI mode constants are incorrectly loaded into registers on big-endian xtensa jcmvbkbc at gcc dot gnu.org
2022-06-08 4:27 ` [Bug target/105879] " jcmvbkbc at gcc dot gnu.org
2022-06-08 15:48 ` cvs-commit at gcc dot gnu.org
2022-06-08 16:17 ` cvs-commit at gcc dot gnu.org
2022-06-08 16:25 ` cvs-commit at gcc dot gnu.org
2022-06-08 16:27 ` jcmvbkbc at gcc dot gnu.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).