- Jan 11, 2025
-
-
GCC Administrator authored
-
- Jan 10, 2025
-
-
Wilco Dijkstra authored
Simplify and cleanup ifunc selection logic. Since LRCPC3 does not imply LSE2, has_rcpc3() should also check LSE2 is enabled. Passes regress and bootstrap, OK for commit? libatomic: * config/linux/aarch64/host-config.h (has_lse2): Cleanup. (has_lse128): Likewise. (has_rcpc3): Add early check for LSE2.
-
- Jan 02, 2025
-
-
Jakub Jelinek authored
-
Jakub Jelinek authored
2024 -> 2025
-
- Dec 19, 2024
-
-
GCC Administrator authored
-
- Dec 18, 2024
-
-
Prathamesh Kulkarni authored
This reverts commit e2f6ed54.
-
Prathamesh Kulkarni authored
ChangeLog: PR driver/81358 * Makefile.def: Add dependencies so libatomic is built before target libraries are configured. * Makefile.tpl: Export TARGET_CONFIGDIRS. * configure.ac: Add libatomic to bootstrap_target_libs. * Makefile.in: Regenerate. * configure: Regenerate. gcc/ChangeLog: PR driver/81358 * common.opt: New option -flink-libatomic. * gcc.cc (LINK_LIBATOMIC_SPEC): New macro. * config/gnu-user.h (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Use LINK_LIBATOMIC_SPEC. * doc/invoke.texi: Document -flink-libatomic. * configure.ac: Define TARGET_PROVIDES_LIBATOMIC. * configure: Regenerate. * config.in: Regenerate. libatomic/ChangeLog: PR driver/81358 * Makefile.am: Pass -fno-link-libatomic. New rule all. * configure.ac: Assert that CFLAGS is set and pass -fno-link-libatomic. * Makefile.in: Regenerate. * configure: Regenerate. Signed-off-by:
Prathamesh Kulkarni <prathameshk@nvidia.com> Co-authored-by:
Matthew Malcolmson <mmalcolmson@nvidia.com>
-
- Nov 19, 2024
-
-
GCC Administrator authored
-
- Nov 18, 2024
-
-
David Malcolm authored
I need to use this cleanup logic for the testsuite for libdiagnostics where it's too awkward to directly use gcc-dg.exp itself. No functional change intended. gcc/testsuite/ChangeLog: * lib/dg-test-cleanup.exp: New file, from material moved from lib/gcc-dg.exp. * lib/gcc-dg.exp: Add load_lib of dg-test-cleanup.exp. (cleanup-after-saved-dg-test): Move to lib/dg-test-cleanup.exp. (dg-test): Likewise for override. (initialize_prune_notes): Likewise. libatomic/ChangeLog: * testsuite/lib/libatomic.exp: Add "load_gcc_lib dg-test-cleanup.exp". libgomp/ChangeLog: * testsuite/lib/libgomp.exp: Add "load_gcc_lib dg-test-cleanup.exp". libitm/ChangeLog: * testsuite/lib/libitm.exp: Add "load_gcc_lib dg-test-cleanup.exp". libphobos/ChangeLog: * testsuite/lib/libphobos-dg.exp: Add "load_gcc_lib dg-test-cleanup.exp". libstdc++-v3/ChangeLog: * testsuite/lib/libstdc++.exp: Add "load_gcc_lib dg-test-cleanup.exp". libvtv/ChangeLog: * testsuite/lib/libvtv.exp: Add "load_gcc_lib dg-test-cleanup.exp". Signed-off-by:
David Malcolm <dmalcolm@redhat.com>
-
- Nov 14, 2024
-
-
GCC Administrator authored
-
Szabolcs Nagy authored
libatomic/ChangeLog: * config/linux/aarch64/atomic_16.S (FEATURE_1_GCS): Define. (GCS_FLAG): Define if GCS is enabled. (GNU_PROPERTY): Add GCS_FLAG.
-
- Sep 03, 2024
-
-
GCC Administrator authored
-
- Sep 02, 2024
-
-
Alex Coplan authored
Since r15-3254-g3f51f0dc88ec21c1ec79df694200f10ef85915f4 added scan-ltrans-rtl* variants to scanltranstree.exp, it no longer makes sense to have "tree" in the name. This renames the file accordingly and updates users. libatomic/ChangeLog: * testsuite/lib/libatomic.exp: Load scanltrans.exp instead of scanltranstree.exp. libgomp/ChangeLog: * testsuite/lib/libgomp.exp: Load scanltrans.exp instead of scanltranstree.exp. libitm/ChangeLog: * testsuite/lib/libitm.exp: Load scanltrans.exp instead of scanltranstree.exp. libphobos/ChangeLog: * testsuite/lib/libphobos-dg.exp: Load scanltrans.exp instead of scanltranstree.exp. libvtv/ChangeLog: * testsuite/lib/libvtv.exp: Load scanltrans.exp instead of scanltranstree.exp. gcc/testsuite/ChangeLog: * gcc.dg-selftests/dg-final.exp: Load scanltrans.exp instead of scanltranstree.exp. * lib/gcc-dg.exp: Likewise. * lib/scanltranstree.exp: Rename to ... * lib/scanltrans.exp: ... this.
-
- Jul 19, 2024
-
-
GCC Administrator authored
-
- Jul 18, 2024
-
-
mayshao authored
PR target/104688 libatomic/ChangeLog: * config/x86/init.c (__libat_feat1_init): Don't clear bit_AVX on ZHAOXIN CPUs.
-
Uros Bizjak authored
Check the result of __get_cpuid and process FEAT1_REGISTER only when __get_cpuid returns success. Use __cpuid instead of nested __get_cpuid. libatomic/ChangeLog: * config/x86/init.c (__libat_feat1_init): Check the result of __get_cpuid and process FEAT1_REGISTER only when __get_cpuid returns success. Use __cpuid instead of nested __get_cpuid.
-
- Jun 26, 2024
-
-
GCC Administrator authored
-
- Jun 25, 2024
-
-
Victor Do Nascimento authored
The introduction of the optional RCPC3 architectural extension for Armv8.2-A upwards provides additional support for the release consistency model, introducing the Load-Acquire RCpc Pair Ordered, and Store-Release Pair Ordered operations in the form of LDIAPP and STILP. These operations are single-copy atomic on cores which also implement LSE2 and, as such, support for these operations is added to Libatomic and employed accordingly when the LSE2 and RCPC3 features are detected in a given core at runtime. libatomic/ChangeLog: * config/linux/aarch64/atomic_16.S (libat_load_16): Add LRCPC3 variant. (libat_store_16): Likewise. * config/linux/aarch64/host-config.h (HWCAP2_LRCPC3): New. (LSE2_LRCPC3_ATOP): Previously LSE2_ATOP. New ifuncs guarded under it. (has_rcpc3): New.
-
- Jun 13, 2024
-
-
GCC Administrator authored
-
- Jun 12, 2024
-
-
Victor Do Nascimento authored
At present, `atomic_16.S' groups different implementations of the same functions together in the file. Therefore, as an example, the LSE2 implementation of `load_16' follows on immediately from its core implementation, as does the `store_16' LSE2 implementation. Such architectural extension-dependent implementations are dependent on ifunc support, such that they are guarded by the relevant preprocessor macro, i.e. `#if HAVE_IFUNC'. Having to apply these guards on a per-function basis adds unnecessary clutter to the file and makes its maintenance more error-prone. We therefore reorganize the layout of the file in such a way that all core implementations needing no `#ifdef's are placed first, followed by all ifunc-dependent implementations, which can all be guarded by a single `#if HAVE_IFUNC', greatly reducing the overall number of required `#ifdef' macros. libatomic/ChangeLog: * config/linux/aarch64/atomic_16.S: Reorganize functions in file. (HAVE_FEAT_LSE2): Delete.
-
Victor Do Nascimento authored
By querying previously-defined file-identifier macros, `host-config.h' is able to get information about its environment and, based on this information, select more appropriate function-specific ifunc selectors. This reduces the number of unnecessary feature tests that need to be carried out in order to find the best atomic implementation for a function at run-time. An immediate benefit of this is that we can further fine-tune the architectural requirements for each atomic function without risk of incurring the maintenance and runtime-performance penalties of having to maintain an ifunc selector with a huge number of alternatives, most of which are irrelevant for any particular function. Consequently, for AArch64 targets, we relax the architectural requirements of `compare_exchange_16', which now requires only LSE as opposed to the newer LSE2. The new flexibility provided by this approach also means that certain functions can now be called directly, doing away with ifunc selectors altogether when only a single implementation is available for it on a given target. As per the macro expansion framework laid out in `libatomic_i.h', such functions should have their names prefixed with `__atomic_' as opposed to `libat_'. This is the same prefix applied to function names when Libatomic is configured with `--disable-gnu-indirect-function'. To achieve this, these functions unconditionally apply the aliasing rule that at present is conditionally applied only when libatomic is built without ifunc support, which ensures that the default `libat_##NAME' is accessible via the equivalent `__atomic_##NAME' too. This is ensured by using the new `ENTRY_ALIASED' macro. Finally, this means we are able to do away with a whole set of function aliases that were needed until now, thus considerably cleaning up the implementation. libatomic/ChangeLog: * config/linux/aarch64/atomic_16.S: Remove unnecessary aliasing. (LSE): New. (ENTRY_ALIASED): Likewise. * config/linux/aarch64/host-config.h (LSE_ATOP): New. (LSE2_ATOP): Likewise. (LSE128_ATOP): Likewise. (IFUNC_COND_1): Make its definition conditional on above 3 macros. (IFUNC_NCOND): Likewise.
-
Victor Do Nascimento authored
In order to facilitate the fine-tuning of how `libatomic_i.h' and `host-config.h' headers are used by different atomic functions, we define distinct identifier macros for each file which, in implementing atomic operations, imports these headers. The idea is that different parts of these headers could then be conditionally defined depending on the macros set by the file that `#include'd them. Given how it is possible that some file names are generic enough that using them as-is for macro names (e.g. flag.c -> FLAG) may potentially lead to name clashes with other macros, all file names first have LAT_ prepended to them such that, for example, flag.c is assigned the LAT_FLAG macro. Libatomic/ChangeLog: * cas_n.c (LAT_CAS_N): New. * exch_n.c (LAT_EXCH_N): Likewise. * fadd_n.c (LAT_FADD_N): Likewise. * fand_n.c (LAT_FAND_N): Likewise. * fence.c (LAT_FENCE): Likewise. * fenv.c (LAT_FENV): Likewise. * fior_n.c (LAT_FIOR_N): Likewise. * flag.c (LAT_FLAG): Likewise. * fnand_n.c (LAT_FNAND_N): Likewise. * fop_n.c (LAT_FOP_N): Likewise * fsub_n.c (LAT_FSUB_N): Likewise. * fxor_n.c (LAT_FXOR_N): Likewise. * gcas.c (LAT_GCAS): Likewise. * gexch.c (LAT_GEXCH): Likewise. * glfree.c (LAT_GLFREE): Likewise. * gload.c (LAT_GLOAD): Likewise. * gstore.c (LAT_GSTORE): Likewise. * load_n.c (LAT_LOAD_N): Likewise. * store_n.c (LAT_STORE_N): Likewise. * tas_n.c (LAT_TAS_N): Likewise.
-
Victor Do Nascimento authored
Given the lack of support for the LSE128 instructions in all but the the most up-to-date version of Binutils (2.42), having the build-time test for assembler support for these instructions often leads to the building of Libatomic without support for LSE128-dependent atomic function implementations. This ultimately leads to different people having different versions of Libatomic on their machines, depending on which assembler was available at compilation time. Furthermore, the conditional inclusion of these atomic function implementations predicated on assembler support leads to a series of `#if HAVE_FEAT_LSE128' guards scattered throughout the codebase and the need for a series of aliases when the feature flag evaluates to false. The preprocessor macro guards, together with the conditional aliasing leads to code that is cumbersome to understand and maintain. Both of the issues highlighted above will only get worse with the coming support for LRCPC3 atomics which under the current scheme will also require build-time checks. Consequently, a better option for both consistency across builds and code cleanness is to make recourse to the `.inst' directive. By replacing all novel assembly instructions for their hexadecimal representation within `.inst's, we ensure that the Libatomic code is both considerably cleaner and all machines build the same binary, irrespective of binutils version available at compile time. This patch therefore removes all configure checks for LSE128-support in the assembler and all the guards and aliases that were associated with `HAVE_FEAT_LSE128' libatomic/ChangeLog: * acinclude.m4 (LIBAT_TEST_FEAT_AARCH64_LSE128): Delete. * auto-config.h.in (HAVE_FEAT_LSE128): Likewise * config/linux/aarch64/atomic_16.S: Replace all LSE128 instructions with equivalent `.inst' directives. (HAVE_FEAT_LSE128): Remove all references. * configure: Regenerate. * configure.ac: Remove call to LIBAT_TEST_FEAT_AARCH64_LSE128.
-
- Jun 01, 2024
-
-
GCC Administrator authored
-
- May 31, 2024
-
-
Rainer Orth authored
A recent patch commit bdc264a1 Author: Alexandre Oliva <oliva@adacore.com> Date: Thu May 30 02:06:48 2024 -0300 [testsuite] conditionalize dg-additional-sources on target and type added two additional args to dg-additional-files-options. Unfortunately, this completely broke several testsuites like ERROR: tcl error sourcing /vol/gcc/src/hg/master/local/libatomic/testsuite/../../gcc/testsuite/lib/gcc-dg.exp. wrong # args: should be "dg-additional-files-options options source dest type" since the patch forgot to adjust some of the callers. This patch fixes that. Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu. 2024-05-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> libatomic: PR testsuite/115294 * testsuite/lib/libatomic.exp (libatomic_target_compile): Pass new dg-additional-files-options args. libgomp: PR testsuite/115294 * testsuite/lib/libgomp.exp (libgomp_target_compile): Pass new dg-additional-files-options args. libitm: PR testsuite/115294 * testsuite/lib/libitm.exp (libitm_target_compile): Pass new dg-additional-files-options args. libphobos: PR testsuite/115294 * testsuite/lib/libphobos.exp (libphobos_target_compile): Pass new dg-additional-files-options args. libvtv: PR testsuite/115294 * testsuite/lib/libvtv.exp (libvtv_target_compile): Pass new dg-additional-files-options args.
-
- May 09, 2024
-
-
GCC Administrator authored
-
- May 07, 2024
-
-
Zac Walker authored
libatomic/ChangeLog: * configure.tgt: Add aarch64-w64-mingw32 target.
-
Rainer Orth authored
The recent move of libgfortran object files to subdirs and the resulting breakage of libgfortran.so symbol exports demonstrated how fragile deriving object and archive names from their libtool counterparts in the Makefiles is. Therefore, this patch moves that step into make_sunver.pl, considerably simplifying the Makefile rules to create the version scripts. Bootstrapped without regressions on i386-pc-solaris2.11 and sparc-sun-solaris2.11, verifying that the version scripts are identical except for the input filenames. 2024-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> contrib: * make_sunver.pl: Use File::Basename; Skip -lLIB args. Convert libtool object/archive names to underlying objects/archives. libatomic: * Makefile.am [LIBAT_BUILD_VERSIONED_SHLIB_SUN] (libatomic.map-sun): Pass $(libatomic_la_OBJECTS), $(libatomic_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libffi: * Makefile.am [LIBFFI_BUILD_VERSIONED_SHLIB_SUN] (libffi.map-sun): Pass $(libffi_la_OBJECTS), $(libffi_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libgfortran: * Makefile.am [LIBGFOR_USE_SYMVER_SUN} (gfortran.ver-sun): Pass $(libgfortran_la_OBJECTS), $(libgfortran_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libgomp: * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN] (libgomp.ver-sun): Pass $(libgomp_la_OBJECTS), $(libgomp_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libitm: * Makefile.am [LIBITM_BUILD_VERSIONED_SHLIB_SUN] (libitm.map-sun): Pass $(libitm_la_OBJECTS), $(libitm_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libquadmath: * Makefile.am [LIBQUAD_USE_SYMVER_SUN] (quadmath.map-sun): Pass $(libquadmath_la_OBJECTS), $(libquadmath_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libssp: * Makefile.am [LIBSSP_USE_SYMVER_SUN] (ssp.map-sun): Pass $(libssp_la_OBJECTS), $(libssp_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libstdc++-v3: * src/Makefile.am [ENABLE_SYMVERS_SUN] (libstdc++-symbols.ver-sun): Pass $(libstdc___la_OBJECTS), $(libstdc___la_LIBADD) to make_sunver.pl unmodified. * src/Makefile.in: Regenerate.
-
- Apr 27, 2024
-
-
GCC Administrator authored
-
- Apr 26, 2024
-
-
Wilco Dijkstra authored
Cleanup the macros to add the libat_ prefixes in atomic_16.S. Emit the alias to __atomic_<op> when ifuncs are not enabled in the ENTRY macro. libatomic: * config/linux/aarch64/atomic_16.S: Add __libat_ prefix in the LSE2/LSE128/CORE macros, remove elsewhere. Add ATOMIC macro.
-
- Apr 08, 2024
-
-
GCC Administrator authored
-
- Apr 05, 2024
-
-
Jakub Jelinek authored
Seems configure hasn't been regenerated properly after the last acinclude.m4 change. 2024-04-05 Jakub Jelinek <jakub@redhat.com> * configure: Regenerate.
-
GCC Administrator authored
-
- Apr 04, 2024
-
-
Wilco Dijkstra authored
Fix libatomic build to support --disable-gnu-indirect-function on AArch64. Always build atomic_16.S, add aliases to the __atomic_ functions if !HAVE_IFUNC. Include auto-config.h in atomic_16.S to avoid having to pass defines via makefiles. Fix build if HWCAP_ATOMICS/CPUID are not defined. libatomic: PR target/113986 * Makefile.in: Regenerated. * Makefile.am: Make atomic_16.S not depend on HAVE_IFUNC. Remove predefine of HAVE_FEAT_LSE128. * acinclude.m4: Remove ARCH_AARCH64_HAVE_LSE128. * configure: Regenerated. * config/linux/aarch64/atomic_16.S: Add __atomic_ alias if !HAVE_IFUNC. * config/linux/aarch64/host-config.h: Correctly handle !HAVE_IFUNC. Add defines for HWCAP_ATOMICS and HWCAP_CPUID.
-
- Feb 15, 2024
-
-
GCC Administrator authored
-
- Feb 14, 2024
-
-
Roger Sayle authored
This patch is a revised version of the fix for PR other/113336. Bootstrapping GCC on arm-linux-gnueabihf with --with-arch=armv6 currently has a large number of FAILs in libatomic (regressions since last time I attempted this). The failure mode is related to IFUNC handling with the file tas_8_2_.o containing an unresolved reference to the function libat_test_and_set_1_i2. The following one line change, to build tas_1_2_.o when building tas_8_2_.o, resolves the problem for me and restores the libatomic testsuite to 44 expected passes and 5 unsupported tests [from 22 unexpected failures and 22 unresolved testcases]. ` 2024-02-14 Roger Sayle <roger@nextmovesoftware.com> Victor Do Nascimento <victor.donascimento@arm.com> libatomic/ChangeLog PR other/113336 * Makefile.am: Build tas_1_2_.o on ARCH_ARM_LINUX * Makefile.in: Regenerate.
-
- Feb 04, 2024
-
-
GCC Administrator authored
-
- Feb 03, 2024
-
-
John David Anglin authored
The exception defines in <fenv.h> do not match the exception bits in the FPU status register on hppa-linux and hppa64-hpux11.11. On linux, they match the trap enable bits. On 64-bit hpux, they match the exception bits for IA64. The IA64 bits are in a different order and location than HPPA. HP uses table look ups to reorder the bits in code to test and raise exceptions. All the architectures that I looked at just pass the FPU status register to __atomic_feraiseexcept(). The simplest approach for hppa is to define FE_INEXACT, etc, to match the status register and not include <fenv.h>.. 2024-02-03 John David Anglin <danglin@gcc.gnu.org> libatomic/ChangeLog: PR target/59778 * configure.tgt (hppa*): Set ARCH. * config/pa/fenv.c: New file.
-
- Jan 29, 2024
-
-
GCC Administrator authored
-
- Jan 28, 2024
-
-
Victor Do Nascimento authored
At present, Evaluation of both `has_lse2(hwcap)' and `has_lse128(hwcap)' may require issuing an `mrs' instruction to query a system register. This instruction, when issued from user-space results in a trap by the kernel which then returns the value read in by the system register. Given the undesirable nature of the computational expense associated with the context switch, it is important to implement mechanisms to, wherever possible, forgo the operation. In light of this, given how other architectural requirements serving as prerequisites have long been assigned HWCAP bits by the kernel, we can inexpensively query for their availability before attempting to read any system registers. Where one of these early tests fail, we can assert that the main feature of interest (be it LSE2 or LSE128) cannot be present, allowing us to return from the function early and skip the unnecessary expensive kernel-mediated access to system registers. libatomic/ChangeLog: * config/linux/aarch64/host-config.h (has_lse2): Add test for LSE. (has_lse128): Add test for LSE2.
-