From 7349142ce7e9402254eeac9f9e2d386184e23aa1 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 8b7ec685b..3840e4faf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,8 @@ Bugfix * Fixed CMake symlinking on out-of-source builds * Fixed dependency issues in test suite * Programs rsa_sign_pss and rsa_verify_pss were not using PSS since 1.3.0 + * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by + Alex Wilson.) = PolarSSL 1.3.4 released on 2014-01-27 Features 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( \