]> wimlib.net Git - wimlib/blobdiff - include/wimlib/lz_extend.h
Stop force-inlining everything marked 'inline'
[wimlib] / include / wimlib / lz_extend.h
index 2fb76bc921d47c5b1986c087b1e12e24cd7b62ac..26f0ce5cd11be42f76bbee3508d16e6c119d9772 100644 (file)
  * Return the number of bytes at @matchptr that match the bytes at @strptr, up
  * to a maximum of @max_len.  Initially, @len bytes are matched.
  */
-static inline u32
+static forceinline u32
 lz_extend(const u8 * const strptr, const u8 * const matchptr,
          u32 len, const u32 max_len)
 {
-       while (UNALIGNED_ACCESS_IS_FAST && len + WORDSIZE <= max_len) {
+       while (UNALIGNED_ACCESS_IS_FAST && len + WORDBYTES <= max_len) {
                machine_word_t v = load_word_unaligned(matchptr + len) ^
                                   load_word_unaligned(strptr + len);
                if (v != 0) {
                        if (CPU_IS_LITTLE_ENDIAN)
-                               len += ffsw(v) >> 3;
+                               len += bsfw(v) >> 3;
                        else
-                               len += (8 * WORDSIZE - 1 - flsw(v)) >> 3;
+                               len += (WORDBITS - 1 - bsrw(v)) >> 3;
                        return len;
                }
-               len += WORDSIZE;
+               len += WORDBYTES;
        }
 
        while (len < max_len && matchptr[len] == strptr[len])