Skip to content

cmd/asm: add support for arm64 FEAT_MOPS instructions #79994

Description

@mauri870

FEAT_MOPS (Memory Operations) provides CPY{P,M,E} and SET{P,M,E} instruction sequences for hardware-accelerated memory copy and set.

FEAT_MOPS is OPTIONAL from Armv8.7.
FEAT_MOPS is mandatory from Armv8.8+ and Armv9.3+.

This can speed up memory operations on recent Neoverse V3 cores, such as Azure Cobalt 200 and Amazon Graviton 5.

I have a work-in-progress implementation and am looking for hardware access to test. If you have access to recent ARM cores with FEAT_MOPS support, please reach out.

https://developer.arm.com/documentation/111108/2026-03/Base-Instructions/CPYP--CPYM--CPYE--Memory-copy-
https://developer.arm.com/documentation/111108/2026-03/Base-Instructions/SETP--SETM--SETE--Memory-set-

Activity

  1. self-assigned this
    on Jun 13, 2026
  2. added theissue type on Jun 13, 2026
  3. added
    NeedsFixThe path to resolution is known, but the work has not been done.
    compiler/runtimeIssues related to the Go compiler and/or runtime.
    on Jun 13, 2026
  4. mauri870 commented on Jun 13, 2026

    @mauri870
    MemberAuthor

    cc @golang/arm

  5. mauri870 commented on Jun 13, 2026

    @mauri870
    MemberAuthor

    @erifan do you happen to know if NVIDIA Grace supports FEAT_MOPS? Would love to get access to test on real hardware.

  6. gopherbot commented on Jun 13, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/790322 mentions this issue: cmd/internal/obj/arm64,internal/cpu: add FEAT_MOPS assembler support

  7. gabyhelp commented on Jun 13, 2026

    @gabyhelp

    Related Issues

    (Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

  8. gopherbot commented on Jun 13, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/790441 mentions this issue: arm64/arm64asm: add FEAT_MOPS instruction decoding

  9. added this to the Backlog milestone on Jun 17, 2026
  10. mauri870 commented on Jun 19, 2026

    @mauri870
    MemberAuthor

    Tested this on the gotip-linux-arm64_c4ah72 perf builders and, unfortunately, no crashes (sigh). It's also not taking the MOPS paths. This Google Axion generation uses Neoverse V2 cores, which implement the Armv9.0 baseline, so at least I know the HWCAP2 detection is working. The saga continues.

  11. mauri870 commented on Sep 11, 2026

    @mauri870
    MemberAuthor

    Quick update: I was able to test the patch from CL 790322 on an AWS Graviton 5 VM, but FEAT_MOPS is not exposed there. I suspect it's being blocked by the hypervisor.

    This feature has some performance degradation on early cores, which may be why it's disabled. Heard similar things from LLVM too. I'll have to wait for newer CPU revisions to retest this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

NeedsFixThe path to resolution is known, but the work has not been done.arch-arm64compiler/runtimeIssues related to the Go compiler and/or runtime.

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions