Zstd: Add bswap intrinsics for small MIPS systems (e.g., Onion Omega)

Reported by:	mizhka
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Conrad Meyer 2018-01-11 06:30:50 +00:00
parent de45c289b9
commit 8fb95dc265
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327807

View File

@ -27,6 +27,7 @@
*/
#include "zstd_kfreebsd.h"
#include <sys/endian.h>
/*
* The kernel as a standalone target does not link against libgcc or
@ -44,6 +45,19 @@
* use and move these over there instead.
*/
/* Swap endianness */
int
__bswapsi2(int x)
{
return (bswap32(x));
}
long long
__bswapdi2(long long x)
{
return (bswap64(x));
}
/* Count trailing zeros */
int
__ctzsi2(int x)