gcc/libgcc/config
John David Anglin cf467fb93b Fix support for atomic loads and stores on hppa.
This change updates the atomic libcall support to fix the following
issues:

1) A internal compiler error with -fno-sync-libcalls.
2) When sync libcalls are disabled, we don't generate libcalls for
   libatomic.
3) There is no sync libcall support for targets other than linux.
   As a result, non-atomic stores are silently emitted for types
   smaller or equal to the word size.  There are now a few atomic
   libcalls in the libgcc code, so we need sync support on all
   targets.

2023-01-13  John David Anglin  <danglin@gcc.gnu.org>

gcc/ChangeLog:

	* config/pa/pa-linux.h (TARGET_SYNC_LIBCALL): Delete define.
	* config/pa/pa.cc (pa_init_libfuncs): Use MAX_SYNC_LIBFUNC_SIZE
	define.
	* config/pa/pa.h (TARGET_SYNC_LIBCALLS): Use flag_sync_libcalls.
	(MAX_SYNC_LIBFUNC_SIZE): Define.
	(TARGET_CPU_CPP_BUILTINS): Define __SOFTFP__ when soft float is
	enabled.
	* config/pa/pa.md (atomic_storeqi): Emit __atomic_exchange_1
	libcall when sync libcalls are disabled.
	(atomic_storehi, atomic_storesi, atomic_storedi): Likewise.
	(atomic_loaddi): Emit __atomic_load_8 libcall when sync libcalls
	are disabled on 32-bit target.
	* config/pa/pa.opt (matomic-libcalls): New option.
	* doc/invoke.texi (HPPA Options): Update.

libgcc/ChangeLog:

	* config.host (hppa*64*-*-linux*): Adjust tmake_file to use
	pa/t-pa64-linux.
	(hppa*64*-*-hpux11*): Adjust tmake_file to use pa/t-pa64-hpux
	instead of pa/t-hpux and pa/t-pa64.
	* config/pa/linux-atomic.c: Define u32 type.
	(ATOMIC_LOAD): Define new macro to implement atomic_load_1,
	atomic_load_2, atomic_load_4 and atomic_load_8.  Update sync
	defines to use atomic_load calls for type.
	(SYNC_LOCK_LOAD_2): New macro to implement __sync_lock_load_8.
	* config/pa/sync-libfuncs.c: New file.
	* config/pa/t-netbsd (LIB2ADD_ST): Define.
	* config/pa/t-openbsd (LIB2ADD_ST): Define.
	* config/pa/t-pa64-hpux: New file.
	* config/pa/t-pa64-linux: New file.
2023-01-13 19:24:15 +00:00
..
aarch64 libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
alpha libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
arc libgcc, arc: Fix build 2022-10-07 00:16:11 +02:00
arm arm: unified syntax for libgcc clear_cache 2023-01-13 13:04:04 +00:00
avr Daily bump. 2022-09-20 00:17:49 +00:00
bfin libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
bpf
c6x Update copyright years. 2022-01-03 10:42:10 +01:00
cris Update copyright years. 2022-01-03 10:42:10 +01:00
csky libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
epiphany Update copyright years. 2022-01-03 10:42:10 +01:00
fr30 Update copyright years. 2022-01-03 10:42:10 +01:00
frv Update copyright years. 2022-01-03 10:42:10 +01:00
ft32 Update copyright years. 2022-01-03 10:42:10 +01:00
gcn GCN: Implement __atomic_compare_exchange_{1,2} in libgcc [PR102215] 2022-03-09 19:34:48 +01:00
h8300 Update copyright years. 2022-01-03 10:42:10 +01:00
i386 libstdc++: Fix unintended layout change to std::basic_filebuf [PR108331] 2023-01-13 13:34:20 +00:00
ia64 libgcc: IA64: don't compile glibc-based unwinder without libc headers 2022-04-08 08:01:06 +01:00
iq2000 Update copyright years. 2022-01-03 10:42:10 +01:00
libbid Update Copyright year in ChangeLog files 2023-01-02 09:23:36 +01:00
lm32 Update copyright years. 2022-01-03 10:42:10 +01:00
loongarch libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
m32c Update copyright years. 2022-01-03 10:42:10 +01:00
m32r Update copyright years. 2022-01-03 10:42:10 +01:00
m68k libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
mcore Update copyright years. 2022-01-03 10:42:10 +01:00
microblaze Update copyright years. 2022-01-03 10:42:10 +01:00
mips libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
mmix Update copyright years. 2022-01-03 10:42:10 +01:00
moxie Update copyright years. 2022-01-03 10:42:10 +01:00
msp430 Update copyright years. 2022-01-03 10:42:10 +01:00
nds32 libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
nios2 libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
nvptx Update copyright years. 2022-01-03 10:42:10 +01:00
or1k libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
pa Fix support for atomic loads and stores on hppa. 2023-01-13 19:24:15 +00:00
pdp11
pru Update copyright years. 2022-01-03 10:42:10 +01:00
riscv libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
rl78 Update copyright years. 2022-01-03 10:42:10 +01:00
rs6000 libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
rx Update copyright years. 2022-01-03 10:42:10 +01:00
s390 libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
score Update copyright years. 2022-01-03 10:42:10 +01:00
sh libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
sol2 Update copyright years. 2022-01-03 10:42:10 +01:00
sparc libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for 2022-10-06 11:04:52 +02:00
stormy16 Update copyright years. 2022-01-03 10:42:10 +01:00
v850 Update copyright years. 2022-01-03 10:42:10 +01:00
vax Update copyright years. 2022-01-03 10:42:10 +01:00
visium Update copyright years. 2022-01-03 10:42:10 +01:00
vms Update copyright years. 2022-01-03 10:42:10 +01:00
xtensa libgcc: xtensa: remove stray symbols from X*HAL macro definitions 2022-12-08 01:16:56 -08:00
darwin-64.c Update copyright years. 2022-01-03 10:42:10 +01:00
darwin-crt-tm.c Update copyright years. 2022-01-03 10:42:10 +01:00
darwin-crt3.c Update copyright years. 2022-01-03 10:42:10 +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, crts: Fix a build warning. 2021-11-05 20:48:05 +00:00
gthr-lynx.h Update copyright years. 2022-01-03 10:42:10 +01:00
gthr-rtems.h Update copyright years. 2022-01-03 10:42:10 +01:00
gthr-vxworks-cond.c Update copyright years. 2022-01-03 10:42:10 +01:00
gthr-vxworks-thread.c Update copyright years. 2022-01-03 10:42:10 +01:00
gthr-vxworks-tls.c Update copyright years. 2022-01-03 10:42:10 +01:00
gthr-vxworks.c Update copyright years. 2022-01-03 10:42:10 +01:00
gthr-vxworks.h Prevent secondary warning from diagnostic tweak in gthr-vxworks.h 2022-10-02 09:13:14 +00:00
hardfp.c Update copyright years. 2022-01-03 10:42:10 +01:00
libgcc-glibc.ver Update copyright years. 2022-01-03 10:42:10 +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 libgcc, Darwin: Update darwin10 unwinder shim dependencies. 2021-12-10 23:15:15 +00:00
t-darwin-ehs Darwin, libgcc: Fix build errors on powerpc-darwin8. 2022-03-04 16:44:54 +00:00
t-dfprules
t-eh-dw2-dip
t-fdpbit
t-fixedpoint-gnu-prefix
t-fpbit
t-freebsd-thread
t-gnu-prefix
t-gthr-noweak musl: Don't use gthr weak refs in libgcc PR91737 2019-11-18 12:08:18 +00:00
t-gthr-vxworks Improve the thread support for VxWorks 2019-11-14 15:58:31 +00:00
t-gthr-vxworksae Update the libgcc support for VxWorks AE/653 2019-11-14 16:00:55 +00:00
t-hardfp Update copyright years. 2022-01-03 10:42:10 +01:00
t-hardfp-sfdf Update copyright years. 2022-01-03 10:42:10 +01:00
t-libgcc-pic
t-libunwind
t-libunwind-elf Update copyright years. 2022-01-03 10:42:10 +01:00
t-linux
t-openbsd-thread
t-rtems
t-slibgcc Update copyright years. 2022-01-03 10:42:10 +01:00
t-slibgcc-darwin libgcc, Darwin: No early install for the compatibility libgcc_s.1.dylib. 2022-12-24 13:52:46 +00:00
t-slibgcc-elf-ver
t-slibgcc-fuchsia Update copyright years. 2022-01-03 10:42:10 +01:00
t-slibgcc-gld
t-slibgcc-gld-nover
t-slibgcc-hpux
t-slibgcc-libgcc Update copyright years. 2022-01-03 10:42:10 +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 Update copyright years. 2022-01-03 10:42:10 +01:00
t-softfp-compat
t-softfp-excl
t-softfp-sfdf
t-softfp-sfdftf
t-softfp-tf
t-stack
t-tls
t-vxcrtstuff Fix the vxworks crtstuff handling of kernel/rtp variations 2020-10-16 15:33:35 +00:00
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 Update the libgcc support for VxWorks AE/653 2019-11-14 16:00:55 +00:00
unwind-dw2-fde-darwin.c Update copyright years. 2022-01-03 10:42:10 +01:00
vxcrtstuff.c Improve comments and INITFINI macro use in vxcrtsutff.c 2022-09-29 18:02:21 +00:00