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

Configure Feed

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

mirage_crypto.h, entropy_cpu_stubs.c: add powerpc macros (#269)

* mirage_crypto.h: add powerpc macros

* entropy_cpu_stubs.c: fix powerpc

authored by

Sergey Fedorov and committed by
GitHub
073e872e 154ff240

+4 -4
+2 -2
src/native/entropy_cpu_stubs.c
··· 126 126 } 127 127 #endif /* aarch64 */ 128 128 129 - #if defined (__powerpc64__) 129 + #if defined (__powerpc64__) || defined(__POWERPC__) 130 130 /* from clang's builtin version and gperftools at 131 131 https://chromium.googlesource.com/external/gperftools/+/master/src/base/cycleclock.h 132 132 */ ··· 183 183 return Val_long (__rdtsc ()); 184 184 #elif defined (__arm__) || defined (__aarch64__) 185 185 return Val_long (read_virtual_count ()); 186 - #elif defined(__powerpc64__) 186 + #elif defined(__powerpc64__) || defined(__POWERPC__) 187 187 return Val_long (read_cycle_counter ()); 188 188 #elif defined(__riscv) && (64 == __riscv_xlen) 189 189 return Val_long (cycle_count ());
+2 -2
src/native/mirage_crypto.h
··· 50 50 51 51 #endif /* __mc_ACCELERATE__ */ 52 52 53 - #if defined (__x86_64__) || defined (__aarch64__) || defined (__powerpc64__) || (64 == __riscv_xlen) || defined (__s390x__) || (defined (__mips__) && _MIPS_SIM==_ABI64) || defined (__loongarch_lp64) || (1 == _WIN64) 53 + #if defined (__x86_64__) || defined (__aarch64__) || defined (__powerpc64__) || defined (__ppc64__) || (64 == __riscv_xlen) || defined (__s390x__) || (defined (__mips__) && _MIPS_SIM==_ABI64) || defined (__loongarch_lp64) || (1 == _WIN64) 54 54 #define ARCH_64BIT 55 - #elif defined (__i386__) || defined (__arm__) || (32 == __riscv_xlen) || (defined (__mips__) && _MIPS_SIM==_ABIO32) || (1 == _WIN32) 55 + #elif defined (__i386__) || defined (__arm__) || (32 == __riscv_xlen) || (defined (__mips__) && _MIPS_SIM==_ABIO32) || defined (__ppc__) || (1 == _WIN32) 56 56 #define ARCH_32BIT 57 57 #else 58 58 #error "unsupported platform"