aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/runtime/minimal.c
diff options
context:
space:
mode:
authorVictor Do Nascimento <victor.donascimento@arm.com>2024-02-01 13:27:50 +0000
committerVictor Do Nascimento <victor.donascimento@arm.com>2024-06-12 10:23:38 +0100
commit1af4a8451d4149ecbddfe9963e7f7ea3d273cc2d (patch)
treeeaf56e65f9465cb1a3a5332f8061ec61b033a7a3 /libgfortran/runtime/minimal.c
parent6edf6fe75bd5ab84ae85d008e531002b9d80600c (diff)
downloadgcc-1af4a8451d4149ecbddfe9963e7f7ea3d273cc2d.zip
gcc-1af4a8451d4149ecbddfe9963e7f7ea3d273cc2d.tar.gz
gcc-1af4a8451d4149ecbddfe9963e7f7ea3d273cc2d.tar.bz2
Libatomic: Make ifunc selector behavior contingent on importing file
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.
Diffstat (limited to 'libgfortran/runtime/minimal.c')
0 files changed, 0 insertions, 0 deletions