Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: [PATCH] amd64: import optimized memcmp from FreeBSD
To:
Mateusz Guzik <mjguzik@gmail.com>
Cc:
Christian Schulte <cs@schulte.it>, tech@openbsd.org, deraadt@openbsd.org
Date:
Mon, 2 Dec 2024 10:03:05 +0000

Download raw body.

Thread
On 2024/12/02 07:57, Mateusz Guzik wrote:
> OpenBSD libc for the amd64 platform uses a C variant of the memcmp
> routine (as opposed to the kernel which has the problematic rep variant)

oh, interesting, so bcmp is asm and memcmp is C for amd64!

$ ls -1 libc/arch/*/*/*cmp*                                libc/arch/amd64/string/bcmp.S                              libc/arch/amd64/string/strcmp.S                            libc/arch/arm/string/memcmp.S                              libc/arch/arm/string/strcmp.S                              libc/arch/arm/string/strncmp.S                             libc/arch/i386/string/bcmp.S                               libc/arch/i386/string/memcmp.S                             libc/arch/i386/string/strcmp.S                             libc/arch/i386/string/strncmp.S                            libc/arch/mips64/string/bcmp.S                             libc/arch/mips64/string/strcmp.S