Add ZSTD_NO_INTRINSICS macro to avoid explicit intrinsics
parent
f91ed5c766
commit
e975de289c
|
@ -35,10 +35,12 @@ extern "C" {
|
|||
/*=========================================
|
||||
* Target specific
|
||||
=========================================*/
|
||||
#if defined(__BMI__) && defined(__GNUC__)
|
||||
#ifndef ZSTD_NO_INTRINSICS
|
||||
# if defined(__BMI__) && defined(__GNUC__)
|
||||
# include <immintrin.h> /* support for bextr (experimental) */
|
||||
#elif defined(__ICCARM__)
|
||||
# elif defined(__ICCARM__)
|
||||
# include <intrinsics.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define STREAM_ACCUMULATOR_MIN_32 25
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*-*************************************
|
||||
* Dependencies
|
||||
***************************************/
|
||||
#ifdef __aarch64__
|
||||
#if !defined(ZSTD_NO_INTRINSICS) && defined(__aarch64__)
|
||||
#include <arm_neon.h>
|
||||
#endif
|
||||
#include "compiler.h"
|
||||
|
@ -228,7 +228,7 @@ static const U32 OF_defaultNormLog = OF_DEFAULTNORMLOG;
|
|||
* Shared functions to include for inlining
|
||||
*********************************************/
|
||||
static void ZSTD_copy8(void* dst, const void* src) {
|
||||
#ifdef __aarch64__
|
||||
#if !defined(ZSTD_NO_INTRINSICS) && defined(__aarch64__)
|
||||
vst1_u8((uint8_t*)dst, vld1_u8((const uint8_t*)src));
|
||||
#else
|
||||
ZSTD_memcpy(dst, src, 8);
|
||||
|
@ -237,7 +237,7 @@ static void ZSTD_copy8(void* dst, const void* src) {
|
|||
|
||||
#define COPY8(d,s) { ZSTD_copy8(d,s); d+=8; s+=8; }
|
||||
static void ZSTD_copy16(void* dst, const void* src) {
|
||||
#ifdef __aarch64__
|
||||
#if !defined(ZSTD_NO_INTRINSICS) && defined(__aarch64__)
|
||||
vst1q_u8((uint8_t*)dst, vld1q_u8((const uint8_t*)src));
|
||||
#else
|
||||
ZSTD_memcpy(dst, src, 16);
|
||||
|
|
Loading…
Reference in New Issue