[Bug target/86005] [RISCV] Invalid intermixing of __atomic_* libcalls and inline atomic instruction sequences
wilson at tuliptree dot org
gcc-bugzilla@gcc.gnu.org
Thu May 31 20:10:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86005
--- Comment #6 from Jim Wilson <wilson at tuliptree dot org> ---
On Thu, 2018-05-31 at 15:07 +0000, foom at fuhm dot net wrote:
> (But also, why doesn't it implement __atomic_add_fetch inline?)
If you don't have atomic instructions, then we call an out-of-line
function that uses locks.
If you have atomic instructions, and it is a 32/64-bit operation, then
we inline it.
If you have atomic instructions, and it is a 8/16-bit operation, then
we call a lock free out-of-line function that uses a sequence of
instructions to implement it using 32/64-bit atomic instructions. And
as mentioned previously, I have an unfinished prototype patch to fix
this by emitting the sequence of instructions inline.
More information about the Gcc-bugs
mailing list