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:
parent
de45c289b9
commit
8fb95dc265
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user