public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/82028] Windows x86_64 should not pass float aggregates in xmm
       [not found] <bug-82028-4@http.gcc.gnu.org/bugzilla/>
@ 2022-01-12 14:22 ` lh_mouse at 126 dot com
  2022-01-12 15:15 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: lh_mouse at 126 dot com @ 2022-01-12 14:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82028

LIU Hao <lh_mouse at 126 dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lh_mouse at 126 dot com

--- Comment #2 from LIU Hao <lh_mouse at 126 dot com> ---
As per
<https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170#parameter-passing>

> Structs and unions of size 8, 16, 32, or 64 bits, and __m64 types, are 
> passed as if they were integers of the same size. Structs or unions of 
> other sizes are passed as a pointer to memory allocated by the caller.

GCC behavior seems incorrect.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/82028] Windows x86_64 should not pass float aggregates in xmm
       [not found] <bug-82028-4@http.gcc.gnu.org/bugzilla/>
  2022-01-12 14:22 ` [Bug target/82028] Windows x86_64 should not pass float aggregates in xmm lh_mouse at 126 dot com
@ 2022-01-12 15:15 ` rguenth at gcc dot gnu.org
  2022-01-13  5:07 ` 10walls at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-12 15:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82028

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |10walls at gmail dot com
   Last reconfirmed|                            |2022-01-12

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Thus confirmed.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/82028] Windows x86_64 should not pass float aggregates in xmm
       [not found] <bug-82028-4@http.gcc.gnu.org/bugzilla/>
  2022-01-12 14:22 ` [Bug target/82028] Windows x86_64 should not pass float aggregates in xmm lh_mouse at 126 dot com
  2022-01-12 15:15 ` rguenth at gcc dot gnu.org
@ 2022-01-13  5:07 ` 10walls at gmail dot com
  2023-01-14 12:10 ` nightstrike at gmail dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: 10walls at gmail dot com @ 2022-01-13  5:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82028

--- Comment #4 from jon_y <10walls at gmail dot com> ---
I can't seem to change the bug status to confirmed.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/82028] Windows x86_64 should not pass float aggregates in xmm
       [not found] <bug-82028-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2022-01-13  5:07 ` 10walls at gmail dot com
@ 2023-01-14 12:10 ` nightstrike at gmail dot com
  2023-04-06 12:18 ` lh_mouse at 126 dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: nightstrike at gmail dot com @ 2023-01-14 12:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82028

nightstrike <nightstrike at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nightstrike at gmail dot com

--- Comment #5 from nightstrike <nightstrike at gmail dot com> ---
(In reply to jon_y from comment #4)
> I can't seem to change the bug status to confirmed.

"NEW" is confirmed

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/82028] Windows x86_64 should not pass float aggregates in xmm
       [not found] <bug-82028-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2023-01-14 12:10 ` nightstrike at gmail dot com
@ 2023-04-06 12:18 ` lh_mouse at 126 dot com
  2023-04-06 15:09 ` lh_mouse at 126 dot com
  2023-04-10 12:44 ` ebotcazou at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: lh_mouse at 126 dot com @ 2023-04-06 12:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82028

--- Comment #6 from LIU Hao <lh_mouse at 126 dot com> ---
Looks like this has been fixed?  https://gcc.godbolt.org/z/xP5E76aYz

Despite that however, GCC generates suboptimal code that uses an XMM register
to perform the bitwise AND operation.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/82028] Windows x86_64 should not pass float aggregates in xmm
       [not found] <bug-82028-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2023-04-06 12:18 ` lh_mouse at 126 dot com
@ 2023-04-06 15:09 ` lh_mouse at 126 dot com
  2023-04-10 12:44 ` ebotcazou at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: lh_mouse at 126 dot com @ 2023-04-06 15:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82028

--- Comment #7 from LIU Hao <lh_mouse at 126 dot com> ---
clang generates 14 bytes:

```
mov rax, 0x7FFFFFFFFFFFFFFF   # 48 B8 FF FF FF FF FF FF FF 7F
and rax, rcx                  # 48 23 C1
ret                           # C3
``

but in principle this function requires only 8 bytes:

```
lea rax, qword ptr [rcx + rcx]    # 48 8D 04 09
shr rax, 1                        # 48 D1 E8
ret                               # C3
``

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/82028] Windows x86_64 should not pass float aggregates in xmm
       [not found] <bug-82028-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2023-04-06 15:09 ` lh_mouse at 126 dot com
@ 2023-04-10 12:44 ` ebotcazou at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-04-10 12:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82028

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE
                 CC|                            |ebotcazou at gcc dot gnu.org

--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Fixed in 9.3 and later.

*** This bug has been marked as a duplicate of bug 85667 ***

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-04-10 12:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-82028-4@http.gcc.gnu.org/bugzilla/>
2022-01-12 14:22 ` [Bug target/82028] Windows x86_64 should not pass float aggregates in xmm lh_mouse at 126 dot com
2022-01-12 15:15 ` rguenth at gcc dot gnu.org
2022-01-13  5:07 ` 10walls at gmail dot com
2023-01-14 12:10 ` nightstrike at gmail dot com
2023-04-06 12:18 ` lh_mouse at 126 dot com
2023-04-06 15:09 ` lh_mouse at 126 dot com
2023-04-10 12:44 ` ebotcazou 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).