]> granicus.if.org Git - python/commitdiff
Issue #16113: KeccakP-1600-opt64 does not support big endian platforms yet.
authorChristian Heimes <christian@python.org>
Wed, 7 Sep 2016 10:42:47 +0000 (12:42 +0200)
committerChristian Heimes <christian@python.org>
Wed, 7 Sep 2016 10:42:47 +0000 (12:42 +0200)
Modules/_sha3/sha3module.c

index 67c69f2c85aff9d2b03b1e6d7b2cf9d7ebf250ac..c236387fafd3be2e8aff97e9f6172f8234180f3d 100644 (file)
   /* opt64 uses un-aligned memory access that causes a BUS error with msg
    * 'invalid address alignment' on SPARC. */
   #define KeccakOpt 32
+#elif PY_BIG_ENDIAN
+  /* opt64 is not yet supported on big endian platforms */
+  #define KeccakOpt 32
 #elif SIZEOF_VOID_P == 8 && defined(PY_UINT64_T)
-  /* opt64 works only for 64bit platforms with unsigned int64 */
+  /* opt64 works only on little-endian 64bit platforms with unsigned int64 */
   #define KeccakOpt 64
 #else
   /* opt32 is used for the remaining 32 and 64bit platforms */