Lines Matching refs:U32

22                 U32 mls)
25 U32* const hashTable = ms->hashTable;
26 U32 const hashLog = cParams->hashLog;
28 U32* const bt = ms->chainTable;
29 U32 const btLog = cParams->chainLog - 1;
30 U32 const btMask = (1 << btLog) - 1;
33 U32 const target = (U32)(ip - base);
34 U32 idx = ms->nextToUpdate;
45 U32 const matchIndex = hashTable[h];
47 U32* const nextCandidatePtr = bt + 2*(idx&btMask);
48 U32* const sortMarkPtr = nextCandidatePtr + 1;
65 U32 curr, const BYTE* inputEnd,
66 U32 nbCompares, U32 btLow,
70 U32* const bt = ms->chainTable;
71 U32 const btLog = cParams->chainLog - 1;
72 U32 const btMask = (1 << btLog) - 1;
76 const U32 dictLimit = ms->window.dictLimit;
82 U32* smallerPtr = bt + 2*(curr&btMask);
83 U32* largerPtr = smallerPtr + 1;
84 U32 matchIndex = *smallerPtr; /* this candidate is unsorted : next sorted candidate is reached through *smallerPtr, while *largerPtr contains previous unsorted candidate (which is already saved and can be overwritten) */
85 U32 dummy32; /* to be nullified at the end */
86 U32 const windowValid = ms->window.lowLimit;
87 U32 const maxDistance = 1U << cParams->windowLog;
88 U32 const windowLow = (curr - windowValid > maxDistance) ? curr - maxDistance : windowValid;
97 U32* const nextPtr = bt + 2*(matchIndex & btMask);
122 curr, matchIndex, (U32)matchLength);
158 U32 nbCompares,
159 U32 const mls,
164 const U32 * const dictHashTable = dms->hashTable;
165 U32 const hashLog = dmsCParams->hashLog;
167 U32 dictMatchIndex = dictHashTable[h];
171 U32 const curr = (U32)(ip-base);
174 U32 const dictHighLimit = (U32)(dms->window.nextSrc - dms->window.base);
175 U32 const dictLowLimit = dms->window.lowLimit;
176 U32 const dictIndexDelta = ms->window.lowLimit - dictHighLimit;
178 U32* const dictBt = dms->chainTable;
179 U32 const btLog = dmsCParams->chainLog - 1;
180 U32 const btMask = (1 << btLog) - 1;
181 U32 const btLow = (btMask >= dictHighLimit - dictLowLimit) ? dictLowLimit : dictHighLimit - btMask;
189 U32* const nextPtr = dictBt + 2*(dictMatchIndex & btMask);
197 U32 matchIndex = dictMatchIndex + dictIndexDelta;
198 if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(curr-matchIndex+1) - ZSTD_highbit32((U32)offsetPtr[0]+1)) ) {
200 curr, (U32)bestLength, (U32)matchLength, (U32)*offsetPtr, STORE_OFFSET(curr - matchIndex), dictMatchIndex, matchIndex);
221 U32 const mIndex = curr - (U32)STORED_OFFSET(*offsetPtr); (void)mIndex;
223 curr, (U32)bestLength, (U32)*offsetPtr, mIndex);
234 U32 const mls,
238 U32* const hashTable = ms->hashTable;
239 U32 const hashLog = cParams->hashLog;
241 U32 matchIndex = hashTable[h];
244 U32 const curr = (U32)(ip-base);
245 U32 const windowLow = ZSTD_getLowestMatchIndex(ms, curr, cParams->windowLog);
247 U32* const bt = ms->chainTable;
248 U32 const btLog = cParams->chainLog - 1;
249 U32 const btMask = (1 << btLog) - 1;
250 U32 const btLow = (btMask >= curr) ? 0 : curr - btMask;
251 U32 const unsortLimit = MAX(btLow, windowLow);
253 U32* nextCandidate = bt + 2*(matchIndex&btMask);
254 U32* unsortedMark = bt + 2*(matchIndex&btMask) + 1;
255 U32 nbCompares = 1U << cParams->searchLog;
256 U32 nbCandidates = nbCompares;
257 U32 previousCandidate = 0;
289 U32* const nextCandidateIdxPtr = bt + 2*(matchIndex&btMask) + 1;
290 U32 const nextCandidateIdx = *nextCandidateIdxPtr;
300 const U32 dictLimit = ms->window.dictLimit;
303 U32* smallerPtr = bt + 2*(curr&btMask);
304 U32* largerPtr = bt + 2*(curr&btMask) + 1;
305 U32 matchEndIdx = curr + 8 + 1;
306 U32 dummy32; /* to be nullified at the end */
313 U32* const nextPtr = bt + 2*(matchIndex & btMask);
329 matchEndIdx = matchIndex + (U32)matchLength;
330 if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(curr-matchIndex+1) - ZSTD_highbit32((U32)offsetPtr[0]+1)) )
371 U32 const mIndex = curr - (U32)STORED_OFFSET(*offsetPtr); (void)mIndex;
373 curr, (U32)bestLength, (U32)*offsetPtr, mIndex);
385 const U32 mls /* template */,
401 U32 const target = (U32)(ip - base);
402 U32* const hashTable = ms->hashTable;
403 U32* const chainTable = ms->chainTable;
404 U32 const chainSize = 1 << ms->cParams.chainLog;
405 U32 idx = ms->nextToUpdate;
406 U32 const minChain = chainSize < target - idx ? target - chainSize : idx;
407 U32 const bucketSize = 1 << ZSTD_LAZY_DDSS_BUCKET_LOG;
408 U32 const cacheSize = bucketSize - 1;
409 U32 const chainAttempts = (1 << ms->cParams.searchLog) - cacheSize;
410 U32 const chainLimit = chainAttempts > 255 ? 255 : chainAttempts;
417 U32 const hashLog = ms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG;
418 U32* const tmpHashTable = hashTable;
419 U32* const tmpChainTable = hashTable + ((size_t)1 << hashLog);
420 U32 const tmpChainSize = (U32)((1 << ZSTD_LAZY_DDSS_BUCKET_LOG) - 1) << hashLog;
421 U32 const tmpMinChain = tmpChainSize < target ? target - tmpChainSize : idx;
422 U32 hashIdx;
431 U32 const h = (U32)ZSTD_hashPtr(base + idx, hashLog, ms->cParams.minMatch);
440 U32 chainPos = 0;
442 U32 count;
443 U32 countBeyondMinChain = 0;
444 U32 i = tmpHashTable[hashIdx];
489 U32 const bucketIdx = --hashIdx << ZSTD_LAZY_DDSS_BUCKET_LOG;
490 U32 const chainPackedPointer = tmpHashTable[hashIdx];
491 U32 i;
500 U32 const h = (U32)ZSTD_hashPtr(base + idx, hashLog, ms->cParams.minMatch)
502 U32 i;
516 size_t ZSTD_dedicatedDictSearch_lazy_search(size_t* offsetPtr, size_t ml, U32 nbAttempts,
519 const BYTE* const prefixStart, const U32 curr,
520 const U32 dictLimit, const size_t ddsIdx) {
521 const U32 ddsLowestIndex = dms->window.dictLimit;
524 const U32 ddsSize = (U32)(ddsEnd - ddsBase);
525 const U32 ddsIndexDelta = dictLimit - ddsSize;
526 const U32 bucketSize = (1 << ZSTD_LAZY_DDSS_BUCKET_LOG);
527 const U32 bucketLimit = nbAttempts < bucketSize - 1 ? nbAttempts : bucketSize - 1;
528 U32 ddsAttempt;
529 U32 matchIndex;
536 U32 const chainPackedPointer = dms->hashTable[ddsIdx + bucketSize - 1];
537 U32 const chainIndex = chainPackedPointer >> 8;
573 U32 const chainPackedPointer = dms->hashTable[ddsIdx + bucketSize - 1];
574 U32 chainIndex = chainPackedPointer >> 8;
575 U32 const chainLength = chainPackedPointer & 0xFF;
576 U32 const chainAttempts = nbAttempts - ddsAttempt;
577 U32 const chainLimit = chainAttempts > chainLength ? chainLength : chainAttempts;
578 U32 chainAttempt;
617 FORCE_INLINE_TEMPLATE U32 ZSTD_insertAndFindFirstIndex_internal(
620 const BYTE* ip, U32 const mls)
622 U32* const hashTable = ms->hashTable;
623 const U32 hashLog = cParams->hashLog;
624 U32* const chainTable = ms->chainTable;
625 const U32 chainMask = (1 << cParams->chainLog) - 1;
627 const U32 target = (U32)(ip - base);
628 U32 idx = ms->nextToUpdate;
641 U32 ZSTD_insertAndFindFirstIndex(ZSTD_matchState_t* ms, const BYTE* ip) {
652 const U32 mls, const ZSTD_dictMode_e dictMode)
655 U32* const chainTable = ms->chainTable;
656 const U32 chainSize = (1 << cParams->chainLog);
657 const U32 chainMask = chainSize-1;
660 const U32 dictLimit = ms->window.dictLimit;
663 const U32 curr = (U32)(ip-base);
664 const U32 maxDistance = 1U << cParams->windowLog;
665 const U32 lowestValid = ms->window.lowLimit;
666 const U32 withinMaxDistance = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid;
667 const U32 isDictionary = (ms->loadedDictEnd != 0);
668 const U32 lowLimit = isDictionary ? lowestValid : withinMaxDistance;
669 const U32 minChain = curr > chainSize ? curr - chainSize : 0;
670 U32 nbAttempts = 1U << cParams->searchLog;
674 const U32 ddsHashLog = dictMode == ZSTD_dedicatedDictSearch
679 U32 matchIndex;
682 const U32* entry = &dms->hashTable[ddsIdx];
719 const U32* const dmsChainTable = dms->chainTable;
720 const U32 dmsChainSize = (1 << dms->cParams.chainLog);
721 const U32 dmsChainMask = dmsChainSize - 1;
722 const U32 dmsLowestIndex = dms->window.dictLimit;
725 const U32 dmsSize = (U32)(dmsEnd - dmsBase);
726 const U32 dmsIndexDelta = dictLimit - dmsSize;
727 const U32 dmsMinChain = dmsSize > dmsChainSize ? dmsSize - dmsChainSize : 0;
772 static U32 ZSTD_VecMask_next(ZSTD_VecMask val) {
776 U32 mostSignificantWord = (U32)(val >> 32);
777 U32 leastSignificantWord = (U32)val;
779 return 32 + (U32)__builtin_ctz(mostSignificantWord);
781 return (U32)__builtin_ctz(leastSignificantWord);
784 return (U32)__builtin_ctzll(val);
793 return (U32)((((val + (val >> 4)) & 0xF0F0F0F0F0F0F0FULL) * 0x101010101010101ULL) >> 56);
802 U64 ZSTD_rotateRight_U64(U64 const value, U32 count) {
809 U32 ZSTD_rotateRight_U32(U32 const value, U32 count) {
812 return (value >> count) | (U32)(value << ((0U - count) & 0x1F));
816 U16 ZSTD_rotateRight_U16(U16 const value, U32 count) {
826 FORCE_INLINE_TEMPLATE U32 ZSTD_row_nextIndex(BYTE* const tagRow, U32 const rowMask) {
827 U32 const next = (*tagRow - 1) & rowMask;
843 FORCE_INLINE_TEMPLATE void ZSTD_row_prefetch(U32 const* hashTable, U16 const* tagTable, U32 const relRow, U32 const rowLog) {
863 U32 const rowLog, U32 const mls,
864 U32 idx, const BYTE* const iLimit)
866 U32 const* const hashTable = ms->hashTable;
868 U32 const hashLog = ms->rowHashLog;
869 U32 const maxElemsToPrefetch = (base + idx) > iLimit ? 0 : (U32)(iLimit - (base + idx) + 1);
870 U32 const lim = idx + MIN(ZSTD_ROW_HASH_CACHE_SIZE, maxElemsToPrefetch);
873 U32 const hash = (U32)ZSTD_hashPtr(base + idx, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls);
874 U32 const row = (hash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog;
888 FORCE_INLINE_TEMPLATE U32 ZSTD_row_nextCachedHash(U32* cache, U32 const* hashTable,
890 U32 idx, U32 const hashLog,
891 U32 const rowLog, U32 const mls)
893 U32 const newHash = (U32)ZSTD_hashPtr(base+idx+ZSTD_ROW_HASH_CACHE_SIZE, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls);
894 U32 const row = (newHash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog;
896 { U32 const hash = cache[idx & ZSTD_ROW_HASH_CACHE_MASK];
906 U32 updateStartIdx, U32 const updateEndIdx,
907 U32 const mls, U32 const rowLog,
908 U32 const rowMask, U32 const useCache)
910 U32* const hashTable = ms->hashTable;
912 U32 const hashLog = ms->rowHashLog;
917 U32 const hash = useCache ? ZSTD_row_nextCachedHash(ms->hashCache, hashTable, tagTable, base, updateStartIdx, hashLog, rowLog, mls)
918 : (U32)ZSTD_hashPtr(base + updateStartIdx, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls);
919 U32 const relRow = (hash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog;
920 U32* const row = hashTable + relRow;
923 U32 const pos = ZSTD_row_nextIndex(tagRow, rowMask);
936 U32 const mls, U32 const rowLog,
937 U32 const rowMask, U32 const useCache)
939 U32 idx = ms->nextToUpdate;
941 const U32 target = (U32)(ip - base);
942 const U32 kSkipThreshold = 384;
943 const U32 kMaxMatchStartPositionsToUpdate = 96;
944 const U32 kMaxMatchEndPositionsToUpdate = 32;
953 U32 const bound = idx + kMaxMatchStartPositionsToUpdate;
969 const U32 rowLog = BOUNDED(4, ms->cParams.searchLog, 6);
970 const U32 rowMask = (1u << rowLog) - 1;
971 const U32 mls = MIN(ms->cParams.minMatch, 6 /* mls caps out at 6 */);
979 ZSTD_row_getSSEMask(int nbChunks, const BYTE* const src, const BYTE tag, const U32 head)
991 if (nbChunks == 2) return ZSTD_rotateRight_U32((U32)matches[1] << 16 | (U32)matches[0], head);
997 /* Returns a ZSTD_VecMask (U32) that has the nth bit set to 1 if the newly-computed "tag" matches
1002 ZSTD_row_getMatchMask(const BYTE* const tagRow, const BYTE tag, const U32 head, const U32 rowEntries)
1040 const U32 matches = vget_lane_u32(vreinterpret_u32_u8(t4), 0);
1096 return ZSTD_rotateRight_U32((U32)matches, head);
1107 * - The hashTable is effectively split into groups or "rows" of 16 or 32 entries of U32, and the hash determines
1124 const U32 mls, const ZSTD_dictMode_e dictMode,
1125 const U32 rowLog)
1127 U32* const hashTable = ms->hashTable;
1129 U32* const hashCache = ms->hashCache;
1130 const U32 hashLog = ms->rowHashLog;
1134 const U32 dictLimit = ms->window.dictLimit;
1137 const U32 curr = (U32)(ip-base);
1138 const U32 maxDistance = 1U << cParams->windowLog;
1139 const U32 lowestValid = ms->window.lowLimit;
1140 const U32 withinMaxDistance = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid;
1141 const U32 isDictionary = (ms->loadedDictEnd != 0);
1142 const U32 lowLimit = isDictionary ? lowestValid : withinMaxDistance;
1143 const U32 rowEntries = (1U << rowLog);
1144 const U32 rowMask = rowEntries - 1;
1145 const U32 cappedSearchLog = MIN(cParams->searchLog, rowLog); /* nb of searches is capped at nb entries per row */
1146 U32 nbAttempts = 1U << cappedSearchLog;
1154 U32 ddsExtraAttempts = 0; /* cctx hash tables are limited in searches, but allow extra searches into DDS */
1155 U32 dmsTag = 0;
1156 U32* dmsRow = NULL;
1160 const U32 ddsHashLog = dms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG;
1170 U32* const dmsHashTable = dms->hashTable;
1172 U32 const dmsHash = (U32)ZSTD_hashPtr(ip, dms->rowHashLog + ZSTD_ROW_HASH_TAG_BITS, mls);
1173 U32 const dmsRelRow = (dmsHash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog;
1183 U32 const hash = ZSTD_row_nextCachedHash(hashCache, hashTable, tagTable, base, curr, hashLog, rowLog, mls);
1184 U32 const relRow = (hash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog;
1185 U32 const tag = hash & ZSTD_ROW_HASH_TAG_MASK;
1186 U32* const row = hashTable + relRow;
1188 U32 const head = *tagRow & rowMask;
1189 U32 matchBuffer[ZSTD_ROW_HASH_MAX_ENTRIES];
1196 U32 const matchPos = (head + ZSTD_VecMask_next(matches)) & rowMask;
1197 U32 const matchIndex = row[matchPos];
1212 U32 const pos = ZSTD_row_nextIndex(tagRow, rowMask);
1219 U32 const matchIndex = matchBuffer[currMatch];
1251 const U32 dmsLowestIndex = dms->window.dictLimit;
1254 const U32 dmsSize = (U32)(dmsEnd - dmsBase);
1255 const U32 dmsIndexDelta = dictLimit - dmsSize;
1257 { U32 const head = *dmsTagRow & rowMask;
1258 U32 matchBuffer[ZSTD_ROW_HASH_MAX_ENTRIES];
1264 U32 const matchPos = (head + ZSTD_VecMask_next(matches)) & rowMask;
1265 U32 const matchIndex = dmsRow[matchPos];
1274 U32 const matchIndex = matchBuffer[currMatch];
1453 U32 const mls,
1454 U32 const rowLog,
1478 U32 rep[ZSTD_REP_NUM],
1480 const searchMethod_e searchMethod, const U32 depth,
1489 const U32 prefixLowestIndex = ms->window.dictLimit;
1491 const U32 mls = BOUNDED(4, ms->cParams.minMatch, 6);
1492 const U32 rowLog = BOUNDED(4, ms->cParams.searchLog, 6);
1494 U32 offset_1 = rep[0], offset_2 = rep[1], savedOffset=0;
1500 const U32 dictLowestIndex = isDxS ? dms->window.dictLimit : 0;
1504 const U32 dictIndexDelta = isDxS ?
1505 prefixLowestIndex - (U32)(dictEnd - dictBase) :
1507 const U32 dictAndPrefixLength = (U32)((ip - prefixLowest) + (dictEnd - dictLowest));
1509 DEBUGLOG(5, "ZSTD_compressBlock_lazy_generic (dictMode=%u) (searchFunc=%u)", (U32)dictMode, (U32)searchMethod);
1512 U32 const curr = (U32)(ip - base);
1513 U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, curr, ms->cParams.windowLog);
1514 U32 const maxRep = curr - windowLow;
1546 const U32 repIndex = (U32)(ip - base) + 1 - offset_1;
1551 if (((U32)((prefixLowestIndex-1) - repIndex) >= 3 /* intentional underflow */)
1585 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1);
1590 const U32 repIndex = (U32)(ip - base) - offset_1;
1594 if (((U32)((prefixLowestIndex-1) - repIndex) >= 3 /* intentional underflow */)
1599 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1);
1606 int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offset2))); /* raw approx */
1607 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 4);
1621 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1);
1626 const U32 repIndex = (U32)(ip - base) - offset_1;
1630 if (((U32)((prefixLowestIndex-1) - repIndex) >= 3 /* intentional underflow */)
1635 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1);
1642 int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offset2))); /* raw approx */
1643 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 7);
1663 U32 const matchIndex = (U32)((size_t)(start-base) - STORED_OFFSET(offcode));
1668 offset_2 = offset_1; offset_1 = (U32)STORED_OFFSET(offcode);
1673 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offcode, matchLength);
1680 U32 const current2 = (U32)(ip-base);
1681 U32 const repIndex = current2 - offset_2;
1685 if ( ((U32)((prefixLowestIndex-1) - (U32)repIndex) >= 3 /* intentional overflow */)
1689 offcode = offset_2; offset_2 = offset_1; offset_1 = (U32)offcode; /* swap offset_2 <=> offset_1 */
1704 offcode = offset_2; offset_2 = offset_1; offset_1 = (U32)offcode; /* swap repcodes */
1721 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1728 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1735 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1742 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1749 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1756 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1763 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1770 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1778 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1785 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1792 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1800 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1807 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1814 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1821 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1828 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1835 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1843 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1850 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1857 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
1866 U32 rep[ZSTD_REP_NUM],
1868 const searchMethod_e searchMethod, const U32 depth)
1876 const U32 dictLimit = ms->window.dictLimit;
1881 const U32 windowLog = ms->cParams.windowLog;
1882 const U32 mls = BOUNDED(4, ms->cParams.minMatch, 6);
1883 const U32 rowLog = BOUNDED(4, ms->cParams.searchLog, 6);
1885 U32 offset_1 = rep[0], offset_2 = rep[1];
1887 DEBUGLOG(5, "ZSTD_compressBlock_lazy_extDict_generic (searchFunc=%u)", (U32)searchMethod);
1908 U32 curr = (U32)(ip-base);
1911 { const U32 windowLow = ZSTD_getLowestMatchIndex(ms, curr+1, windowLog);
1912 const U32 repIndex = (U32)(curr+1 - offset_1);
1915 if ( ((U32)((dictLimit-1) - repIndex) >= 3) /* intentional overflow */
1943 const U32 windowLow = ZSTD_getLowestMatchIndex(ms, curr, windowLog);
1944 const U32 repIndex = (U32)(curr - offset_1);
1947 if ( ((U32)((dictLimit-1) - repIndex) >= 3) /* intentional overflow : do not test positions overlapping 2 memory segments */
1954 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1);
1962 int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offset2))); /* raw approx */
1963 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 4);
1975 const U32 windowLow = ZSTD_getLowestMatchIndex(ms, curr, windowLog);
1976 const U32 repIndex = (U32)(curr - offset_1);
1979 if ( ((U32)((dictLimit-1) - repIndex) >= 3) /* intentional overflow : do not test positions overlapping 2 memory segments */
1986 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1);
1994 int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offset2))); /* raw approx */
1995 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 7);
2005 U32 const matchIndex = (U32)((size_t)(start-base) - STORED_OFFSET(offcode));
2009 offset_2 = offset_1; offset_1 = (U32)STORED_OFFSET(offcode);
2015 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offcode, matchLength);
2021 const U32 repCurrent = (U32)(ip-base);
2022 const U32 windowLow = ZSTD_getLowestMatchIndex(ms, repCurrent, windowLog);
2023 const U32 repIndex = repCurrent - offset_2;
2026 if ( ((U32)((dictLimit-1) - repIndex) >= 3) /* intentional overflow : do not test positions overlapping 2 memory segments */
2032 offcode = offset_2; offset_2 = offset_1; offset_1 = (U32)offcode; /* swap offset history */
2051 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
2058 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
2066 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
2074 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
2082 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
2089 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
2097 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],