mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Fixup: Force enable SSE2 before undefining ALIGN if SSE2 is disabled.
This should fix the x86 build, since variables that require 16 byte alignment will now actually be 16 byte aligned.
This commit is contained in:
parent
a77616f605
commit
971eba0fcd
@ -144,6 +144,16 @@ static inline void U64TO8_LE(unsigned char *p, const uint64_t v) {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Tor: Force enable SSE2 on 32 bit x86 systems if the compile target
|
||||
* architecture supports it. This is not done on x86-64 as the non-SSE2
|
||||
* code benchmarks better, at least on Haswell.
|
||||
*/
|
||||
#if defined(__SSE2__) /* && !defined(CPU_X86_64) */
|
||||
/* undef in case it's manually specified... */
|
||||
#undef ED25519_SSE2
|
||||
#define ED25519_SSE2
|
||||
#endif
|
||||
|
||||
/* Tor: GCC's Stack Protector freaks out and produces variable length
|
||||
* buffer warnings when alignment is requested that is greater than
|
||||
* STACK_BOUNDARY (x86 has special code to deal with this for SSE2).
|
||||
@ -158,16 +168,6 @@ static inline void U64TO8_LE(unsigned char *p, const uint64_t v) {
|
||||
#define ALIGN(x)
|
||||
#endif
|
||||
|
||||
/* Tor: Force enable SSE2 on 32 bit x86 systems if the compile target
|
||||
* architecture supports it. This is not done on x86-64 as the non-SSE2
|
||||
* code benchmarks better, at least on Haswell.
|
||||
*/
|
||||
#if defined(__SSE2__) && !defined(CPU_X86_64)
|
||||
/* undef in case it's manually specified... */
|
||||
#undef ED25519_SSE2
|
||||
#define ED25519_SSE2
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user