Skip to content

Commit 943c26c

Browse files
author
Steven Noonan
committed
ed25519/curve25519: only build SSE2 variants on x86
Signed-off-by: Steven Noonan <[email protected]>
1 parent fe3cd8e commit 943c26c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/external/curve25519-donna/curve25519_VALVE_sse2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
where it is explicitly placed in the public domain. This wrapper compiles it with the _sse2
33
function suffix to be distinguished from the native C version. */
44

5+
#if defined( _M_IX86 ) || defined( _M_X64 ) || defined(__SSE2__)
6+
57
#define CURVE25519_SUFFIX _sse2
68
#define CURVE25519_SSE2
79

810
#include "curve25519.c"
11+
12+
#endif

src/external/ed25519-donna/ed25519_VALVE_sse2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*========= Copyright © Valve Corporation, All rights reserved =======================*/
22

3-
3+
#if defined( _M_IX86 ) || defined( _M_X64 ) || defined(__SSE2__)
44
#define ED25519_SSE2
55
#define ED25519_SUFFIX _sse2
66

@@ -12,3 +12,4 @@
1212
#define batch_point_buffer test_batch_point_buffer_sse2
1313

1414
#include "ed25519_VALVE.c"
15+
#endif

0 commit comments

Comments
 (0)