public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/13423] sh-elf: V4SFmode passed in integer registers
[not found] <bug-13423-4@http.gcc.gnu.org/bugzilla/>
@ 2013-03-09 15:07 ` olegendo at gcc dot gnu.org
2013-03-11 19:56 ` olegendo at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-03-09 15:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13423
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |olegendo at gcc dot gnu.org
--- Comment #3 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-03-09 15:07:11 UTC ---
Although this is an ABI issue, passing float vector by reference should not
actually suffer from this problem, but it does:
typedef float v4sf __attribute__ ((vector_size (16)));
void test00 (v4sf& a, const v4sf& b)
{
a += b;
}
compiled with '-O2 -m4-single -ml' (rev 196483) results in:
mov.l @r5,r1
mov #4,r0
fmov.s @r4,fr5
lds r1,fpul
mov.l @(4,r5),r1
fsts fpul,fr4
fadd fr5,fr4
lds r1,fpul
mov.l @(8,r5),r1
fsts fpul,fr3
lds r1,fpul
mov.l @(12,r5),r1
fmov.s @(r0,r4),fr5
mov #8,r0
fsts fpul,fr2
lds r1,fpul
fadd fr5,fr3
fsts fpul,fr1
flds fr4,fpul
sts fpul,r1
fmov.s @(r0,r4),fr5
mov #12,r0
flds fr3,fpul
fadd fr5,fr2
fmov.s @(r0,r4),fr5
mov.l r1,@r4
sts fpul,r1
fadd fr5,fr1
flds fr2,fpul
mov.l r1,@(4,r4)
sts fpul,r1
flds fr1,fpul
mov.l r1,@(8,r4)
sts fpul,r1
rts
mov.l r1,@(12,r4)
ideally, this would be something like (no insn scheduling applied):
fmov.s @r4+,fr0
fmov.s @r4+,fr1
fmov.s @r4+,fr2
fmov.s @r4+,fr3
fmov.s @r5+,fr4
fmov.s @r5+,fr5
fmov.s @r5+,fr6
fmov.s @r5+,fr7
fadd fr4,fr0
fadd fr5,fr1
fadd fr6,fr2
fadd fr7,fr3
fmov.s fr3,@-r4
fmov.s fr2,@-r4
fmov.s fr1,@-r4
fmov.s fr0,@-r4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/13423] sh-elf: V4SFmode passed in integer registers
[not found] <bug-13423-4@http.gcc.gnu.org/bugzilla/>
2013-03-09 15:07 ` [Bug target/13423] sh-elf: V4SFmode passed in integer registers olegendo at gcc dot gnu.org
@ 2013-03-11 19:56 ` olegendo at gcc dot gnu.org
2014-12-14 13:55 ` olegendo at gcc dot gnu.org
2015-10-26 11:45 ` olegendo at gcc dot gnu.org
3 siblings, 0 replies; 6+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-03-11 19:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13423
--- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-03-11 19:56:20 UTC ---
(In reply to comment #3)
>
> ideally, this would be something like (no insn scheduling applied):
>
> fmov.s @r4+,fr0
> fmov.s @r4+,fr1
> fmov.s @r4+,fr2
> fmov.s @r4+,fr3
>
> fmov.s @r5+,fr4
> fmov.s @r5+,fr5
> fmov.s @r5+,fr6
> fmov.s @r5+,fr7
>
> fadd fr4,fr0
> fadd fr5,fr1
> fadd fr6,fr2
> fadd fr7,fr3
>
> fmov.s fr3,@-r4
> fmov.s fr2,@-r4
> fmov.s fr1,@-r4
> fmov.s fr0,@-r4
Which would probably require a working address mode selection optimization
pass, see PR 56590.
As for the ABI issue when passing vectors by value, I've created PR 56592 that
describes a proposed new vector ABI for SH.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/13423] sh-elf: V4SFmode passed in integer registers
[not found] <bug-13423-4@http.gcc.gnu.org/bugzilla/>
2013-03-09 15:07 ` [Bug target/13423] sh-elf: V4SFmode passed in integer registers olegendo at gcc dot gnu.org
2013-03-11 19:56 ` olegendo at gcc dot gnu.org
@ 2014-12-14 13:55 ` olegendo at gcc dot gnu.org
2015-10-26 11:45 ` olegendo at gcc dot gnu.org
3 siblings, 0 replies; 6+ messages in thread
From: olegendo at gcc dot gnu.org @ 2014-12-14 13:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13423
--- Comment #6 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Note:
For things like:
#pragma pack (4)
struct x
{
int a;
v4sf b;
};
vec_load_lanesmn and vec_store_lanesmn patterns should probably also be
implemented.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/13423] sh-elf: V4SFmode passed in integer registers
[not found] <bug-13423-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2014-12-14 13:55 ` olegendo at gcc dot gnu.org
@ 2015-10-26 11:45 ` olegendo at gcc dot gnu.org
3 siblings, 0 replies; 6+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-10-26 11:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13423
--- Comment #7 from Oleg Endo <olegendo at gcc dot gnu.org> ---
See also PR 68091
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/13423] sh-elf: V4SFmode passed in integer registers
2003-12-18 3:20 [Bug c/13423] New: " tm at kloo dot net
2003-12-18 3:23 ` [Bug target/13423] " pinskia at gcc dot gnu dot org
@ 2004-07-29 6:10 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-29 6:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-29 06:10 -------
This is an ABI issue.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ABI
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13423
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/13423] sh-elf: V4SFmode passed in integer registers
2003-12-18 3:20 [Bug c/13423] New: " tm at kloo dot net
@ 2003-12-18 3:23 ` pinskia at gcc dot gnu dot org
2004-07-29 6:10 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-18 3:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-18 00:46 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c |target
Ever Confirmed| |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2003-12-18 00:46:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13423
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-26 11:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-13423-4@http.gcc.gnu.org/bugzilla/>
2013-03-09 15:07 ` [Bug target/13423] sh-elf: V4SFmode passed in integer registers olegendo at gcc dot gnu.org
2013-03-11 19:56 ` olegendo at gcc dot gnu.org
2014-12-14 13:55 ` olegendo at gcc dot gnu.org
2015-10-26 11:45 ` olegendo at gcc dot gnu.org
2003-12-18 3:20 [Bug c/13423] New: " tm at kloo dot net
2003-12-18 3:23 ` [Bug target/13423] " pinskia at gcc dot gnu dot org
2004-07-29 6:10 ` 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).