Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/dist/zlib merge conflicts between 1.2.10 and 1.2.13
details: https://anonhg.NetBSD.org/src/rev/c13252fc1212
branches: trunk
changeset: 371885:c13252fc1212
user: christos <christos%NetBSD.org@localhost>
date: Sat Oct 15 19:49:32 2022 +0000
description:
merge conflicts between 1.2.10 and 1.2.13
diffstat:
common/dist/zlib/compress.c | 10 +-
common/dist/zlib/contrib/amd64/amd64-match.S | 452 ---
common/dist/zlib/contrib/asm686/README.686 | 51 -
common/dist/zlib/contrib/asm686/match.S | 357 --
common/dist/zlib/contrib/inflate86/inffas86.c | 1157 --------
common/dist/zlib/contrib/inflate86/inffast.S | 1368 ----------
common/dist/zlib/contrib/masmx64/bld_ml64.bat | 2 -
common/dist/zlib/contrib/masmx64/gvmat64.asm | 553 ----
common/dist/zlib/contrib/masmx64/inffas8664.c | 186 -
common/dist/zlib/contrib/masmx64/inffasx64.asm | 396 --
common/dist/zlib/contrib/masmx64/readme.txt | 31 -
common/dist/zlib/contrib/masmx86/bld_ml32.bat | 2 -
common/dist/zlib/contrib/masmx86/inffas32.asm | 1080 -------
common/dist/zlib/contrib/masmx86/match686.asm | 479 ---
common/dist/zlib/contrib/masmx86/readme.txt | 27 -
common/dist/zlib/contrib/vstudio/vc14/miniunz.vcxproj.user | 4 -
common/dist/zlib/contrib/vstudio/vc14/minizip.vcxproj.user | 4 -
common/dist/zlib/contrib/vstudio/vc14/testzlib.vcxproj.user | 4 -
common/dist/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj.user | 4 -
common/dist/zlib/contrib/vstudio/vc14/zlibstat.vcxproj.user | 4 -
common/dist/zlib/contrib/vstudio/vc14/zlibvc.vcxproj.user | 4 -
common/dist/zlib/crc32.c | 1308 +++++++--
common/dist/zlib/deflate.c | 267 +-
common/dist/zlib/deflate.h | 10 +-
common/dist/zlib/gzguts.h | 5 +-
common/dist/zlib/gzwrite.c | 41 +-
common/dist/zlib/infback.c | 22 +-
common/dist/zlib/inffast.c | 32 +-
common/dist/zlib/inflate.c | 57 +-
common/dist/zlib/inftrees.c | 8 +-
common/dist/zlib/trees.c | 154 +-
common/dist/zlib/uncompr.c | 8 +-
common/dist/zlib/zconf.h | 23 +-
common/dist/zlib/zlib.h | 232 +-
common/dist/zlib/zutil.c | 26 +-
common/dist/zlib/zutil.h | 26 +-
36 files changed, 1510 insertions(+), 6884 deletions(-)
diffs (truncated from 10462 to 300 lines):
diff -r d4939e767e16 -r c13252fc1212 common/dist/zlib/compress.c
--- a/common/dist/zlib/compress.c Sat Oct 15 19:41:16 2022 +0000
+++ b/common/dist/zlib/compress.c Sat Oct 15 19:49:32 2022 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: compress.c,v 1.3 2017/01/10 01:27:41 christos Exp $ */
+/* $NetBSD: compress.c,v 1.4 2022/10/15 19:49:32 christos Exp $ */
/* compress.c -- compress a memory buffer
* Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* @(#) $Id: compress.c,v 1.3 2017/01/10 01:27:41 christos Exp $ */
+/* @(#) Id */
#define ZLIB_INTERNAL
#include "zlib.h"
@@ -21,7 +21,7 @@
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
Z_STREAM_ERROR if the level parameter is invalid.
*/
-int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
+int ZEXPORT compress2(dest, destLen, source, sourceLen, level)
Bytef *dest;
uLongf *destLen;
const Bytef *source;
@@ -67,7 +67,7 @@
/* ===========================================================================
*/
-int ZEXPORT compress (dest, destLen, source, sourceLen)
+int ZEXPORT compress(dest, destLen, source, sourceLen)
Bytef *dest;
uLongf *destLen;
const Bytef *source;
@@ -80,7 +80,7 @@
If the default memLevel or windowBits for deflateInit() is changed, then
this function needs to be updated.
*/
-uLong ZEXPORT compressBound (sourceLen)
+uLong ZEXPORT compressBound(sourceLen)
uLong sourceLen;
{
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
diff -r d4939e767e16 -r c13252fc1212 common/dist/zlib/contrib/amd64/amd64-match.S
--- a/common/dist/zlib/contrib/amd64/amd64-match.S Sat Oct 15 19:41:16 2022 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,452 +0,0 @@
-/*
- * match.S -- optimized version of longest_match()
- * based on the similar work by Gilles Vollant, and Brian Raiter, written 1998
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the BSD License. Use by owners of Che Guevarra
- * parafernalia is prohibited, where possible, and highly discouraged
- * elsewhere.
- */
-
-#ifndef NO_UNDERLINE
-# define match_init _match_init
-# define longest_match _longest_match
-#endif
-
-#define scanend ebx
-#define scanendw bx
-#define chainlenwmask edx /* high word: current chain len low word: s->wmask */
-#define curmatch rsi
-#define curmatchd esi
-#define windowbestlen r8
-#define scanalign r9
-#define scanalignd r9d
-#define window r10
-#define bestlen r11
-#define bestlend r11d
-#define scanstart r12d
-#define scanstartw r12w
-#define scan r13
-#define nicematch r14d
-#define limit r15
-#define limitd r15d
-#define prev rcx
-
-/*
- * The 258 is a "magic number, not a parameter -- changing it
- * breaks the hell loose
- */
-#define MAX_MATCH (258)
-#define MIN_MATCH (3)
-#define MIN_LOOKAHEAD (MAX_MATCH + MIN_MATCH + 1)
-#define MAX_MATCH_8 ((MAX_MATCH + 7) & ~7)
-
-/* stack frame offsets */
-#define LocalVarsSize (112)
-#define _chainlenwmask ( 8-LocalVarsSize)(%rsp)
-#define _windowbestlen (16-LocalVarsSize)(%rsp)
-#define save_r14 (24-LocalVarsSize)(%rsp)
-#define save_rsi (32-LocalVarsSize)(%rsp)
-#define save_rbx (40-LocalVarsSize)(%rsp)
-#define save_r12 (56-LocalVarsSize)(%rsp)
-#define save_r13 (64-LocalVarsSize)(%rsp)
-#define save_r15 (80-LocalVarsSize)(%rsp)
-
-
-.globl match_init, longest_match
-
-/*
- * On AMD64 the first argument of a function (in our case -- the pointer to
- * deflate_state structure) is passed in %rdi, hence our offsets below are
- * all off of that.
- */
-
-/* you can check the structure offset by running
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "deflate.h"
-
-void print_depl()
-{
-deflate_state ds;
-deflate_state *s=&ds;
-printf("size pointer=%u\n",(int)sizeof(void*));
-
-printf("#define dsWSize (%3u)(%%rdi)\n",(int)(((char*)&(s->w_size))-((char*)s)));
-printf("#define dsWMask (%3u)(%%rdi)\n",(int)(((char*)&(s->w_mask))-((char*)s)));
-printf("#define dsWindow (%3u)(%%rdi)\n",(int)(((char*)&(s->window))-((char*)s)));
-printf("#define dsPrev (%3u)(%%rdi)\n",(int)(((char*)&(s->prev))-((char*)s)));
-printf("#define dsMatchLen (%3u)(%%rdi)\n",(int)(((char*)&(s->match_length))-((char*)s)));
-printf("#define dsPrevMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_match))-((char*)s)));
-printf("#define dsStrStart (%3u)(%%rdi)\n",(int)(((char*)&(s->strstart))-((char*)s)));
-printf("#define dsMatchStart (%3u)(%%rdi)\n",(int)(((char*)&(s->match_start))-((char*)s)));
-printf("#define dsLookahead (%3u)(%%rdi)\n",(int)(((char*)&(s->lookahead))-((char*)s)));
-printf("#define dsPrevLen (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_length))-((char*)s)));
-printf("#define dsMaxChainLen (%3u)(%%rdi)\n",(int)(((char*)&(s->max_chain_length))-((char*)s)));
-printf("#define dsGoodMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->good_match))-((char*)s)));
-printf("#define dsNiceMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->nice_match))-((char*)s)));
-}
-
-*/
-
-
-/*
- to compile for XCode 3.2 on MacOSX x86_64
- - run "gcc -g -c -DXCODE_MAC_X64_STRUCTURE amd64-match.S"
- */
-
-
-#ifndef CURRENT_LINX_XCODE_MAC_X64_STRUCTURE
-#define dsWSize ( 68)(%rdi)
-#define dsWMask ( 76)(%rdi)
-#define dsWindow ( 80)(%rdi)
-#define dsPrev ( 96)(%rdi)
-#define dsMatchLen (144)(%rdi)
-#define dsPrevMatch (148)(%rdi)
-#define dsStrStart (156)(%rdi)
-#define dsMatchStart (160)(%rdi)
-#define dsLookahead (164)(%rdi)
-#define dsPrevLen (168)(%rdi)
-#define dsMaxChainLen (172)(%rdi)
-#define dsGoodMatch (188)(%rdi)
-#define dsNiceMatch (192)(%rdi)
-
-#else
-
-#ifndef STRUCT_OFFSET
-# define STRUCT_OFFSET (0)
-#endif
-
-
-#define dsWSize ( 56 + STRUCT_OFFSET)(%rdi)
-#define dsWMask ( 64 + STRUCT_OFFSET)(%rdi)
-#define dsWindow ( 72 + STRUCT_OFFSET)(%rdi)
-#define dsPrev ( 88 + STRUCT_OFFSET)(%rdi)
-#define dsMatchLen (136 + STRUCT_OFFSET)(%rdi)
-#define dsPrevMatch (140 + STRUCT_OFFSET)(%rdi)
-#define dsStrStart (148 + STRUCT_OFFSET)(%rdi)
-#define dsMatchStart (152 + STRUCT_OFFSET)(%rdi)
-#define dsLookahead (156 + STRUCT_OFFSET)(%rdi)
-#define dsPrevLen (160 + STRUCT_OFFSET)(%rdi)
-#define dsMaxChainLen (164 + STRUCT_OFFSET)(%rdi)
-#define dsGoodMatch (180 + STRUCT_OFFSET)(%rdi)
-#define dsNiceMatch (184 + STRUCT_OFFSET)(%rdi)
-
-#endif
-
-
-
-
-.text
-
-/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
-
-longest_match:
-/*
- * Retrieve the function arguments. %curmatch will hold cur_match
- * throughout the entire function (passed via rsi on amd64).
- * rdi will hold the pointer to the deflate_state (first arg on amd64)
- */
- mov %rsi, save_rsi
- mov %rbx, save_rbx
- mov %r12, save_r12
- mov %r13, save_r13
- mov %r14, save_r14
- mov %r15, save_r15
-
-/* uInt wmask = s->w_mask; */
-/* unsigned chain_length = s->max_chain_length; */
-/* if (s->prev_length >= s->good_match) { */
-/* chain_length >>= 2; */
-/* } */
-
- movl dsPrevLen, %eax
- movl dsGoodMatch, %ebx
- cmpl %ebx, %eax
- movl dsWMask, %eax
- movl dsMaxChainLen, %chainlenwmask
- jl LastMatchGood
- shrl $2, %chainlenwmask
-LastMatchGood:
-
-/* chainlen is decremented once beforehand so that the function can */
-/* use the sign flag instead of the zero flag for the exit test. */
-/* It is then shifted into the high word, to make room for the wmask */
-/* value, which it will always accompany. */
-
- decl %chainlenwmask
- shll $16, %chainlenwmask
- orl %eax, %chainlenwmask
-
-/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; */
-
- movl dsNiceMatch, %eax
- movl dsLookahead, %ebx
- cmpl %eax, %ebx
- jl LookaheadLess
- movl %eax, %ebx
-LookaheadLess: movl %ebx, %nicematch
-
-/* register Bytef *scan = s->window + s->strstart; */
-
- mov dsWindow, %window
- movl dsStrStart, %limitd
- lea (%limit, %window), %scan
-
-/* Determine how many bytes the scan ptr is off from being */
-/* dword-aligned. */
-
- mov %scan, %scanalign
- negl %scanalignd
- andl $3, %scanalignd
-
-/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */
-/* s->strstart - (IPos)MAX_DIST(s) : NIL; */
-
- movl dsWSize, %eax
- subl $MIN_LOOKAHEAD, %eax
- xorl %ecx, %ecx
- subl %eax, %limitd
- cmovng %ecx, %limitd
-
-/* int best_len = s->prev_length; */
-
- movl dsPrevLen, %bestlend
-
-/* Store the sum of s->window + best_len in %windowbestlen locally, and in memory. */
-
- lea (%window, %bestlen), %windowbestlen
- mov %windowbestlen, _windowbestlen
-
-/* register ush scan_start = *(ushf*)scan; */
-/* register ush scan_end = *(ushf*)(scan+best_len-1); */
-/* Posf *prev = s->prev; */
-
- movzwl (%scan), %scanstart
- movzwl -1(%scan, %bestlen), %scanend
- mov dsPrev, %prev
-
-/* Jump into the main loop. */
-
- movl %chainlenwmask, _chainlenwmask
- jmp LoopEntry
-
-.balign 16
-
-/* do {
- * match = s->window + cur_match;
- * if (*(ushf*)(match+best_len-1) != scan_end ||
- * *(ushf*)match != scan_start) continue;
- * [...]
- * } while ((cur_match = prev[cur_match & wmask]) > limit
- * && --chain_length != 0);
- *
- * Here is the inner loop of the function. The function will spend the
- * majority of its time in this loop, and majority of that time will
- * be spent in the first ten instructions.
- */
-LookupLoop:
- andl %chainlenwmask, %curmatchd
- movzwl (%prev, %curmatch, 2), %curmatchd
- cmpl %limitd, %curmatchd
Home |
Main Index |
Thread Index |
Old Index