]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed ARM compatibility
authorYann Collet <yann.collet.73@gmail.com>
Sat, 26 Mar 2016 16:50:26 +0000 (17:50 +0100)
committerYann Collet <yann.collet.73@gmail.com>
Sat, 26 Mar 2016 16:50:26 +0000 (17:50 +0100)
Makefile
lib/bitstream.h

index 93d5e05286c6e781913450767cde3b0660c2710e..494f59dcac5dce2c9b370e35751a895585c74693 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -89,9 +89,8 @@ gpptest: clean
        $(MAKE) all CC=g++ CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
 
 armtest: clean
-#      $(MAKE) -C $(ZSTDDIR) all CC=arm-linux-gnueabi-gcc MOREFLAGS="-Werror"
        $(MAKE) -C $(PRGDIR) datagen   # use native, faster
-       $(MAKE) -C $(PRGDIR) test CC=arm-linux-gnueabi-gcc ZSTDRTTEST= MOREFLAGS=-static # MOREFLAGS="-Werror -static"
+       $(MAKE) -C $(PRGDIR) test CC=arm-linux-gnueabi-gcc ZSTDRTTEST= MOREFLAGS="-Werror -static"
 
 # for Travis CI
 arminstall: clean   
@@ -105,7 +104,7 @@ armtest-w-install: clean arminstall armtest
 
 ppctest: clean
        $(MAKE) -C $(PRGDIR) datagen   # use native, faster
-       $(MAKE) -C $(PRGDIR) test CC=powerpc-linux-gnu-gcc ZSTDRTTEST= MOREFLAGS=-static # MOREFLAGS="-Werror -static" 
+       $(MAKE) -C $(PRGDIR) test CC=powerpc-linux-gnu-gcc ZSTDRTTEST= MOREFLAGS="-Werror -static" 
 
 # for Travis CI
 ppcinstall: clean   
index 404006808bea8921f2f7f22c826183630cf56ffe..fd114e55a1cec2756d9635fa4190ba39fafcfea3 100644 (file)
@@ -53,6 +53,14 @@ extern "C" {
 #include "error_private.h"  /* error codes and messages */
 
 
+/*=========================================
+*  Target specific
+=========================================*/
+#if defined(__BMI__) && defined(__GNUC__)
+#  include <immintrin.h>   /* support for bextr (experimental) */
+#endif
+
+
 /*-******************************************
 *  bitStream encoding API (write forward)
 ********************************************/
@@ -290,7 +298,6 @@ MEM_STATIC size_t BIT_getUpperBits(size_t bitD, U32 const start)
     return bitD >> start;
 }
 
-#include <immintrin.h>
 MEM_STATIC size_t BIT_getMiddleBits(size_t bitD, U32 const nbBits, U32 const start)
 {
 #if defined(__BMI__) && defined(__GNUC__)   /* experimental */