On Mon, 2020-08-10 at 13:51 +0300, Darius Galis wrote: > > I've found the following patch > https://gcc.gnu.org/legacy-ml/gcc-patches/2018-11/msg00983.html, but it > is not in the latest sources. > Could please let me know why it was not added? I'm willing to do any > rework necessary in order for it to be accepted to the latest sources.
I think it'd be better to fix and/or improve the backend code so that the compiler generates the bset instruction automatically. Otherwise this built-in is not very useful for user code. Except for the use case of atomic-or on byte memory location, as a "side effect". But that should be implemented as such -- as atomics. There are a couple of PRs that might be relevant/interesting https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93587 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83832 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81823 Cheers, Oleg