upstream: https://github.com/mirage/mirage-crypto
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add ppc64le support

Implementation of rtdsc based on clang's builtin version and
from gperftools at
https://chromium.googlesource.com/external/gperftools/+/master/src/base/cycleclock.h

Fixes #75

+9 -3
+2
CHANGES.md
··· 1 + * Add support for ppc64le. (@avsm) 2 + 1 3 ## v0.8.1 (2020-07-02) 2 4 3 5 * Add Chacha20 implementation (based on abeaumont/ocaml-chacha), supporting
+4
src/native/entropy_cpu_stubs.c
··· 82 82 return Val_long (__rdtsc ()); 83 83 #elif defined (__arm__) || defined (__aarch64__) 84 84 return Val_long (read_virtual_count ()); 85 + #elif defined(__powerpc64__) 86 + uint64_t rval; 87 + __asm__ volatile ("mfspr %0, 268":"=r" (rval)); 88 + return rval; 85 89 #else 86 90 #error ("No known cycle-counting instruction.") 87 91 #endif
+2 -2
src/native/ghash_generic.c
··· 16 16 * !LARGE_TABLES -> 8K per key, ~3x slower. */ 17 17 #define __MC_GHASH_LARGE_TABLES 18 18 19 - #if defined (__x86_64__) || defined (__aarch64__) 19 + #if defined (__x86_64__) || defined (__aarch64__) || defined(__powerpc64__) 20 20 21 21 #define __set_uint128_t(w1, w0) (((__uint128_t) w1 << 64) | w0) 22 22 ··· 103 103 return Val_unit; 104 104 } 105 105 106 - #endif /* x86_64 || aarch64 */ 106 + #endif /* x86_64 || aarch64 || powerpc64 */
+1 -1
src/native/poly1305-donna.c
··· 7 7 unsigned char opaque[136]; 8 8 } poly1305_context; 9 9 10 - #if defined (__x86_64__) || defined (__aarch64__) 10 + #if defined (__x86_64__) || defined (__aarch64__) || defined(__powerpc64__) 11 11 #include "poly1305-donna-64.h" 12 12 #else 13 13 #include "poly1305-donna-32.h"