Skip to content

override the have_lse boolean in compiler_rt in start.zig after checking the auxval for what CPU features are available #13622

Description

@andrewrk

On aarch64-linux, this boolean flag should be set to true in start code after checking the aux val and determining that the CPU features include lse.

/// This default is overridden at runtime after inspecting CPU properties.
/// It is intentionally not exported in order to make the machine code that
/// uses it a statically predicted direct branch rather than using the PLT,
/// which ARM is concerned would have too much overhead.
var __aarch64_have_lse_atomics: u8 = @boolToInt(always_has_lse);

Instead of using a constructor like libgcc, zig will export a function for setting this flag explicitly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-aarch6464-bit Armcompiler-rtcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.enhancementSolving this issue will likely involve adding new logic or components to the codebase.optimizationstandard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions