Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[compiler-rt][aarch64][sme] Add SVE/FP variant of __arm_sc_memcpy #127093

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MacDue
Copy link
Member

@MacDue MacDue commented Feb 13, 2025

When SVE is available use the -sve variant of memcpy from AOR for __arm_sc_memcpy. From: https://github.com/ARM-software/optimized-routines/blob/71e36403858ab3ff743fcde336fb31890e57af7e/string/aarch64/memcpy-sve.S

This implementation uses FPR/ZPR load/store instructions to do the copy, so should not cause memory hazards if called in streaming mode (with the memory later being accessed in the streaming mode with SVE/SME instructions).

The implementation has been slightly modified from AOR to use local labels (matching other compiler-rt functions) but still passes the memcpy and memmove tests from AOR.

When SVE is available use the `-sve` variant of memcpy from AOR for
`__arm_sc_memcpy`. From: https://github.com/ARM-software/optimized-routines/blob/71e36403858ab3ff743fcde336fb31890e57af7e/string/aarch64/memcpy-sve.S

This implementation uses FPR/ZPR load/store instructions to do the copy,
so should not cause memory hazards if called in streaming mode (with the
memory later being accessed in the streaming mode with SVE/SME
instructions).

The implementation has been slightly modified from AOR to use local
labels (matching other compiler-rt functions) but still passes the
memcpy and memmove tests from AOR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants