From: Ilya Leoshkevich Date: Fri, 24 May 2019 10:36:46 +0000 (+0200) Subject: IBM Z DFLTCC: minor documentation fixes X-Git-Tag: 1.9.9-b1~477 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e257d870dd95ae8a9b9b8eb4b1bd37f6a506a997;p=thirdparty%2Fzlib-ng.git IBM Z DFLTCC: minor documentation fixes * Replace "DEFLATE COMPRESSION CALL" term with "DEFLATE CONVERSION CALL", since the latter is the proper name of the new IBM Z instruction. * Mention CMake options in README.md. * Replace "new macro" term with just "macro" in README.md (calling macros "new" is not correct in this context). * Replace "zlib" term with "zlib-ng", except in probe point names - it's better to keep those common between gzip, zlib and zlib-ng. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index edb565d35..6c619bccc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,8 +114,8 @@ if("${ARCH}" MATCHES "arm" OR "${ARCH}" MATCHES "aarch64") endif() if("${ARCH}" MATCHES "s390x") - option(WITH_DFLTCC_DEFLATE "Use DEFLATE COMPRESSION CALL instruction for compression on IBM Z" OFF) - option(WITH_DFLTCC_INFLATE "Use DEFLATE COMPRESSION CALL instruction for decompression on IBM Z" OFF) + option(WITH_DFLTCC_DEFLATE "Use DEFLATE CONVERSION CALL instruction for compression on IBM Z" OFF) + option(WITH_DFLTCC_INFLATE "Use DEFLATE CONVERSION CALL instruction for decompression on IBM Z" OFF) endif() if(${CMAKE_C_COMPILER} MATCHES "icc" OR ${CMAKE_C_COMPILER} MATCHES "icpc" OR ${CMAKE_C_COMPILER} MATCHES "icl") diff --git a/arch/s390/Makefile.in b/arch/s390/Makefile.in index caf7340a5..2652fe62d 100644 --- a/arch/s390/Makefile.in +++ b/arch/s390/Makefile.in @@ -1,4 +1,4 @@ -# Makefile for zlib +# Makefile for zlib-ng # Copyright (C) 1995-2013 Jean-loup Gailly, Mark Adler # For conditions of distribution and use, see copyright notice in zlib.h diff --git a/arch/s390/README.md b/arch/s390/README.md index 81da220af..6995b106e 100644 --- a/arch/s390/README.md +++ b/arch/s390/README.md @@ -1,10 +1,15 @@ -This directory contains IBM Z DEFLATE CONVERSION CALL support to +This directory contains IBM Z DEFLATE CONVERSION CALL support for zlib-ng. In order to enable it, the following build commands should be used: $ ./configure --with-dfltcc-deflate --with-dfltcc-inflate $ make +or + + $ cmake -DWITH_DFLTCC_DEFLATE=1 -DWITH_DFLTCC_INFLATE=1 . + $ make + When built like this, zlib-ng would compress in hardware on level 1, and in software on all other levels. Decompression will always happen in hardware. In order to enable DFLTCC compression for levels 1-6 (i.e. @@ -53,9 +58,9 @@ than the one implemented in software. DEFLATE_BOUND_ADJUST_COMPLEN and DEFLATE_NEED_CONSERVATIVE_BOUND macros make deflateBound() return the correct results for the hardware implementation. -Actual compression and decompression are handled by the new DEFLATE_HOOK -and INFLATE_TYPEDO_HOOK macros. Since inflation with DFLTCC manages the -window on its own, calling updatewindow() is suppressed using the new +Actual compression and decompression are handled by DEFLATE_HOOK and +INFLATE_TYPEDO_HOOK macros. Since inflation with DFLTCC manages the +window on its own, calling updatewindow() is suppressed using INFLATE_NEED_UPDATEWINDOW() macro. In addition to compression, DFLTCC computes CRC-32 and Adler-32 diff --git a/arch/s390/dfltcc_common.c b/arch/s390/dfltcc_common.c index 9eb51d62f..98c9765b9 100644 --- a/arch/s390/dfltcc_common.c +++ b/arch/s390/dfltcc_common.c @@ -7,7 +7,7 @@ /* Memory management. - DFLTCC requires parameter blocks and window to be aligned. zlib allows + DFLTCC requires parameter blocks and window to be aligned. zlib-ng allows users to specify their own allocation functions, so using e.g. `posix_memalign' is not an option. Thus, we overallocate and take the aligned portion of the buffer. @@ -52,7 +52,7 @@ void ZLIB_INTERNAL dfltcc_reset(PREFIX3(streamp) strm, uInt size) void ZLIB_INTERNAL *dfltcc_alloc_state(PREFIX3(streamp) strm, uInt items, uInt size) { Assert((items * size) % 8 == 0, - "The size of zlib state must be a multiple of 8"); + "The size of zlib-ng state must be a multiple of 8"); return ZALLOC(strm, items * size + sizeof(struct dfltcc_state), sizeof(unsigned char)); } diff --git a/configure b/configure index 6f592c343..5f50a33cb 100755 --- a/configure +++ b/configure @@ -148,8 +148,8 @@ case "$1" in echo ' [--without-new-strategies] Compiles without using new additional deflate strategies' | tee -a configure.log echo ' [--without-acle] Compiles without ARM C Language Extensions' | tee -a configure.log echo ' [--without-neon] Compiles without ARM Neon SIMD instruction set' | tee -a configure.log - echo ' [--with-dfltcc-deflate] Use DEFLATE COMPRESSION CALL instruction for compression on IBM Z' | tee -a configure.log - echo ' [--with-dfltcc-inflate] Use DEFLATE COMPRESSION CALL instruction for decompression on IBM Z' | tee -a configure.log + echo ' [--with-dfltcc-deflate] Use DEFLATE CONVERSION CALL instruction for compression on IBM Z' | tee -a configure.log + echo ' [--with-dfltcc-inflate] Use DEFLATE CONVERSION CALL instruction for decompression on IBM Z' | tee -a configure.log echo ' [--force-sse2] Assume SSE2 instructions are always available (disabled by default on x86, enabled on x86_64)' | tee -a configure.log echo ' [--with-sanitizers] Build with address sanitizer and all supported sanitizers other than memory sanitizer (disabled by default)' | tee -a configure.log echo ' [--with-msan] Build with memory sanitizer (disabled by default)' | tee -a configure.log