]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
erasure-code/isa/xor_op: avoid empty function if not ARM.
authorRongqi Sun <sunrongqi@huawei.com>
Tue, 19 Dec 2023 07:15:02 +0000 (15:15 +0800)
committerRongqi Sun <sunrongqi@huawei.com>
Tue, 19 Dec 2023 07:17:56 +0000 (15:17 +0800)
Signed-off-by: Rongqi Sun <sunrongqi@huawei.com>
src/erasure-code/isa/xor_op.cc
src/erasure-code/isa/xor_op.h

index 4f507c9b26257eb14cc0b36c62d4d861af530e7b..33f133539d5f6d98ebe42b7c136a11661a2990f9 100644 (file)
@@ -197,6 +197,7 @@ region_sse2_xor(char** src,
   return;
 }
 
+#if defined(__aarch64__) && defined(__ARM_NEON)
 void
 // -----------------------------------------------------------------------------
 region_neon_xor(char **src,
@@ -205,7 +206,6 @@ region_neon_xor(char **src,
                 unsigned size)
 // -----------------------------------------------------------------------------
 {
-#if defined(__aarch64__) && defined(__ARM_NEON)
   ceph_assert(!(size % EC_ISA_VECTOR_NEON_WORDSIZE));
   unsigned char *p = (unsigned char *)parity;
   unsigned char *vbuf[256] = { NULL };
@@ -232,6 +232,6 @@ region_neon_xor(char **src,
     vst1q_u64((uint64_t *)(p + 16), d0_2);
     p += EC_ISA_VECTOR_NEON_WORDSIZE;
   }
-#endif // __aarch64__ && __ARM_NEON
   return;
 }
+#endif // __aarch64__ && __ARM_NEON
index 46304eee1cce43c333d78f69148778402b0c5e73..86b1645b616e96223b2cc904aab6d7f9685e9b8b 100644 (file)
@@ -83,6 +83,7 @@ region_sse2_xor(char** src /* array of 64-byte aligned source pointer to xor */,
                 int src_size /* size of the source pointer array */,
                 unsigned size /* size of the region to xor */);
 
+#if defined(__aarch64__) && defined(__ARM_NEON)
 // -------------------------------------------------------------------------
 // compute region XOR like parity = src[0] ^ src[1] ... ^ src[src_size-1]
 // using NEON 32-byte operations
@@ -92,5 +93,5 @@ region_neon_xor(char** src    /* array of 64-byte aligned source pointer to xor
                 char* parity  /* 32-byte aligned output pointer containing the parity */,
                 int src_size  /* size of the source pointer array */,
                 unsigned size /* size of the region to xor */);
-
+#endif // __aarch64__ && __ARM_NEON
 #endif // EC_ISA_XOR_OP_H