public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/100461] New: [11/12 Regression] mingw build broken due to change of rdtsc implementation
@ 2021-05-06 20:14 daniel.f.starke at freenet dot de
  2021-05-06 20:54 ` [Bug target/100461] " ubizjak at gmail dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: daniel.f.starke at freenet dot de @ 2021-05-06 20:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100461
           Summary: [11/12 Regression] mingw build broken due to change of
                    rdtsc implementation
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: daniel.f.starke at freenet dot de
  Target Milestone: ---

GCC 11.1.0 build for mingw-w64 is broken now. Up to 10.3.0 the following was
used in gcc/config/i386/ia32intrin.h:
    extern __inline unsigned long long
    __attribute__((__gnu_inline__, __always_inline__, __artificial__))
    __rdtsc (void)
    {
      return __builtin_ia32_rdtsc ();
    }

    extern __inline unsigned long long
    __attribute__((__gnu_inline__, __always_inline__, __artificial__))
    __rdtscp (unsigned int *__A)
    {
      return __builtin_ia32_rdtscp (__A);
    }
but now we have just
    #define __rdtsc()               __builtin_ia32_rdtsc ()
    #define __rdtscp(a)             __builtin_ia32_rdtscp (a)
Changing this back fixes the build.
See also mingw-w64 7.0.0 at mingw-w64-crt/intrincs/rdtsc.c.

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

* [Bug target/100461] [11/12 Regression] mingw build broken due to change of rdtsc implementation
  2021-05-06 20:14 [Bug target/100461] New: [11/12 Regression] mingw build broken due to change of rdtsc implementation daniel.f.starke at freenet dot de
@ 2021-05-06 20:54 ` ubizjak at gmail dot com
  2021-05-06 22:29 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2021-05-06 20:54 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
CC author.

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

* [Bug target/100461] [11/12 Regression] mingw build broken due to change of rdtsc implementation
  2021-05-06 20:14 [Bug target/100461] New: [11/12 Regression] mingw build broken due to change of rdtsc implementation daniel.f.starke at freenet dot de
  2021-05-06 20:54 ` [Bug target/100461] " ubizjak at gmail dot com
@ 2021-05-06 22:29 ` pinskia at gcc dot gnu.org
  2021-05-06 22:54 ` hjl.tools at gmail dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-05-06 22:29 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-05-06
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
To me this looks like a bug in mingw-w64-crt rather than a bug in GCC.
A simple fix to the mingw-w64-crt sources is just do:

unsigned __int64 (__rdtsc)(void)

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

* [Bug target/100461] [11/12 Regression] mingw build broken due to change of rdtsc implementation
  2021-05-06 20:14 [Bug target/100461] New: [11/12 Regression] mingw build broken due to change of rdtsc implementation daniel.f.starke at freenet dot de
  2021-05-06 20:54 ` [Bug target/100461] " ubizjak at gmail dot com
  2021-05-06 22:29 ` pinskia at gcc dot gnu.org
@ 2021-05-06 22:54 ` hjl.tools at gmail dot com
  2021-05-07  4:25 ` daniel.f.starke at freenet dot de
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2021-05-06 22:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
What is in mingw-w64-crt/intrincs/rdtsc.c?

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

* [Bug target/100461] [11/12 Regression] mingw build broken due to change of rdtsc implementation
  2021-05-06 20:14 [Bug target/100461] New: [11/12 Regression] mingw build broken due to change of rdtsc implementation daniel.f.starke at freenet dot de
                   ` (2 preceding siblings ...)
  2021-05-06 22:54 ` hjl.tools at gmail dot com
@ 2021-05-07  4:25 ` daniel.f.starke at freenet dot de
  2021-05-07  7:15 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: daniel.f.starke at freenet dot de @ 2021-05-07  4:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Daniel Starke <daniel.f.starke at freenet dot de> ---
Created attachment 50772
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50772&action=edit
rdtsc.c

Please find attached the mingw-w64 file.

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

* [Bug target/100461] [11/12 Regression] mingw build broken due to change of rdtsc implementation
  2021-05-06 20:14 [Bug target/100461] New: [11/12 Regression] mingw build broken due to change of rdtsc implementation daniel.f.starke at freenet dot de
                   ` (3 preceding siblings ...)
  2021-05-07  4:25 ` daniel.f.starke at freenet dot de
@ 2021-05-07  7:15 ` rguenth at gcc dot gnu.org
  2021-05-07 12:11 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-07  7:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.2

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

* [Bug target/100461] [11/12 Regression] mingw build broken due to change of rdtsc implementation
  2021-05-06 20:14 [Bug target/100461] New: [11/12 Regression] mingw build broken due to change of rdtsc implementation daniel.f.starke at freenet dot de
                   ` (4 preceding siblings ...)
  2021-05-07  7:15 ` rguenth at gcc dot gnu.org
@ 2021-05-07 12:11 ` hjl.tools at gmail dot com
  2021-05-07 17:13 ` daniel.f.starke at freenet dot de
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2021-05-07 12:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Daniel Starke from comment #4)
> Created attachment 50772 [details]
> rdtsc.c
> 
> Please find attached the mingw-w64 file.

Please change

#if !__has_builtin(__rdtsc)

to

#if !__has_builtin(__rdtsc) && !defined __rdtsc

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

* [Bug target/100461] [11/12 Regression] mingw build broken due to change of rdtsc implementation
  2021-05-06 20:14 [Bug target/100461] New: [11/12 Regression] mingw build broken due to change of rdtsc implementation daniel.f.starke at freenet dot de
                   ` (5 preceding siblings ...)
  2021-05-07 12:11 ` hjl.tools at gmail dot com
@ 2021-05-07 17:13 ` daniel.f.starke at freenet dot de
  2021-05-07 19:49 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: daniel.f.starke at freenet dot de @ 2021-05-07 17:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Daniel Starke <daniel.f.starke at freenet dot de> ---
Thank you for the suggestion, however, I am not involved in the mingw-w64
project. Furthermore, the fact that this regression remains against all
versions of mingw-w64 known to date does not change.
It is also unclear to me why only these two intrinsics are handled differently
now. What was the purpose of this change? Do we break existing code if the
change is reverted?

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

* [Bug target/100461] [11/12 Regression] mingw build broken due to change of rdtsc implementation
  2021-05-06 20:14 [Bug target/100461] New: [11/12 Regression] mingw build broken due to change of rdtsc implementation daniel.f.starke at freenet dot de
                   ` (6 preceding siblings ...)
  2021-05-07 17:13 ` daniel.f.starke at freenet dot de
@ 2021-05-07 19:49 ` hjl.tools at gmail dot com
  2022-05-14  6:22 ` daniel.f.starke at freenet dot de
  2022-05-14  7:07 ` redi at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2021-05-07 19:49 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|WAITING                     |RESOLVED

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Daniel Starke from comment #6)
> Thank you for the suggestion, however, I am not involved in the mingw-w64
> project. Furthermore, the fact that this regression remains against all
> versions of mingw-w64 known to date does not change.

It doesn't make what mingw-w64 did is correct.

> It is also unclear to me why only these two intrinsics are handled
> differently now. What was the purpose of this change? Do we break existing
> code if the change is reverted?

See PR target/99744.

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

* [Bug target/100461] [11/12 Regression] mingw build broken due to change of rdtsc implementation
  2021-05-06 20:14 [Bug target/100461] New: [11/12 Regression] mingw build broken due to change of rdtsc implementation daniel.f.starke at freenet dot de
                   ` (7 preceding siblings ...)
  2021-05-07 19:49 ` hjl.tools at gmail dot com
@ 2022-05-14  6:22 ` daniel.f.starke at freenet dot de
  2022-05-14  7:07 ` redi at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: daniel.f.starke at freenet dot de @ 2022-05-14  6:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Daniel Starke <daniel.f.starke at freenet dot de> ---
This bug was fixes in mingw-w64. The bug fix is included since versions 8.0.1.
See
https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/thread/bb03f15f-db70-a511-a10d-396fbd8cf3c1%40126.com/#msg37259429
The bug report here can be closed.

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

* [Bug target/100461] [11/12 Regression] mingw build broken due to change of rdtsc implementation
  2021-05-06 20:14 [Bug target/100461] New: [11/12 Regression] mingw build broken due to change of rdtsc implementation daniel.f.starke at freenet dot de
                   ` (8 preceding siblings ...)
  2022-05-14  6:22 ` daniel.f.starke at freenet dot de
@ 2022-05-14  7:07 ` redi at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2022-05-14  7:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It was already closed a year ago.

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

end of thread, other threads:[~2022-05-14  7:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 20:14 [Bug target/100461] New: [11/12 Regression] mingw build broken due to change of rdtsc implementation daniel.f.starke at freenet dot de
2021-05-06 20:54 ` [Bug target/100461] " ubizjak at gmail dot com
2021-05-06 22:29 ` pinskia at gcc dot gnu.org
2021-05-06 22:54 ` hjl.tools at gmail dot com
2021-05-07  4:25 ` daniel.f.starke at freenet dot de
2021-05-07  7:15 ` rguenth at gcc dot gnu.org
2021-05-07 12:11 ` hjl.tools at gmail dot com
2021-05-07 17:13 ` daniel.f.starke at freenet dot de
2021-05-07 19:49 ` hjl.tools at gmail dot com
2022-05-14  6:22 ` daniel.f.starke at freenet dot de
2022-05-14  7:07 ` redi 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).