Skip to content

Duplicate assembly macros #64253

Closed
Closed

Description

@am11

In CoreRT, we copied a few assembly macros from CoreCLR repo. Those macros were later modified in coreclr then in runtime repos. Now that NativeAOT and PAL code exist in the same repo, is it feasible to deduplicate that code?

/runtime $ git ls-files ':/src/coreclr/pal/*unixasmmacros*.inc'
src/coreclr/pal/inc/unixasmmacros.inc
src/coreclr/pal/inc/unixasmmacrosamd64.inc
src/coreclr/pal/inc/unixasmmacrosarm.inc
src/coreclr/pal/inc/unixasmmacrosarm64.inc
src/coreclr/pal/inc/unixasmmacross390x.inc
src/coreclr/pal/inc/unixasmmacrosx86.inc

# vs.

/runtime $ git ls-files ':/src/coreclr/nativeaot/*unixasmmacros*.inc'
src/coreclr/nativeaot/Runtime/unix/unixasmmacros.inc
src/coreclr/nativeaot/Runtime/unix/unixasmmacrosamd64.inc
src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm.inc
src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm64.inc
src/coreclr/nativeaot/Runtime/unix/unixasmmacrosx86.inc

cc @MichalStrehovsky, @jkotas, @janvorli

Activity

  1. ghost added
    area-PAL-coreclr
    on Jan 25, 2022
  2. ghost added
    untriaged
    on Jan 25, 2022
  3. am11 commented on Jan 25, 2022

    @am11
    MemberAuthor

    cc @directhex (regarding #62594 (comment)), for some reason the outerloop armv6 failure is caused by /pal/ variant


    but not the nativeaot one:

    (although both components are bulilding; maybe it's unreachable code 🤔)

  4. MichalStrehovsky commented on Jan 25, 2022

    @MichalStrehovsky
    Member

    It would definitely be nice to deduplicate.

    My only concern is that we currently have zero testing for NativeAOT ARM64 (outside of just building it), so I would rather not make big changes to ARM64 files right now. ARM64 testing is on my TODO list for the coming weeks.

    but not the nativeaot one:

    NativeAOT is only building on ARM64 and x64:

    if(NOT CLR_CROSS_COMPONENTS_BUILD)
    # NativeAOT only buildable for a subset of CoreCLR-supported configurations
    if((CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_OSX OR CLR_CMAKE_HOST_WIN32) AND (CLR_CMAKE_HOST_ARCH_ARM64 OR CLR_CMAKE_HOST_ARCH_AMD64) AND NOT (CLR_CMAKE_HOST_OSX AND CLR_CMAKE_HOST_ARCH_ARM64))
    add_subdirectory(nativeaot)
    endif()
    endif(NOT CLR_CROSS_COMPONENTS_BUILD)

    It might be buildable on ARM32, but this was scoped down to what we really need in the initial move from runtimelab.

  5. added this to the Future milestone on Jun 13, 2022
  6. removed
    untriaged
    on Jun 13, 2022
  7. added and removed
    area-PAL-coreclr
    on Apr 9, 2026
  8. dotnet-policy-service commented on Apr 9, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @agocke
    See info in area-owners.md if you want to be subscribed.

  9. am11 commented on Apr 11, 2026

    @am11
    MemberAuthor

    Some of the convergence work is done. I think we have reference mechanism and precedence (src/coreclr/runtime due) to continue convergence as the feature demand; instead of standalone convergence wholesale.

  10. locked and limited conversation to collaborators on May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions