Skip to content

API Proposal: Avx.Zeroupper #28528

@benaadams

Description

@benaadams

The Jit normally issues vzeroupper commands at entry and exit of methods, however when when mixing Avx and Sse code in the same method it is helpful to manually issue vzeroupper at the transitions:

Proposed api

public partial abstract class Avx : Sse42
{
    /// <summary>
    /// void _mm256_zeroupper (void)
    ///   VZEROUPPER
    /// </summary>
    public static void ZeroUpper();
    
    /// <summary>
    /// void _mm256_zeroall (void)
    ///   VZEROALL
    /// </summary>
    public static void ZeroAll();
}

Also added vzeroall for discussion.

Use case: dotnet/coreclr#22187 (comment)

/cc @CarolEidt @fiigii @tannergooding @jkotas

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions