Skip to content

Commit c04e1df

Browse files
lpincadanielleadams
authored andcommitted
Revert "deps: fix zlib compilation for CPUs without SIMD features"
This reverts commit 26991f7. PR-URL: #45589 Fixes: #32856 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent dc862fe commit c04e1df

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

deps/zlib/adler32_simd.c

-4
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,9 @@
5050
#define NMAX 5552
5151

5252
#if defined(ADLER32_SIMD_SSSE3)
53-
#ifndef __GNUC__
54-
#define __attribute__()
55-
#endif
5653

5754
#include <tmmintrin.h>
5855

59-
__attribute__((target("ssse3")))
6056
uint32_t ZLIB_INTERNAL adler32_simd_( /* SSSE3 */
6157
uint32_t adler,
6258
const unsigned char *buf,

deps/zlib/crc32_simd.c

-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
#include "crc32_simd.h"
99

1010
#if defined(CRC32_SIMD_SSE42_PCLMUL)
11-
#ifndef __GNUC__
12-
#define __attribute__()
13-
#endif
1411

1512
/*
1613
* crc32_sse42_simd_(): compute the crc32 of the buffer, where the buffer
@@ -24,7 +21,6 @@
2421
#include <smmintrin.h>
2522
#include <wmmintrin.h>
2623

27-
__attribute__((target("sse4.2,pclmul")))
2824
uint32_t ZLIB_INTERNAL crc32_sse42_simd_( /* SSE4.2+PCLMUL */
2925
const unsigned char *buf,
3026
z_size_t len,

deps/zlib/crc_folding.c

-12
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
#include <immintrin.h>
2626
#include <wmmintrin.h>
2727

28-
#ifndef __GNUC__
29-
#define __attribute__()
30-
#endif
31-
3228
#define CRC_LOAD(s) \
3329
do { \
3430
__m128i xmm_crc0 = _mm_loadu_si128((__m128i *)s->crc0 + 0);\
@@ -45,7 +41,6 @@
4541
_mm_storeu_si128((__m128i *)s->crc0 + 4, xmm_crc_part);\
4642
} while (0);
4743

48-
__attribute__((target("sse4.2,pclmul")))
4944
ZLIB_INTERNAL void crc_fold_init(deflate_state *const s)
5045
{
5146
CRC_LOAD(s)
@@ -60,7 +55,6 @@ ZLIB_INTERNAL void crc_fold_init(deflate_state *const s)
6055
s->strm->adler = 0;
6156
}
6257

63-
__attribute__((target("sse4.2,pclmul")))
6458
local void fold_1(deflate_state *const s,
6559
__m128i *xmm_crc0, __m128i *xmm_crc1,
6660
__m128i *xmm_crc2, __m128i *xmm_crc3)
@@ -87,7 +81,6 @@ local void fold_1(deflate_state *const s,
8781
*xmm_crc3 = _mm_castps_si128(ps_res);
8882
}
8983

90-
__attribute__((target("sse4.2,pclmul")))
9184
local void fold_2(deflate_state *const s,
9285
__m128i *xmm_crc0, __m128i *xmm_crc1,
9386
__m128i *xmm_crc2, __m128i *xmm_crc3)
@@ -122,7 +115,6 @@ local void fold_2(deflate_state *const s,
122115
*xmm_crc3 = _mm_castps_si128(ps_res31);
123116
}
124117

125-
__attribute__((target("sse4.2,pclmul")))
126118
local void fold_3(deflate_state *const s,
127119
__m128i *xmm_crc0, __m128i *xmm_crc1,
128120
__m128i *xmm_crc2, __m128i *xmm_crc3)
@@ -163,7 +155,6 @@ local void fold_3(deflate_state *const s,
163155
*xmm_crc3 = _mm_castps_si128(ps_res32);
164156
}
165157

166-
__attribute__((target("sse4.2,pclmul")))
167158
local void fold_4(deflate_state *const s,
168159
__m128i *xmm_crc0, __m128i *xmm_crc1,
169160
__m128i *xmm_crc2, __m128i *xmm_crc3)
@@ -230,7 +221,6 @@ local const unsigned zalign(32) pshufb_shf_table[60] = {
230221
0x0201008f,0x06050403,0x0a090807,0x0e0d0c0b /* shl 1 (16 -15)/shr15*/
231222
};
232223

233-
__attribute__((target("sse4.2,pclmul")))
234224
local void partial_fold(deflate_state *const s, const size_t len,
235225
__m128i *xmm_crc0, __m128i *xmm_crc1,
236226
__m128i *xmm_crc2, __m128i *xmm_crc3,
@@ -281,7 +271,6 @@ local void partial_fold(deflate_state *const s, const size_t len,
281271
*xmm_crc3 = _mm_castps_si128(ps_res);
282272
}
283273

284-
__attribute__((target("sse4.2,pclmul")))
285274
ZLIB_INTERNAL void crc_fold_copy(deflate_state *const s,
286275
unsigned char *dst, const unsigned char *src, long len)
287276
{
@@ -438,7 +427,6 @@ local const unsigned zalign(16) crc_mask2[4] = {
438427
0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF
439428
};
440429

441-
__attribute__((target("sse4.2,pclmul")))
442430
unsigned ZLIB_INTERNAL crc_fold_512to32(deflate_state *const s)
443431
{
444432
const __m128i xmm_mask = _mm_load_si128((__m128i *)crc_mask);

0 commit comments

Comments
 (0)