[Bug target/78357] nios2 uses non-standard atomic functions
sebastian.huber@embedded-brains.de
gcc-bugzilla@gcc.gnu.org
Tue Nov 15 10:47:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78357
--- Comment #2 from Sebastian Huber <sebastian.huber@embedded-brains.de> ---
(In reply to Chung-Lin Tang from comment #1)
> Sebastian, I'm not sure what your problem is. The atomics in nios2 are
> implemented by __sync_* functions placed in libgcc. The built-in function
> expansion inside GCC is aware of this, and __atomic_* functions get mapped
> to those. Is there anything affecting your use?
I think this mapping of __atomic_* functions to __sync_* functions is
wrong/outdated. Is this a speciality of the Nios II support? I am not aware
of a second target support in GCC which does this. The __sync_* builtins are a
legacy API:
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html#g_t_005f_005fsync-Builtins
>
> libatomic is usually supported by those targets with more "rich" atomic
> instructions, and nios2 in its current form is obviously not one of them.
The libatomic is for architectures which lack atomic instructions.
More information about the Gcc-bugs
mailing list