Skip to content

Commit

Permalink
x32 support
Browse files Browse the repository at this point in the history
CVS-ID: yespower-opt.c 1.3
  • Loading branch information
solardiz committed Apr 7, 2019
1 parent 3d9a773 commit 2728f2f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions yespower-opt.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,11 @@ static volatile uint64_t Smask2var = Smask2;
#undef MAYBE_MEMORY_BARRIER
#define MAYBE_MEMORY_BARRIER \
__asm__("" : : : "memory");
#ifdef __ILP32__ /* x32 */
#define REGISTER_PREFIX "e"
#else
#define REGISTER_PREFIX "r"
#endif
#define PWXFORM_SIMD(X) { \
__m128i H; \
__asm__( \
Expand All @@ -540,8 +545,8 @@ static volatile uint64_t Smask2var = Smask2;
"pmuludq %1, %0\n\t" \
"movl %%eax, %%ecx\n\t" \
"shrq $0x20, %%rax\n\t" \
"paddq (%3,%%rcx), %0\n\t" \
"pxor (%4,%%rax), %0\n\t" \
"paddq (%3,%%" REGISTER_PREFIX "cx), %0\n\t" \
"pxor (%4,%%" REGISTER_PREFIX "ax), %0\n\t" \
: "+x" (X), "=x" (H) \
: "d" (Smask2), "S" (S0), "D" (S1) \
: "cc", "ax", "cx"); \
Expand Down

0 comments on commit 2728f2f

Please sign in to comment.