NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/59789 CVS commit: src/sys



The following reply was made to PR port-sparc64/59789; it has been noted by GNATS.

From: "Nia Alarie" <nia%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/59789 CVS commit: src/sys
Date: Wed, 26 Nov 2025 22:25:11 +0000

 Module Name:	src
 Committed By:	nia
 Date:		Wed Nov 26 22:25:11 UTC 2025
 
 Modified Files:
 	src/sys/arch/sparc/include: bswap.h
 	src/sys/arch/sparc64/include: bswap.h
 	src/sys/sys: bswap.h endian.h
 
 Log Message:
 sparc: Avoid using GCC builtins for byte-swapping and endian encoding.
 
 gcc on most netbsd architectures (mostly excluding sparc and vax) can
 generate fast MD byte-swapping code. On sparc it generates a function
 call, which is very slow. We have existing inline macros for byte
 swapping, so use those instead.
 
 bswap on sparc with gcc is still non-ideal, so also reactivate the
 portable endian encoding functions we apparently haven't been using
 since the gcc2 days, rather than using bswap for that.
 
 These changes improve the speed of disk encryption on ultrasparc ii
 by almost 40% (the endian.h change being more significant in making
 that number go high).
 
 clang does the right thing on sparc (or at least introduces different
 bottlenecks...), so avoid this there.
 
 Thanks joerg for analysis of the problem, uwe for reviewing the patch.
 
 PR port-sparc64/59789 bswap is slow
 PR kern/59774 bearssl 32-bit AES is too slow
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sparc/include/bswap.h
 cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sparc64/include/bswap.h
 cvs rdiff -u -r1.19 -r1.20 src/sys/sys/bswap.h
 cvs rdiff -u -r1.37 -r1.38 src/sys/sys/endian.h
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index