]> git.saurik.com Git - apple/xnu.git/blobdiff - libkern/mkext.c
xnu-4903.241.1.tar.gz
[apple/xnu.git] / libkern / mkext.c
index 86238fc35a48b39f2f39c26af44379668f16434c..59634832a4edcded381023773949e935cccaefdc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2016 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
@@ -46,22 +46,6 @@ mkext_adler32(uint8_t *buf, int32_t len)
     unsigned long s2 = 0; // (adler >> 16) & 0xffff;
     int k;
 
-#if defined _ARM_ARCH_6
-
-       /* align buf to 16-byte boundary */
-    while ((((uintptr_t)buf)&15)&&(len>0)) { /* not on a 16-byte boundary */
-        len--;
-        s1 += *buf++;
-        s2 += s1;
-        if (s1 >= BASE) s1 -= BASE;
-    }
-       s2 %= BASE;
-
-       if (len>=16) {
-               return adler32_vec(s1, s2, buf, len);
-       }
-
-#endif
 
     while (len > 0) {
         k = len < NMAX ? len : NMAX;
@@ -98,7 +82,9 @@ mkext_adler32(uint8_t *buf, int32_t len)
 #define F         18    /* upper limit for match_length */
 #define THRESHOLD 2     /* encode string into position and length
                            if match_length is greater than this */
+#if !KERNEL
 #define NIL       N     /* index for root of binary search trees */
+#endif
 
 struct encode_state {
     /*