Accepting request 494280 from home:pluskalm:branches:devel:libraries:c_c++
- Add s390 performance patch (fate#314093): * zlib-1.2.11-optimized-s390.patch OBS-URL: https://build.opensuse.org/request/show/494280 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zlib?expand=0&rev=42
This commit is contained in:
parent
b2e20fca2d
commit
20b10f1999
41
zlib-1.2.11-optimized-s390.patch
Normal file
41
zlib-1.2.11-optimized-s390.patch
Normal file
@ -0,0 +1,41 @@
|
||||
Index: deflate.c
|
||||
===================================================================
|
||||
--- deflate.c.orig
|
||||
+++ deflate.c
|
||||
@@ -1233,15 +1233,16 @@ local void lm_init (s)
|
||||
/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
|
||||
* match.S. The code will be functionally equivalent.
|
||||
*/
|
||||
-local uInt longest_match(s, cur_match)
|
||||
+local uInt longest_match(s, pcur_match)
|
||||
deflate_state *s;
|
||||
- IPos cur_match; /* current match */
|
||||
+ IPos pcur_match; /* current match */
|
||||
{
|
||||
+ ptrdiff_t cur_match = pcur_match; /* extend to pointer width */
|
||||
unsigned chain_length = s->max_chain_length;/* max hash chain length */
|
||||
register Bytef *scan = s->window + s->strstart; /* current string */
|
||||
register Bytef *match; /* matched string */
|
||||
register int len; /* length of current match */
|
||||
- int best_len = (int)s->prev_length; /* best match length so far */
|
||||
+ ptrdiff_t best_len = s->prev_length; /* best match length so far */
|
||||
int nice_match = s->nice_match; /* stop if match long enough */
|
||||
IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
|
||||
s->strstart - (IPos)MAX_DIST(s) : NIL;
|
||||
@@ -1256,12 +1257,12 @@ local uInt longest_match(s, cur_match)
|
||||
* Try with and without -DUNALIGNED_OK to check.
|
||||
*/
|
||||
register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
|
||||
- register ush scan_start = *(ushf*)scan;
|
||||
- register ush scan_end = *(ushf*)(scan+best_len-1);
|
||||
+ register uInt scan_start = *(ushf*)scan;
|
||||
+ register uInt scan_end = *(ushf*)(scan+best_len-1);
|
||||
#else
|
||||
register Bytef *strend = s->window + s->strstart + MAX_MATCH;
|
||||
- register Byte scan_end1 = scan[best_len-1];
|
||||
- register Byte scan_end = scan[best_len];
|
||||
+ register uInt scan_end1 = scan[best_len-1];
|
||||
+ register uInt scan_end = scan[best_len];
|
||||
#endif
|
||||
|
||||
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 10 13:43:08 UTC 2017 - mpluskal@suse.com
|
||||
|
||||
- Add s390 performance patch (fate#314093):
|
||||
* zlib-1.2.11-optimized-s390.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 4 08:31:28 UTC 2017 - schwab@suse.de
|
||||
|
||||
|
@ -28,6 +28,8 @@ Source0: http://zlib.net/zlib-%{version}.tar.gz
|
||||
Source1: LICENSE
|
||||
Source2: baselibs.conf
|
||||
Source3: zlib-rpmlintrc
|
||||
#PATCH-FIX-SUSE: fate#314093, sent upstream by IBM
|
||||
Patch0: zlib-1.2.11-optimized-s390.patch
|
||||
#PATCH-FIX-SUSE: compiler check of varguments passed to gzprintf
|
||||
Patch1: zlib-format.patch
|
||||
BuildRequires: autoconf
|
||||
@ -111,6 +113,7 @@ developing applications which use minizip.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0
|
||||
%patch1
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user