From e63560470ef8c2e215ad3bca29849198131b2e1f Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Thu, 6 Mar 2014 00:04:09 +1000 Subject: [PATCH] Don't try to use MIPS32 asm macros on MIPS64 The MIPS32 bn_mul asm code causes segfaults on MIPS64 and failing tests. Until someone has time to fix this up, MIPS64 platforms should fall back to the C implementation (which works fine). --- ChangeLog | 2 ++ include/polarssl/bn_mul.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fcdfccca9..15ddee079 100644 --- a/ChangeLog +++ b/ChangeLog @@ -28,6 +28,8 @@ Bugfix * Fixed testing with out-of-source builds using cmake * Fixed version-major intolerance in server * Fixed CMake symlinking on out-of-source builds + * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by + Alex Wilson.) = Version 1.2.10 released 2013-10-07 Changes diff --git a/include/polarssl/bn_mul.h b/include/polarssl/bn_mul.h index a449d6463..870be37d6 100644 --- a/include/polarssl/bn_mul.h +++ b/include/polarssl/bn_mul.h @@ -770,7 +770,7 @@ ); #endif /* Alpha */ -#if defined(__mips__) +#if defined(__mips__) && !defined(__mips64__) #define MULADDC_INIT \ asm( \