Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From c8eadfcdfbc1d5a4799e9a264b0f859cb5954c05 Mon Sep 17 00:00:00 2001 |
| 2 | From: Christopher Larson <chris_larson@mentor.com> |
| 3 | Date: Tue, 13 Dec 2016 11:40:47 -0700 |
| 4 | Subject: [PATCH 7/7] Fix compilation for X32 |
| 5 | |
| 6 | X32 uses 32-bit pointers, not 64-bit. |
| 7 | |
| 8 | Signed-off-by: Christopher Larson <chris_larson@mentor.com> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 9 | |
| 10 | Upstream-Status: Pending |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 11 | --- |
| 12 | nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c | 4 ++++ |
| 13 | 1 file changed, 4 insertions(+) |
| 14 | |
| 15 | diff --git a/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c b/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c |
| 16 | index 2a3301e..d4ade41 100644 |
| 17 | --- a/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c |
| 18 | +++ b/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c |
| 19 | @@ -87,7 +87,11 @@ static poly1305_state_internal INLINE |
| 20 | * |
| 21 | poly1305_aligned_state(poly1305_state *state) |
| 22 | { |
| 23 | +#ifdef __ILP32__ |
| 24 | + return (poly1305_state_internal *)(((uint32_t)state + 63) & ~63); |
| 25 | +#else |
| 26 | return (poly1305_state_internal *)(((uint64_t)state + 63) & ~63); |
| 27 | +#endif |
| 28 | } |
| 29 | |
| 30 | /* copy 0-63 bytes */ |
| 31 | -- |
| 32 | 2.8.0 |
| 33 | |