]> git.saurik.com Git - apple/xnu.git/blobdiff - libkern/zlib/adler32.c
xnu-3248.20.55.tar.gz
[apple/xnu.git] / libkern / zlib / adler32.c
index bf0d9723ac2e275dee4a669d6b521b33184c6049..e4b6756e9b9165cc6d404027a0e10ef7ab5bf9b3 100644 (file)
@@ -32,8 +32,6 @@
 
 /* @(#) $Id$ */
 
-#include <stdint.h> // For uintptr_t.
-
 
 #define ZLIB_INTERNAL
 #if KERNEL
@@ -42,9 +40,6 @@
     #include "zlib.h"
 #endif /* KERNEL */
 
-#if defined _ARM_ARCH_6
-       extern uLong adler32_vec(uLong adler, uLong sum2, const Bytef *buf, uInt len);
-#endif
 
 #define BASE 65521UL    /* largest prime smaller than 65536 */
 #define NMAX 5552
@@ -98,9 +93,7 @@ uLong ZEXPORT adler32(adler, buf, len)
     uInt len;
 {
     unsigned long sum2;
-#if !defined _ARM_ARCH_6
     unsigned n;
-#endif
 
     /* split Adler-32 into component sums */
     sum2 = (adler >> 16) & 0xffff;
@@ -133,19 +126,6 @@ uLong ZEXPORT adler32(adler, buf, len)
         return adler | (sum2 << 16);
     }
 
-#if defined _ARM_ARCH_6
-    /* align buf to 16-byte boundary */
-    while (((uintptr_t)buf)&15) { /* not on a 16-byte boundary */
-        len--;
-        adler += *buf++;
-        sum2 += adler;
-        if (adler >= BASE) adler -= BASE;
-        MOD4(sum2);             /* only added so many BASE's */
-    }
-
-    return adler32_vec(adler, sum2, buf, len);      // armv7 neon vectorized implementation
-
-#else   //  _ARM_ARCH_6
 
     /* do length NMAX blocks -- requires just one modulo operation */
     while (len >= NMAX) {
@@ -176,8 +156,6 @@ uLong ZEXPORT adler32(adler, buf, len)
 
     /* return recombined sums */
     return adler | (sum2 << 16);
-
-#endif  // _ARM_ARCH_6
 }
 
 /* ========================================================================= */