svn commit: r327807 - head/sys/contrib/zstd/lib/freebsd
Conrad Meyer
cem at FreeBSD.org
Thu Jan 11 06:30:51 UTC 2018
Author: cem
Date: Thu Jan 11 06:30:50 2018
New Revision: 327807
URL: https://svnweb.freebsd.org/changeset/base/327807
Log:
Zstd: Add bswap intrinsics for small MIPS systems (e.g., Onion Omega)
Reported by: mizhka
Sponsored by: Dell EMC Isilon
Modified:
head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.c
Modified: head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.c
==============================================================================
--- head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.c Thu Jan 11 05:36:13 2018 (r327806)
+++ head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.c Thu Jan 11 06:30:50 2018 (r327807)
@@ -27,6 +27,7 @@
*/
#include "zstd_kfreebsd.h"
+#include <sys/endian.h>
/*
* The kernel as a standalone target does not link against libgcc or
@@ -43,6 +44,19 @@
* A subsequent enhancement might create a mini compiler-rt library for kernel
* 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
More information about the svn-src-all
mailing list