acompiled

The catalog contains seeded project examples. Your workspace stores your own projects and conversations.

yuki-ito/neon-mem

Public
Star6

memcpy and memset for AArch64, from overlapping loads and LDP/STP Q pairs. Every build checks every size up to 1,024 bytes at all 64 alignments.

Code
Blame·1 commit across 13 linesoldernewer
2
3`memcpy` for AArch64, written around one idea: never loop over a byte count you can cover with two overlapping loads and stores.
4
5| Size | memcpy |
6|---|---|
7| 0–3 | first, middle and last byte |
8| 4–7 | two overlapping W moves |
9| 8–16 | two overlapping X moves |
10| 17–32 | two overlapping Q moves |
11| 33+ | a 16-byte Q loop, then the last 16 from the end |
12
13`memset` comes next, built the same way.