gcc/libgcc/config
Richard Earnshaw 439779bace arm: libgcc: provide implementations of __sync_synchronize
Prior to Armv6 there was no architected method to synchronize data
across processors.  Armv6 saw the first introduction of
multi-processor support, using a CP15 operation; but this was
deprecated in Armv7 and is not supported on m-profile devices of any
form.  Armv7 (and armv6-m) and later support data synchronization via
the DMB instruction.

This all leads to difficulties when linking programs as the user
generally needs to know which synchronization method is needed, but
there seems no easy way around this, when there are no OS-related
primitives available.

I've addressed this by adding multiple variants of __sync_synchronize
to libgcc, one for each of the above use cases.  I've named these
__sync_synchronize_none, __sync_synchronize_cp15dmb and
__sync_synchronize_dmb.  I've also added three specs files that can be
used to direct the linker to pick the appropriate implementation.
Using specs fragments for this is preferable to directing the user to
directly use --defsym as the latter has to be placed at the correct
position on the command line to be effective and the spec rule ensures
this automatically.

I've also added a default implementation of __sync_synchronize.  The
default implementation will use DMB if that is available in the target
ISA, or fall back to a nul-implementation if it isn't.  In the latter
case it will cause the linker (GNU LD) to emit a warning that
specifies how to pick a specific implementation.  I've chosen not to
permit this default to use the CP15 solution as that has been
deprecated.

libgcc:

	* config.host (arm*-*-eabi* | arm*-*-rtems*):
	Add arm/t-sync to the makefile rules.
	* config/arm/lib1funcs.S (__sync_synchronize_none)
	(__sync_synchronize_cp15dmb, __sync_synchronize_dmb)
	(__sync_synchronize): New functions.
	* config/arm/t-sync: New file.
	* config/arm/sync-none.specs: Likewise.
	* config/arm/sync-dmb.specs: Likewise.
	* config/arm/sync-cp15dmb.specs: Likewise.
2023-11-24 14:15:26 +00:00
..
aarch64 libgcc: make heap-based trampolines conditional on libc presence 2023-10-24 08:35:44 +01:00
alpha Update copyright years. 2023-01-16 11:52:17 +01:00
arc arc: Fix -Wincompatible-pointer-types warning during libgcc build 2023-10-13 09:34:36 +02:00
arm arm: libgcc: provide implementations of __sync_synchronize 2023-11-24 14:15:26 +00:00
avr Daily bump. 2023-11-14 12:23:39 +00:00
bfin Update copyright years. 2023-01-16 11:52:17 +01:00
bpf
c6x Update copyright years. 2023-01-16 11:52:17 +01:00
cris libgcc CRIS: Define TARGET_HAS_NO_HW_DIVIDE 2023-04-27 02:00:33 +02:00
csky csky: Fix -Wincompatible-pointer-types warning during libgcc build 2023-10-13 09:34:36 +02:00
epiphany Update copyright years. 2023-01-16 11:52:17 +01:00
fr30 Update copyright years. 2023-01-16 11:52:17 +01:00
frv Update copyright years. 2023-01-16 11:52:17 +01:00
ft32 Update copyright years. 2023-01-16 11:52:17 +01:00
gcn GCN: Address undeclared 'NULL' usage in 'libgcc/config/gcn/gthr-gcn.h:__gthread_getspecific' 2023-11-03 15:49:27 +01:00
h8300 Update copyright years. 2023-01-16 11:52:17 +01:00
i386 libgcc: make heap-based trampolines conditional on libc presence 2023-10-24 08:35:44 +01:00
ia64 Update copyright years. 2023-01-16 11:52:17 +01:00
iq2000 Update copyright years. 2023-01-16 11:52:17 +01:00
libbid Update copyright years. 2023-01-16 11:52:17 +01:00
lm32 Update copyright years. 2023-01-16 11:52:17 +01:00
loongarch Update copyright years. 2023-01-16 11:52:17 +01:00
m32c Update copyright years. 2023-01-16 11:52:17 +01:00
m32r Update copyright years. 2023-01-16 11:52:17 +01:00
m68k [PATCH] libgcc/m68k: Fixes for soft float 2023-11-10 16:47:22 -07:00
mcore Update copyright years. 2023-01-16 11:52:17 +01:00
microblaze Update copyright years. 2023-01-16 11:52:17 +01:00
mips MIPS: Add speculation_barrier support 2023-06-05 11:22:00 +08:00
mmix Update copyright years. 2023-01-16 11:52:17 +01:00
moxie Update copyright years. 2023-01-16 11:52:17 +01:00
msp430 Update copyright years. 2023-01-16 11:52:17 +01:00
nds32 Update copyright years. 2023-01-16 11:52:17 +01:00
nios2 Update copyright years. 2023-01-16 11:52:17 +01:00
nvptx Update copyright years. 2023-01-16 11:52:17 +01:00
or1k or1k: Fix -Wincompatible-pointer-types warning during libgcc build 2023-10-13 09:34:37 +02:00
pa Add assember CFI directives to millicode division and remainder routines. 2023-04-05 14:44:54 +00:00
pdp11
pru libgcc pru: Define TARGET_HAS_NO_HW_DIVIDE 2023-05-01 11:08:51 +03:00
riscv riscv: Fix -Wincompatible-pointer-types warning during libgcc build 2023-10-13 09:34:36 +02:00
rl78 Update copyright years. 2023-01-16 11:52:17 +01:00
rs6000 libgcc _BitInt support [PR102989] 2023-09-06 17:33:05 +02:00
rx Update copyright years. 2023-01-16 11:52:17 +01:00
s390 libgcc: Use initarray section type for .init_stack 2023-06-04 22:39:32 -05:00
score Update copyright years. 2023-01-16 11:52:17 +01:00
sh Update copyright years. 2023-01-16 11:52:17 +01:00
sol2 Update copyright years. 2023-01-16 11:52:17 +01:00
sparc Update copyright years. 2023-01-16 11:52:17 +01:00
stormy16 Update copyright years. 2023-01-16 11:52:17 +01:00
v850 PR target/109402: v850 (not v850e) variant of __muldi3() moves sp in reversed direction [PR109402] 2023-04-08 08:26:00 -06:00
vax Update copyright years. 2023-01-16 11:52:17 +01:00
visium Update copyright years. 2023-01-16 11:52:17 +01:00
vms Update copyright years. 2023-01-16 11:52:17 +01:00
xtensa xtensa: add .note.GNU-stack section on linux 2023-03-13 13:42:18 -07:00
darwin-64.c Update copyright years. 2023-01-16 11:52:17 +01:00
darwin-crt-tm.c Update copyright years. 2023-01-16 11:52:17 +01:00
darwin-crt3.c Update copyright years. 2023-01-16 11:52:17 +01:00
darwin-unwind.ver libgcc, Darwin: Build a libgcc_s.1 for backwards compatibility. 2021-12-08 19:53:28 +00:00
darwin10-unwind-find-enc-func.c Darwin, libgcc : Adjust min version supported for the OS. 2023-05-19 09:06:01 +01:00
gthr-lynx.h Update copyright years. 2023-01-16 11:52:17 +01:00
gthr-rtems.h Update copyright years. 2023-01-16 11:52:17 +01:00
gthr-vxworks-cond.c Update copyright years. 2023-01-16 11:52:17 +01:00
gthr-vxworks-thread.c Update copyright years. 2023-01-16 11:52:17 +01:00
gthr-vxworks-tls.c Update copyright years. 2023-01-16 11:52:17 +01:00
gthr-vxworks.c Update copyright years. 2023-01-16 11:52:17 +01:00
gthr-vxworks.h Update copyright years. 2023-01-16 11:52:17 +01:00
hardfp.c Update copyright years. 2023-01-16 11:52:17 +01:00
libgcc-glibc.ver Update copyright years. 2023-01-16 11:52:17 +01:00
libgcc-libsystem.ver Darwin: Rework handling for unwinder code in libgcc_s and specs [PR80556]. 2021-11-19 19:58:11 +00:00
no-sfp-machine.h
no-unwind.h
t-crtfm
t-crtstuff-pic
t-darwin Darwin, libgcc : Adjust min version supported for the OS. 2023-05-19 09:06:01 +01:00
t-darwin-ehs Darwin, libgcc: Fix build errors on powerpc-darwin8. 2022-03-04 16:44:54 +00:00
t-darwin-min-1 Darwin, libgcc : Adjust min version supported for the OS. 2023-05-19 09:06:01 +01:00
t-darwin-min-5 Darwin, libgcc : Adjust min version supported for the OS. 2023-05-19 09:06:01 +01:00
t-darwin-min-8 Darwin, libgcc : Adjust min version supported for the OS. 2023-05-19 09:06:01 +01:00
t-darwin-rpath Config,Darwin: Allow for configuring Darwin to use embedded runpath. 2023-10-22 19:30:02 +01:00
t-dfprules
t-eh-dw2-dip
t-fdpbit
t-fixedpoint-gnu-prefix
t-fpbit
t-freebsd-thread
t-gnu-prefix
t-gthr-noweak
t-gthr-vxworks
t-gthr-vxworksae
t-hardfp Update copyright years. 2023-01-16 11:52:17 +01:00
t-hardfp-sfdf Update copyright years. 2023-01-16 11:52:17 +01:00
t-libgcc-pic
t-libunwind
t-libunwind-elf Update copyright years. 2023-01-16 11:52:17 +01:00
t-linux
t-openbsd-thread
t-rtems
t-slibgcc Update copyright years. 2023-01-16 11:52:17 +01:00
t-slibgcc-darwin Config,Darwin: Allow for configuring Darwin to use embedded runpath. 2023-10-22 19:30:02 +01:00
t-slibgcc-elf-ver
t-slibgcc-fuchsia Update copyright years. 2023-01-16 11:52:17 +01:00
t-slibgcc-gld
t-slibgcc-gld-nover
t-slibgcc-hpux
t-slibgcc-libgcc Update copyright years. 2023-01-16 11:52:17 +01:00
t-slibgcc-nolc-override
t-slibgcc-sld
t-slibgcc-vms libgcc: Honor LDFLAGS_FOR_TARGET when linking libgcc_s 2021-08-05 17:32:06 +02:00
t-softfp libgcc: Add {unsigned ,}__int128 <-> _Decimal{32,64,128} conversion support [PR65833] 2023-11-09 09:14:07 +01:00
t-softfp-compat
t-softfp-excl
t-softfp-sfdf
t-softfp-sfdftf libgcc _BitInt support [PR102989] 2023-09-06 17:33:05 +02:00
t-softfp-tf libgcc _BitInt support [PR102989] 2023-09-06 17:33:05 +02:00
t-stack
t-tls
t-vxcrtstuff
t-vxcrtstuffS Tigthen libc_internal and crtstuff for VxWorks shared objects 2021-12-13 18:03:03 +00:00
t-vxworks Adjust LIBGCC2_INCLUDES for VxWorks and augment comment 2022-10-02 09:33:00 +00:00
t-vxworksae
unwind-dw2-fde-darwin.c Update copyright years. 2023-01-16 11:52:17 +01:00
vxcrtstuff.c Improve comments and INITFINI macro use in vxcrtsutff.c 2022-09-29 18:02:21 +00:00