Skip to content
Snippets Groups Projects
  • Victor Do Nascimento's avatar
    f6b9a064
    Libatomic: AArch64: Convert all lse128 assembly to .insn directives · f6b9a064
    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.
    f6b9a064
    History
    Libatomic: AArch64: Convert all lse128 assembly to .insn directives
    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.