gcc/libgcc
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
..
config Fix support for atomic loads and stores on hppa. 2023-01-13 19:24:15 +00:00
soft-fp middle-end, c++, i386, libgcc: std::bfloat16_t and __bf16 arithmetic support 2022-10-14 09:37:01 +02:00
ChangeLog Daily bump. 2023-01-08 00:16:59 +00:00
config.host Fix support for atomic loads and stores on hppa. 2023-01-13 19:24:15 +00:00
config.in gcov: use mmap pools for KVP. 2021-03-03 14:21:45 +01:00
configure gcc: Add 'mcf' thread model support from mcfgthread 2022-10-19 13:52:37 +00:00
configure.ac LoongArch Port: libgcc 2022-03-29 17:43:35 +08:00
crtstuff.c libgcc: Align __EH_FRAME_BEGIN__ to pointer size 2022-06-01 15:19:59 -07:00
dfp-bit.c Update copyright years. 2022-01-03 10:42:10 +01:00
dfp-bit.h Update copyright years. 2022-01-03 10:42:10 +01:00
divmod.c Update copyright years. 2022-01-03 10:42:10 +01:00
emutls.c Update copyright years. 2022-01-03 10:42:10 +01:00
enable-execute-stack-empty.c
enable-execute-stack-mprotect.c Update copyright years. 2022-01-03 10:42:10 +01:00
find-symver.awk Update copyright years. 2022-01-03 10:42:10 +01:00
fixed-bit.c Update copyright years. 2022-01-03 10:42:10 +01:00
fixed-bit.h Update copyright years. 2022-01-03 10:42:10 +01:00
fixed-obj.mk
floatunsidf.c
floatunsisf.c
floatunsitf.c
floatunsixf.c
fp-bit.c Update copyright years. 2022-01-03 10:42:10 +01:00
fp-bit.h Update copyright years. 2022-01-03 10:42:10 +01:00
gbl-ctors.h Update copyright years. 2022-01-03 10:42:10 +01:00
gcov.h gcov: Add __gcov_filename_to_gcfn() 2022-04-28 20:46:49 +02:00
gen-fixed.sh
generic-morestack-thread.c Update copyright years. 2022-01-03 10:42:10 +01:00
generic-morestack.c Update copyright years. 2022-01-03 10:42:10 +01:00
generic-morestack.h Update copyright years. 2022-01-03 10:42:10 +01:00
gstdint.h
gthr-posix.h Update copyright years. 2022-01-03 10:42:10 +01:00
gthr-single.h Update copyright years. 2022-01-03 10:42:10 +01:00
gthr.h Update copyright years. 2022-01-03 10:42:10 +01:00
libgcc-std.ver.in Update copyright years. 2022-01-03 10:42:10 +01:00
libgcc2.c Always define WIN32_LEAN_AND_MEAN before <windows.h> 2023-01-07 06:51:06 +00:00
libgcc2.h Update copyright years. 2022-01-03 10:42:10 +01:00
libgcov-driver-system.c gcov: Add open mode parameter to gcov_do_dump() 2022-04-28 20:46:49 +02:00
libgcov-driver.c gcov: rename gcov_write_summary 2022-10-12 10:53:19 +02:00
libgcov-interface.c Update copyright years. 2022-01-03 10:42:10 +01:00
libgcov-merge.c Update copyright years. 2022-01-03 10:42:10 +01:00
libgcov-profiler.c Update copyright years. 2022-01-03 10:42:10 +01:00
libgcov-util.c gcov: Use xstrerror() 2022-04-28 20:46:50 +02:00
libgcov.h gcov: rename gcov_write_summary 2022-10-12 10:53:19 +02:00
Makefile.in libgcc: Quote variable in Makefile.in 2022-10-18 12:09:53 +01:00
memcmp.c
memcpy.c
memmove.c
memset.c
mkheader.sh Update copyright years. 2022-01-03 10:42:10 +01:00
mkmap-flat.awk Update copyright years. 2022-01-03 10:42:10 +01:00
mkmap-symver.awk Update copyright years. 2022-01-03 10:42:10 +01:00
offloadstuff.c Update copyright years. 2022-01-03 10:42:10 +01:00
shared-object.mk
siditi-object.mk
static-object.mk
sync.c Update copyright years. 2022-01-03 10:42:10 +01:00
udivhi3.c Update copyright years. 2022-01-03 10:42:10 +01:00
udivmod.c Update copyright years. 2022-01-03 10:42:10 +01:00
udivmodhi4.c Update copyright years. 2022-01-03 10:42:10 +01:00
udivmodsi4.c Update copyright years. 2022-01-03 10:42:10 +01:00
unwind-arm-common.inc Update copyright years. 2022-01-03 10:42:10 +01:00
unwind-c.c Update copyright years. 2022-01-03 10:42:10 +01:00
unwind-compat.c Update copyright years. 2022-01-03 10:42:10 +01:00
unwind-compat.h Update copyright years. 2022-01-03 10:42:10 +01:00
unwind-dw2-btree.h Remove dependency on uintptr_t in libgcc 2022-09-18 11:34:39 +02:00
unwind-dw2-execute_cfa.h libgcc: Specialize execute_cfa_program in DWARF unwinder for alignments [redo] 2023-01-03 16:47:32 +01:00
unwind-dw2-fde-compat.c Update copyright years. 2022-01-03 10:42:10 +01:00
unwind-dw2-fde-dip.c libgcc: Special-case BFD ld unwind table encodings in find_fde_tail 2022-11-04 10:18:03 +01:00
unwind-dw2-fde.c initialize fde objects lazily 2022-12-17 00:48:25 +01:00
unwind-dw2-fde.h eliminate mutex in fast path of __register_frame 2022-09-17 00:58:14 +02:00
unwind-dw2.c libgcc: Specialize execute_cfa_program in DWARF unwinder for alignments [redo] 2023-01-03 16:47:32 +01:00
unwind-dw2.h libgcc: Move cfa_how into potential padding in struct frame_state_reg_info 2022-10-17 11:09:17 +02:00
unwind-generic.h Always define WIN32_LEAN_AND_MEAN before <windows.h> 2023-01-07 06:51:06 +00:00
unwind-pe.h Update copyright years. 2022-01-03 10:42:10 +01:00
unwind-seh.c Update copyright years. 2022-01-03 10:42:10 +01:00
unwind-sjlj.c Update copyright years. 2022-01-03 10:42:10 +01:00
unwind.inc x86: Check corrupted return address when unwinding stack 2022-10-17 14:21:47 -07:00
vtv_end.c Update copyright years. 2022-01-03 10:42:10 +01:00
vtv_end_preinit.c Update copyright years. 2022-01-03 10:42:10 +01:00
vtv_start.c Update copyright years. 2022-01-03 10:42:10 +01:00
vtv_start_preinit.c Update copyright years. 2022-01-03 10:42:10 +01:00