From 1a882833c0e81309d0d72d46c768820744d053df Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Tue, 5 Sep 2023 08:23:20 -0700 Subject: Add support for ARM intrinsics in crc_memcpy This change replaces inline x86 intrinsics with generic versions that compile for both x86 and ARM depending on the target arch. This change does not enable the accelerated crc memcpy engine on ARM. That will be done in a subsequent change after the optimal number of vector and integer regions for different CPUs is determined. PiperOrigin-RevId: 562785420 Change-Id: I8ba4aa8de17587cedd92532f03767059a481f159 --- absl/crc/internal/crc_memcpy.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'absl/crc/internal/crc_memcpy.h') diff --git a/absl/crc/internal/crc_memcpy.h b/absl/crc/internal/crc_memcpy.h index 4909d433..1147f4ef 100644 --- a/absl/crc/internal/crc_memcpy.h +++ b/absl/crc/internal/crc_memcpy.h @@ -20,12 +20,15 @@ #include "absl/base/config.h" #include "absl/crc/crc32c.h" +#include "absl/crc/internal/crc32_x86_arm_combined_simd.h" // Defined if the class AcceleratedCrcMemcpyEngine exists. #if defined(__x86_64__) && defined(__SSE4_2__) #define ABSL_INTERNAL_HAVE_X86_64_ACCELERATED_CRC_MEMCPY_ENGINE 1 #elif defined(_MSC_VER) && defined(__AVX__) #define ABSL_INTERNAL_HAVE_X86_64_ACCELERATED_CRC_MEMCPY_ENGINE 1 +#elif defined(ABSL_CRC_INTERNAL_HAVE_ARM_SIMD) +#define ABSL_INTERNAL_HAVE_ARM_ACCELERATED_CRC_MEMCPY_ENGINE 1 #endif namespace absl { -- cgit v1.2.3