Skip to content

[C] Unify unix and windows_gnu assembly files #540

Description

@MaskRay

The following two files are assembled with GNU Assembler / LLVM integrated assembler.
They are mostly identical with different stack sizes and and can probably benefit from a unified implementation.
https://github.com/BLAKE3-team/BLAKE3/blob/master/c/blake3_avx2_x86-64_unix.S
https://github.com/BLAKE3-team/BLAKE3/blob/master/c/blake3_avx2_x86-64_windows_gnu.S

If unified, _gnu.S is probably a good suffix name as the assembly uses the GNU Assembler syntax (Apple Mach-O also uses a variant of the GNU Assembler syntax).

This one is assembled by Microsoft Macro Assembler or llvm-ml. The section and directives are so different that I think a separate implementation is fine.
https://github.com/BLAKE3-team/BLAKE3/blob/master/c/blake3_avx2_x86-64_windows_msvc.asm

This came up in the context of llvm/llvm-project#171761
llvm-project integrates BLAZE3 in llvm/lib/Support/BLAKE3 (the "LLVMSupport" library).
@dzbarsky intends to use the _unix.S variant for windows-gnu (mingw).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions