Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: use -muse-unaligned-vector-move for Windows builds #28151

Merged
merged 1 commit into from
Sep 5, 2023

Commits on Aug 30, 2023

  1. build: use -muse-unaligned-vector-move for Windows

    We currently work around a longstanding GCC issue with aligned vector
    instructions, in our release builds, by patching the behaviour we want
    into GCC (see discussion in bitcoin#24736).
    
    A new option now exists in the binutils assembler,
    `-muse-unaligned-vector-move`, which should also achieve the behaviour
    we want (at least for our code). This was added in the 2.38 release,
    see
    https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c8480b58e1968f209b6365af7422678f348222c2.
    ```bash
    x86: Add -muse-unaligned-vector-move to assembler
    
    Unaligned load/store instructions on aligned memory or register are as
    fast as aligned load/store instructions on modern Intel processors.  Add
    a command-line option, -muse-unaligned-vector-move, to x86 assembler to
    encode encode aligned vector load/store instructions as unaligned
    vector load/store instructions.
    ```
    
    Even if we introduce this option into our build system, we'll have to
    maintain our GCC patching, as we want all code that ends up in the
    binary, to avoid these instructions. However, there may be some value in
    adding the option, as it could be an improvement for someone building
    (bitcoind.exe) with an unpatched compiler.
    fanquake committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    96f2cf8 View commit details
    Browse the repository at this point in the history