Lines Matching refs:val

406     U16 val; LZ4_memcpy(&val, memPtr, sizeof(val)); return val;  in LZ4_read16()  local
411 U32 val; LZ4_memcpy(&val, memPtr, sizeof(val)); return val; in LZ4_read32() local
416 reg_t val; LZ4_memcpy(&val, memPtr, sizeof(val)); return val; in LZ4_read_ARCH() local
569 static unsigned LZ4_NbCommonBytes (reg_t val) in LZ4_NbCommonBytes() argument
571 assert(val != 0); in LZ4_NbCommonBytes()
573 if (sizeof(val) == 8) { in LZ4_NbCommonBytes()
583 return (unsigned)__builtin_ia32_tzcnt_u64(val) >> 3; in LZ4_NbCommonBytes()
586 return (unsigned)_tzcnt_u64(val) >> 3; in LZ4_NbCommonBytes()
590 _BitScanForward64(&r, (U64)val); in LZ4_NbCommonBytes()
595 return (unsigned)__builtin_ctzll((U64)val) >> 3; in LZ4_NbCommonBytes()
598 val ^= val - 1; in LZ4_NbCommonBytes()
599 return (unsigned)(((U64)((val & (m - 1)) * m)) >> 56); in LZ4_NbCommonBytes()
604 _BitScanForward(&r, (U32)val); in LZ4_NbCommonBytes()
609 return (unsigned)__builtin_ctz((U32)val) >> 3; in LZ4_NbCommonBytes()
612 return (unsigned)((((val - 1) ^ val) & (m - 1)) * m) >> 24; in LZ4_NbCommonBytes()
616 if (sizeof(val)==8) { in LZ4_NbCommonBytes()
620 return (unsigned)__builtin_clzll((U64)val) >> 3; in LZ4_NbCommonBytes()
636 U64 const t = (((val >> 8) - mask) | val) & mask; in LZ4_NbCommonBytes()
642 static const U32 by32 = sizeof(val)*4; /* 32 on 64 bits (goal), 16 on 32 bits. in LZ4_NbCommonBytes()
646 if (!(val>>by32)) { r=4; } else { r=0; val>>=by32; } in LZ4_NbCommonBytes()
647 if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; } in LZ4_NbCommonBytes()
648 r += (!val); in LZ4_NbCommonBytes()
656 return (unsigned)__builtin_clz((U32)val) >> 3; in LZ4_NbCommonBytes()
658 val >>= 8; in LZ4_NbCommonBytes()
659 val = ((((val + 0x00FFFF00) | 0x00FFFFFF) + val) | in LZ4_NbCommonBytes()
660 (val + 0x00FF0000)) >> 24; in LZ4_NbCommonBytes()
661 return (unsigned)val ^ 3; in LZ4_NbCommonBytes()