<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/aarch64/string, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-02-03T17:11:51Z</updated>
<entry>
<title>libc/aarch64: Add memset for a 64 byte dc zva</title>
<updated>2026-02-03T17:11:51Z</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2026-02-03T14:01:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=32d1f18865abe94d351a6f178a93b7195595ec69'/>
<id>urn:sha1:32d1f18865abe94d351a6f178a93b7195595ec69</id>
<content type='text'>
On arm64 we can use the "dc zva" instruction to zero memory. The CPU
tells software if the instruction is implemented, and if so the size
and alignment it will use.

When the size is 64-bytes the Arm Optimized Routines implementation of
memset can use dc zva to zero memory, and has a build flag to skip
checking.

Use this flag to build a version of memset that will be used when this
assumption is true.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D54776
</content>
</entry>
<entry>
<title>libc/aarch64: Split out the MOPS functions</title>
<updated>2026-02-03T17:11:50Z</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2026-02-03T14:01:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f0516ed4652cfb7435f8c5a16b46dc067779a1a8'/>
<id>urn:sha1:f0516ed4652cfb7435f8c5a16b46dc067779a1a8</id>
<content type='text'>
This allows static binaries to only include the functions they
reference.

Reviewed by:	imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D54775
</content>
</entry>
<entry>
<title>libc/aarch64: Add a Makefile.inc dependency</title>
<updated>2026-02-03T17:11:50Z</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2026-02-03T14:00:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=00f68392130cf597c7c76669c63dab26b31630c1'/>
<id>urn:sha1:00f68392130cf597c7c76669c63dab26b31630c1</id>
<content type='text'>
If we update Makefile.inc it may be to change the contents of these
files.

Reviewed by:	imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D54774
</content>
</entry>
<entry>
<title>libc/aarch64: Use MOPS implementations of memcpy/memmove/memset where availble</title>
<updated>2026-01-13T15:28:04Z</updated>
<author>
<name>Sarah Walker</name>
<email>sarah.walker2@arm.com</email>
</author>
<published>2026-01-13T14:24:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=41ccf82b29f3b16fcd1ccb4987569c851222ef8d'/>
<id>urn:sha1:41ccf82b29f3b16fcd1ccb4987569c851222ef8d</id>
<content type='text'>
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D54560
</content>
</entry>
<entry>
<title>libc/aarch64: fix ELF size of timingsafe_memcmp</title>
<updated>2025-09-26T09:04:54Z</updated>
<author>
<name>Paul Floyd</name>
<email>pjfloyd@wanadoo.fr</email>
</author>
<published>2025-09-25T19:49:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7feac79331bc8c77e2f8a3e71d6ea087fa17b61d'/>
<id>urn:sha1:7feac79331bc8c77e2f8a3e71d6ea087fa17b61d</id>
<content type='text'>
Looks like a copy and paste error.
The ELF size of 0 prevents Valgrind from redirecting this function.

PR:		289845
Reviewed by:	fuz
Fixes:		3f224333af163d5fcd7547a20993dcf18f19076c
See also:	https://bugs.kde.org/show_bug.cgi?id=509406
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1854
MFC after:	1 day
Event:		EuroBSDcon 2025
</content>
</entry>
<entry>
<title>libc: fix _FORTIFY_SOURCE build on aarch64</title>
<updated>2025-03-04T19:53:34Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2025-03-04T19:53:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=429b03a00ba74ae0188cce3f3064cfac023e18c5'/>
<id>urn:sha1:429b03a00ba74ae0188cce3f3064cfac023e18c5</id>
<content type='text'>
As with their amd64 counterparts, we need to undef these string funcs
that _FORTIFY_SOURCE will have defined macros for to avoid breaking the
build.

Fixes:	bea89d038ac ("lib/libc/aarch64/string: add strlcat SIMD [...]")
Fixes:	3dc5429158c ("lib/libc/aarch64/string: add strncat SIMD [...]")
</content>
</entry>
<entry>
<title>libc: Add include path for aarch64 memchr.S</title>
<updated>2025-01-17T16:23:56Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2025-01-17T16:22:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=72f092ee019447c76ecb483c3f475313cf9dd5dd'/>
<id>urn:sha1:72f092ee019447c76ecb483c3f475313cf9dd5dd</id>
<content type='text'>
Reported by:	bapt
Sponsored by:	The FreeBSD Foundation
Fixes: d355c28a0954 ("depend-cleanup: bea89d038ac5 also moved memchr")
</content>
</entry>
<entry>
<title>depend-cleanup: bea89d038ac5 also moved memchr</title>
<updated>2025-01-17T15:17:45Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2025-01-17T15:05:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d355c28a0954de487e45c4349631c2b9449ba28d'/>
<id>urn:sha1:d355c28a0954de487e45c4349631c2b9449ba28d</id>
<content type='text'>
Commit bea89d038ac5 added strlcat but also introduced a memchr wrapper
in the source tree rather than using the autogenerated one used for
AARCH64_STRING_FUNCS.  Move memchr.S to MDSRS and add a cleanup rule for
the old wrapper.

Reviewed by:	fuz
Sponsored by:	The FreeBSD Foundation
Fixes: bea89d038ac5 ("lib/libc/aarch64/string: add strlcat SIMD implementation")
Differential Revision: https://reviews.freebsd.org/D48502
</content>
</entry>
<entry>
<title>libc/aarch64: fix strlen() when flush-to-zero is set</title>
<updated>2025-01-16T01:20:30Z</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2025-01-13T13:41:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=521c1fe0e2002dfd7d8db86eb7144b7865229912'/>
<id>urn:sha1:521c1fe0e2002dfd7d8db86eb7144b7865229912</id>
<content type='text'>
Our SIMD-enhanced strlen() implementation for AArch64 uses
a floating-point comparison to compare a bit mask to zero.
This works fine under normal circumstances, but fails if
the FZ (flush-to-zero) flag is set in FPCR (the floating-point
control register) as then the CPU no longer distinguishes
denormals from zero.

This was not caught during testing; this flag is rarely set
and programs that do so rarely perform string manipulation.

Avoid this problem by using an integer comparison instead.
The performance impact seems to be small (about 0.5 %) on
the Windows 2023 Dev Kit, but seems to be more significant
(up to around 19%) on the RPi 5.

Reviewed by:	getz
Fixes:		3863fec1ce2dc6033f094a085118605ea89db9e2
Differential Revision:	https://reviews.freebsd.org/D48442
</content>
</entry>
<entry>
<title>lib/libc/aarch64/string: add timingsafe_memcmp() assembly implementation</title>
<updated>2025-01-10T15:02:41Z</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2024-12-09T09:50:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3f224333af163d5fcd7547a20993dcf18f19076c'/>
<id>urn:sha1:3f224333af163d5fcd7547a20993dcf18f19076c</id>
<content type='text'>
A port of the amd64 implementation with some slight changes due to
differences in instructions provided by aarch64.

No ASIMD for the same reason as the amd64 code: it's just not particularly
suitable for this application.

Event:		EuroBSDcon 2024
Approved by:	security (cperciva)
Reviewed by:	getz, cperciva
Differential Revision:	https://reviews.freebsd.org/D46758
</content>
</entry>
</feed>
