[Bug libgcc/56300] New: Add __sync_fetch_and_add_8 and other 8-byte atomic functions to 32-bit MIPS targets
chaoyingfu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 12 22:05:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56300
Bug #: 56300
Summary: Add __sync_fetch_and_add_8 and other 8-byte atomic
functions to 32-bit MIPS targets
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: chaoyingfu@gcc.gnu.org
There is no hardware support for 8 bytes atomic operations on 32-bit MIPS
targets. Unfortunately, programmers still want to use them. Ex: please check
this webkit bug: https://bugs.webkit.org/show_bug.cgi?id=106739 and the
following example.
Ex:
fu@debian6:~/dev/test$ cat sync.c
long long K;
void main()
{
__sync_fetch_and_add(&K, 1);
}
fu@debian6:~/dev/test$ gcc -o sync sync.c
/tmp/ccUoSg9M.o: In function `main':
sync.c:(.text+0x28): undefined reference to `__sync_fetch_and_add_8'
collect2: ld returned 1 exit status
That will be great, if we can add missing atomic functions (via pthread
implementation or other methods) to libgcc for 32-bit MIPS targets.
Thanks a lot!
More information about the Gcc-bugs
mailing list