]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add atomic and bswap functions to libcompiler_rt
authorDimitry Andric <dim@FreeBSD.org>
Tue, 25 Aug 2020 06:49:10 +0000 (06:49 +0000)
committerDimitry Andric <dim@FreeBSD.org>
Tue, 25 Aug 2020 06:49:10 +0000 (06:49 +0000)
commit46c8c5540fe4995e01fcf2e173c05761e7ba9488
tree6eafeb5c35272724a5c10d365a87384113eabcf6
parentb3fc6d66120ca5d1aacf123a1fd2f099aa7bf1b5
Add atomic and bswap functions to libcompiler_rt

There have been several mentions on our mailing lists about missing
atomic functions in our system libraries (e.g. __atomic_load_8 and
friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.

To address this, add implementations for the functions from compiler-rt
to the system compiler support libraries, e.g. libcompiler_rt.a and and
libgcc_s.so.

This also needs a small fixup in compiler-rt's atomic.c, to ensure that
32-bit mips can build correctly.

Bump __FreeBSD_version to make it easier for port maintainers to detect
when these functions were added.

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D26159
contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
lib/libcompiler_rt/Makefile.inc
sys/sys/param.h