Apply "better safe than sorry" approach after addressing sporadic SEGV in
authorAndy Polyakov <appro@openssl.org>
Tue, 15 Nov 2005 08:02:10 +0000 (08:02 +0000)
committerAndy Polyakov <appro@openssl.org>
Tue, 15 Nov 2005 08:02:10 +0000 (08:02 +0000)
bn_sub_words to the rest of the sparcv8plus.S.

crypto/bn/asm/sparcv8plus.S

index 8992928ca846887082dc5d96b06a15a349009298..8c56e2e7e7cbe0b454b9ecaf3c3fce242ab364be 100644 (file)
  * BN_ULONG w;
  */
 bn_mul_add_words:
+       sra     %o2,%g0,%o2     ! signx %o2
        brgz,a  %o2,.L_bn_mul_add_words_proceed
        lduw    [%o1],%g2
        retl
        clr     %o0
+       nop
+       nop
+       nop
 
 .L_bn_mul_add_words_proceed:
        srl     %o3,%g0,%o3     ! clruw %o3
@@ -260,10 +264,14 @@ bn_mul_add_words:
  * BN_ULONG w;
  */
 bn_mul_words:
+       sra     %o2,%g0,%o2     ! signx %o2
        brgz,a  %o2,.L_bn_mul_words_proceeed
        lduw    [%o1],%g2
        retl
        clr     %o0
+       nop
+       nop
+       nop
 
 .L_bn_mul_words_proceeed:
        srl     %o3,%g0,%o3     ! clruw %o3
@@ -344,10 +352,14 @@ bn_mul_words:
  * int n;
  */
 bn_sqr_words:
+       sra     %o2,%g0,%o2     ! signx %o2
        brgz,a  %o2,.L_bn_sqr_words_proceeed
        lduw    [%o1],%g2
        retl
        clr     %o0
+       nop
+       nop
+       nop
 
 .L_bn_sqr_words_proceeed:
        andcc   %o2,-4,%g0