/* Preprocess with -DNO_UNDERLINE if your C compiler does not prefix
* external symbols with an underline character '_'.
/* Preprocess with -DNO_UNDERLINE if your C compiler does not prefix
* external symbols with an underline character '_'.
mov _prev_length,%ebx /* best_len = prev_length */
movw -3(%ebx,%edi),%ax /* ax = scan[best_len-1..best_len] */
movw -2(%edi),%cx /* cx = scan[0..1] */
mov _prev_length,%ebx /* best_len = prev_length */
movw -3(%ebx,%edi),%ax /* ax = scan[best_len-1..best_len] */
movw -2(%edi),%cx /* cx = scan[0..1] */
* at this point, di == scan+2, si == cur_match,
* ax = scan[best_len-1..best_len] and cx = scan[0..1]
*/
* at this point, di == scan+2, si == cur_match,
* ax = scan[best_len-1..best_len] and cx = scan[0..1]
*/
movw _prev(%esi,%esi),%si /* cur_match = prev[cur_match] */
/* top word of esi is still 0 */
cmp %edx,%esi /* cur_match <= limit ? */
movw _prev(%esi,%esi),%si /* cur_match = prev[cur_match] */
/* top word of esi is still 0 */
cmp %edx,%esi /* cur_match <= limit ? */
lea _window+2(%esi),%esi /* si = match */
mov %edi,%eax /* ax = scan+2 */
lea _window+2(%esi),%esi /* si = match */
mov %edi,%eax /* ax = scan+2 */
xchg %edi,%eax /* edi = scan+2, eax = end of scan */
sub %edi,%eax /* eax = len */
sub %eax,%esi /* esi = cur_match + 2 + offset(window) */
xchg %edi,%eax /* edi = scan+2, eax = end of scan */
sub %edi,%eax /* eax = len */
sub %eax,%esi /* esi = cur_match + 2 + offset(window) */
subb $1,%cl /* set carry if cl == 0 (cannot use DEC) */
adc $0,%eax /* eax = carry ? len+1 : len */
cmp %ebx,%eax /* len > best_len ? */
subb $1,%cl /* set carry if cl == 0 (cannot use DEC) */
adc $0,%eax /* eax = carry ? len+1 : len */
cmp %ebx,%eax /* len > best_len ? */