public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107726] New: Multiple bugs related to __gnu__::__target__
@ 2022-11-16 21:00 unlvsur at live dot com
  2022-11-16 21:01 ` [Bug c++/107726] " unlvsur at live dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: unlvsur at live dot com @ 2022-11-16 21:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107726
           Summary: Multiple bugs related to __gnu__::__target__
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

1. On Linux. the ld linker does not work. Only gold linker would work. (Sounds
like a linker bug) 
./sha512 a_file
./sha512: error while loading shared libraries: unexpected PLT reloc type 0x00


2. On x86_64-w64-mingw32 target.
../../include/fast_io_crypto/hash/sha512_simd16.h:68:13: error: multiversioning
needs 'ifunc' which is not supported on this target

And I tried clang with lld and yes it works even on windows.

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

* [Bug c++/107726] Multiple bugs related to __gnu__::__target__
  2022-11-16 21:00 [Bug c++/107726] New: Multiple bugs related to __gnu__::__target__ unlvsur at live dot com
@ 2022-11-16 21:01 ` unlvsur at live dot com
  2022-11-16 21:11 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: unlvsur at live dot com @ 2022-11-16 21:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from cqwrteur <unlvsur at live dot com> ---
#if __has_cpp_attribute(__gnu__::__target__) && defined(__SSE2__) &&
!defined(__AVX2__)
[[__gnu__::__target__("default")]]
#elif __has_cpp_attribute(__gnu__::__flatten__)
[[__gnu__::__flatten__]]
#endif
inline void sha512_runtime_routine(std::uint_least64_t* __restrict
state,std::byte const* __restrict blocks_start,std::byte const* __restrict
blocks_last) noexcept;

#if __has_cpp_attribute(__gnu__::__target__) && defined(__SSE2__) &&
!defined(__AVX2__)
[[__gnu__::__target__("avx2")]]
#elif __has_cpp_attribute(__gnu__::__flatten__)
[[__gnu__::__flatten__]]
#endif
inline void sha512_runtime_routine(std::uint_least64_t* __restrict
state,std::byte const* __restrict blocks_start,std::byte const* __restrict
blocks_last) noexcept;

Something like this.

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

* [Bug c++/107726] Multiple bugs related to __gnu__::__target__
  2022-11-16 21:00 [Bug c++/107726] New: Multiple bugs related to __gnu__::__target__ unlvsur at live dot com
  2022-11-16 21:01 ` [Bug c++/107726] " unlvsur at live dot com
@ 2022-11-16 21:11 ` pinskia at gcc dot gnu.org
  2022-11-16 21:12 ` [Bug target/107726] " pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-16 21:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-11-16

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
We have tests for multiversioning and they are passing with BFD ld.

Also multiversioning requires ifunc support which is not implemented for
Windows (I don't know how clang implements theirs, maybe they do a check at the
beginging of the function to see if a function pointer was assigned).

For 1, can you provide a full testcase which is failing?

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

* [Bug target/107726] Multiple bugs related to __gnu__::__target__
  2022-11-16 21:00 [Bug c++/107726] New: Multiple bugs related to __gnu__::__target__ unlvsur at live dot com
  2022-11-16 21:01 ` [Bug c++/107726] " unlvsur at live dot com
  2022-11-16 21:11 ` pinskia at gcc dot gnu.org
@ 2022-11-16 21:12 ` pinskia at gcc dot gnu.org
  2022-11-16 21:16 ` unlvsur at live dot com
  2022-11-16 21:44 ` unlvsur at live dot com
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-16 21:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-w64-mingw32,         |x86_64-linux-gnu
                   |x86_64-linux-gnu            |
          Component|c++                         |target

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Also please file an different issue for the non-ifunc case since it is a new
feature.

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

* [Bug target/107726] Multiple bugs related to __gnu__::__target__
  2022-11-16 21:00 [Bug c++/107726] New: Multiple bugs related to __gnu__::__target__ unlvsur at live dot com
                   ` (2 preceding siblings ...)
  2022-11-16 21:12 ` [Bug target/107726] " pinskia at gcc dot gnu.org
@ 2022-11-16 21:16 ` unlvsur at live dot com
  2022-11-16 21:44 ` unlvsur at live dot com
  4 siblings, 0 replies; 6+ messages in thread
From: unlvsur at live dot com @ 2022-11-16 21:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #3)
> Also please file an different issue for the non-ifunc case since it is a new
> feature.

https://godbolt.org/z/z5cexGEMK

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

* [Bug target/107726] Multiple bugs related to __gnu__::__target__
  2022-11-16 21:00 [Bug c++/107726] New: Multiple bugs related to __gnu__::__target__ unlvsur at live dot com
                   ` (3 preceding siblings ...)
  2022-11-16 21:16 ` unlvsur at live dot com
@ 2022-11-16 21:44 ` unlvsur at live dot com
  4 siblings, 0 replies; 6+ messages in thread
From: unlvsur at live dot com @ 2022-11-16 21:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #2)
> We have tests for multiversioning and they are passing with BFD ld.
> 
> Also multiversioning requires ifunc support which is not implemented for
> Windows (I don't know how clang implements theirs, maybe they do a check at
> the beginging of the function to see if a function pointer was assigned).
> 
> For 1, can you provide a full testcase which is failing?

https://sourceware.org/bugzilla/show_bug.cgi?id=29797(In reply to Andrew Pinski
from comment #3)

> Also please file an different issue for the non-ifunc case since it is a new
> feature.

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

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

end of thread, other threads:[~2022-11-16 21:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16 21:00 [Bug c++/107726] New: Multiple bugs related to __gnu__::__target__ unlvsur at live dot com
2022-11-16 21:01 ` [Bug c++/107726] " unlvsur at live dot com
2022-11-16 21:11 ` pinskia at gcc dot gnu.org
2022-11-16 21:12 ` [Bug target/107726] " pinskia at gcc dot gnu.org
2022-11-16 21:16 ` unlvsur at live dot com
2022-11-16 21:44 ` unlvsur at live dot com

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).