From aaa5dc614f8698a7dcd883786b7f85768f066c62 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sat, 2 Jul 2005 08:58:55 +0000 Subject: [PATCH] More elegant solution to "sparse decimal printout on PPC" problem. --- crypto/bn/asm/ppc.pl | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/crypto/bn/asm/ppc.pl b/crypto/bn/asm/ppc.pl index 8c567424ae..538e3093ac 100644 --- a/crypto/bn/asm/ppc.pl +++ b/crypto/bn/asm/ppc.pl @@ -116,7 +116,7 @@ if ($opf =~ /32\.s/) { $UDIV= "divwu"; # unsigned divide $UCMPI= "cmplwi"; # unsigned compare with immediate $UCMP= "cmplw"; # unsigned compare - $COUNTZ="cntlzw"; # count leading zeros + $CNTLZ= "cntlzw"; # count leading zeros $SHL= "slw"; # shift left $SHR= "srw"; # unsigned shift right $SHRI= "srwi"; # unsigned shift right by immediate @@ -139,7 +139,7 @@ if ($opf =~ /32\.s/) { $UDIV= "divdu"; # unsigned divide $UCMPI= "cmpldi"; # unsigned compare with immediate $UCMP= "cmpld"; # unsigned compare - $COUNTZ="cntlzd"; # count leading zeros + $CNTLZ= "cntlzd"; # count leading zeros $SHL= "sld"; # shift left $SHR= "srd"; # unsigned shift right $SHRI= "srdi"; # unsigned shift right by immediate @@ -1710,17 +1710,12 @@ Lppcasm_add_adios: bclr BO_ALWAYS,CR0_LT Lppcasm_div1: xor r0,r0,r0 #r0=0 - $COUNTZ r7,r5 #r7 = num leading 0s in d. - subfic r8,r7,$BITS #r8 = BN_num_bits_word(d) - cmpi 0,0,r8,$BITS # - bc BO_IF,CR0_EQ,Lppcasm_div2 #proceed if (r8==$BITS) - li r9,1 # r9=1 - $SHL r10,r9,r8 # r9<<=r8 - $UCMP 0,r3,r10 # - bc BO_IF_NOT,CR0_GT,Lppcasm_div2 #or if (h > (1<=d? bc BO_IF,CR0_LT,Lppcasm_div3 #goto Lppcasm_div3 if not -- 2.25.1