[Bug target/93177] PPC: Missing many useful platform intrinsics

2022-10-28 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #22 from Sergey Fedorov --- (In reply to Iain Sandoe from comment #19) > Created attachment 53779 [details] > introduce ppc_intrinsics.h for powerpc*-darwin. > > This takes the header from the GCC-4.x apple debt branch (as present in

[Bug target/93177] PPC: Missing many useful platform intrinsics

2022-10-26 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #21 from Iain Sandoe --- (In reply to Segher Boessenkool from comment #18) > (In reply to Sergey Fedorov from comment #16) > > For Darwin, PPC intrinsics already is there in Apple headers. Can it be > > added into current GCC? > > If

[Bug target/93177] PPC: Missing many useful platform intrinsics

2022-10-26 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #20 from Iain Sandoe --- the patch above does not seek to answer questions on validity - it simply publishes the same header that was made available in the darwin toolchains (so will be neither better nor worse than that)>

[Bug target/93177] PPC: Missing many useful platform intrinsics

2022-10-26 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #19 from Iain Sandoe --- Created attachment 53779 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53779&action=edit introduce ppc_intrinsics.h for powerpc*-darwin. This takes the header from the GCC-4.x apple debt branch (as pre

[Bug target/93177] PPC: Missing many useful platform intrinsics

2022-10-26 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #18 from Segher Boessenkool --- (In reply to Sergey Fedorov from comment #16) > For Darwin, PPC intrinsics already is there in Apple headers. Can it be > added into current GCC? If it is in the Apple headers already, why would you ne

[Bug target/93177] PPC: Missing many useful platform intrinsics

2022-10-26 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #17 from Iain Sandoe --- (In reply to Sergey Fedorov from comment #16) > For Darwin, PPC intrinsics already is there in Apple headers. Can it be > added into current GCC? There is a version of the header on the FSF Apple branch, whic

[Bug target/93177] PPC: Missing many useful platform intrinsics

2022-10-26 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #16 from Sergey Fedorov --- For Darwin, PPC intrinsics already is there in Apple headers. Can it be added into current GCC?

[Bug target/93177] PPC: Missing many useful platform intrinsics

2022-10-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 Andrew Pinski changed: What|Removed |Added CC||vital.had at gmail dot com --- Comment #

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-24 Thread memmerto at ca dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #14 from Matt Emmerton --- I'd like to thank everyone for the great discussion so far. Here's a summary of where we are at this point. 1) sync intrinsics Useful, but with caveats. 2) cache prefetch intrinsics Implemented via __bui

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-23 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #13 from Segher Boessenkool --- You cannot use that from intrinsics. But the target code can do similar of course, whether or not asm syntax for this exists.

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #12 from Andrew Pinski --- If PowerPC back-end supported the "Flag Output Operands" part of GCC's inline-asm, you could use that to do the correct thing. But sadly PowerPC does not currently. https://gcc.gnu.org/onlinedocs/gcc/Exten

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-23 Thread memmerto at ca dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #11 from Matt Emmerton --- > > > > The implementation of stwcx() and stdcx() need revision on PPC. > > > > As I understand it, there is no need the mfocrf instruction nor the > > > > mask-and-shift on result. > > > > > > How else wou

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-23 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #10 from Segher Boessenkool --- (In reply to Matt Emmerton from comment #9) > > > __sync() > > > __isync() > > > __lwsync() > > > > The sync intrinsics need to be tied to some other code. A volatile asm with > > a "memory" clobber i

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-13 Thread memmerto at ca dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #9 from Matt Emmerton --- (In reply to Segher Boessenkool from comment #6) > (In reply to Matt Emmerton from comment #4) > > The intrinsics that we would find useful, having used them as provided by > > the IBM XL C/C++ compiler, are

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-13 Thread memmerto at ca dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #8 from Matt Emmerton --- (In reply to Andrew Pinski from comment #5) > > __lwarx() > > __ldarx() > > __stwcx() > > __stdcx() > > Is there a reason why the __atomic_* builtins don't work? There are places in our code where we do man

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-11 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #7 from Segher Boessenkool --- (In reply to Andrew Pinski from comment #5) > >the cntlz ones are not, for example > > :) It has been a long time since I touched this but I would not doubt I > messed up this too. It's nastiness in t

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-11 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #6 from Segher Boessenkool --- (In reply to Matt Emmerton from comment #4) > The intrinsics that we would find useful, having used them as provided by > the IBM XL C/C++ compiler, are the following: > > __sync() > __isync() > __lwsyn

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-10 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-10 Thread memmerto at ca dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #4 from Matt Emmerton --- The intrinsics that we would find useful, having used them as provided by the IBM XL C/C++ compiler, are the following: __sync() __isync() __lwsync() __dcbt() __dcbtst() __lwarx() __ldarx() __stwcx() __std

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-10 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #3 from Segher Boessenkool --- Okay, I'll bite. Which of the functions/macros in ppu_intrinsics.h would you find useful? Have you checked whether the implementation is good for your purpose, or if they even are correct (the cntlz one

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-08 Thread memmerto at ca dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #2 from Matt Emmerton --- This appears to have packaging complications by vendors as well :( On powerpc-ibm-aix7.1.0.0 this doesn't get installed. On ppc64le-redhat-linux it does. However, both of these cases would benefit from some

[Bug target/93177] PPC: Missing many useful platform intrinsics

2020-01-07 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177 --- Comment #1 from Andrew Pinski --- ppu_intrinsics.h is installed for all powerpc* configs. Though to use it you need to compile with -mcpu=cell :)