File xxhash-ppc64le-gcc7.patch of Package python-grpcio
44
1
From 15ce80f9f2760609d8cc68cea76d3f3217ab70e1 Mon Sep 17 00:00:00 2001
2
From: Mattias Ellert <mattias.ellert@physics.uu.se>
3
Date: Tue, 30 Nov 2021 23:19:38 +0100
4
Subject: [PATCH] Fix compilation on RHEL 7 ppc64le (gcc 4.8)
5
6
---
7
xxhash.h | 6 +++---
8
1 file changed, 3 insertions(+), 3 deletions(-)
9
10
diff --git a/xxhash.h b/xxhash.h
11
index 08ab794..7850622 100644
12
--- a/xxhash.h
13
+++ b/xxhash.h
14
15
const void* XXH_RESTRICT secret)
16
{
17
/* presumed aligned */
18
- unsigned long long* const xacc = (unsigned long long*) acc;
19
+ unsigned int* const xacc = (unsigned int*) acc;
20
xxh_u64x2 const* const xinput = (xxh_u64x2 const*) input; /* no alignment restriction */
21
xxh_u64x2 const* const xsecret = (xxh_u64x2 const*) secret; /* no alignment restriction */
22
xxh_u64x2 const v32 = { 32, 32 };
23
24
/* product = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)shuffled & 0xFFFFFFFF); */
25
xxh_u64x2 const product = XXH_vec_mulo((xxh_u32x4)data_key, shuffled);
26
/* acc_vec = xacc[i]; */
27
- xxh_u64x2 acc_vec = vec_xl(0, xacc + 2 * i);
28
+ xxh_u64x2 acc_vec = (xxh_u64x2)vec_xl(0, xacc + 4 * i);
29
acc_vec += product;
30
31
/* swap high and low halves */
32
33
acc_vec += vec_xxpermdi(data_vec, data_vec, 2);
34
#endif
35
/* xacc[i] = acc_vec; */
36
- vec_xst(acc_vec, 0, xacc + 2 * i);
37
+ vec_xst((xxh_u32x4)acc_vec, 0, xacc + 4 * i);
38
}
39
}
40
41
--
42
2.39.2
43
44