Deleted Added
full compact
parisc-mont.pl (302408) parisc-mont.pl (337982)
1#!/usr/bin/env perl
2
3# ====================================================================
4# Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
5# project. The module is, however, dual licensed under OpenSSL and
6# CRYPTOGAMS licenses depending on where you obtain it. For further
7# details see http://www.openssl.org/~appro/cryptogams/.
8# ====================================================================

--- 496 unchanged lines hidden (view full) ---

505L\$sub
506 ldwx $idx($np),$hi0
507 subb $ti0,$hi0,$hi1
508 ldwx $idx($tp),$ti0
509 addib,<> 4,$idx,L\$sub
510 stws,ma $hi1,4($rp)
511
512 subb $ti0,%r0,$hi1
1#!/usr/bin/env perl
2
3# ====================================================================
4# Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
5# project. The module is, however, dual licensed under OpenSSL and
6# CRYPTOGAMS licenses depending on where you obtain it. For further
7# details see http://www.openssl.org/~appro/cryptogams/.
8# ====================================================================

--- 496 unchanged lines hidden (view full) ---

505L\$sub
506 ldwx $idx($np),$hi0
507 subb $ti0,$hi0,$hi1
508 ldwx $idx($tp),$ti0
509 addib,<> 4,$idx,L\$sub
510 stws,ma $hi1,4($rp)
511
512 subb $ti0,%r0,$hi1
513 ldo -4($tp),$tp
514___
515$code.=<<___ if ($BN_SZ==8);
516 ldd,ma 8($tp),$ti0
517L\$sub
518 ldd $idx($np),$hi0
519 shrpd $ti0,$ti0,32,$ti0 ; flip word order
520 std $ti0,-8($tp) ; save flipped value
521 sub,db $ti0,$hi0,$hi1
522 ldd,ma 8($tp),$ti0
523 addib,<> 8,$idx,L\$sub
524 std,ma $hi1,8($rp)
525
526 extrd,u $ti0,31,32,$ti0 ; carry in flipped word order
527 sub,db $ti0,%r0,$hi1
513___
514$code.=<<___ if ($BN_SZ==8);
515 ldd,ma 8($tp),$ti0
516L\$sub
517 ldd $idx($np),$hi0
518 shrpd $ti0,$ti0,32,$ti0 ; flip word order
519 std $ti0,-8($tp) ; save flipped value
520 sub,db $ti0,$hi0,$hi1
521 ldd,ma 8($tp),$ti0
522 addib,<> 8,$idx,L\$sub
523 std,ma $hi1,8($rp)
524
525 extrd,u $ti0,31,32,$ti0 ; carry in flipped word order
526 sub,db $ti0,%r0,$hi1
528 ldo -8($tp),$tp
529___
530$code.=<<___;
527___
528$code.=<<___;
531 and $tp,$hi1,$ap
532 andcm $rp,$hi1,$bp
533 or $ap,$bp,$np
534
529 ldo `$LOCALS+32`($fp),$tp
535 sub $rp,$arrsz,$rp ; rewind rp
536 subi 0,$arrsz,$idx
530 sub $rp,$arrsz,$rp ; rewind rp
531 subi 0,$arrsz,$idx
537 ldo `$LOCALS+32`($fp),$tp
538L\$copy
532L\$copy
539 ldd $idx($np),$hi0
533 ldd 0($tp),$ti0
534 ldd 0($rp),$hi0
540 std,ma %r0,8($tp)
535 std,ma %r0,8($tp)
541 addib,<> 8,$idx,.-8 ; L\$copy
542 std,ma $hi0,8($rp)
536 comiclr,= 0,$hi1,%r0
537 copy $ti0,$hi0
538 addib,<> 8,$idx,L\$copy
539 std,ma $hi0,8($rp)
543___
544
545if ($BN_SZ==4) { # PA-RISC 1.1 code-path
546$ablo=$ab0;
547$abhi=$ab1;
548$nmlo0=$nm0;
549$nmhi0=$nm1;
550$nmlo1="%r9";

--- 293 unchanged lines hidden (view full) ---

844L\$sub_pa11
845 ldwx $idx($np),$hi0
846 subb $ti0,$hi0,$hi1
847 ldwx $idx($tp),$ti0
848 addib,<> 4,$idx,L\$sub_pa11
849 stws,ma $hi1,4($rp)
850
851 subb $ti0,%r0,$hi1
540___
541
542if ($BN_SZ==4) { # PA-RISC 1.1 code-path
543$ablo=$ab0;
544$abhi=$ab1;
545$nmlo0=$nm0;
546$nmhi0=$nm1;
547$nmlo1="%r9";

--- 293 unchanged lines hidden (view full) ---

841L\$sub_pa11
842 ldwx $idx($np),$hi0
843 subb $ti0,$hi0,$hi1
844 ldwx $idx($tp),$ti0
845 addib,<> 4,$idx,L\$sub_pa11
846 stws,ma $hi1,4($rp)
847
848 subb $ti0,%r0,$hi1
852 ldo -4($tp),$tp
853 and $tp,$hi1,$ap
854 andcm $rp,$hi1,$bp
855 or $ap,$bp,$np
856
849
850 ldo `$LOCALS+32`($fp),$tp
857 sub $rp,$arrsz,$rp ; rewind rp
858 subi 0,$arrsz,$idx
851 sub $rp,$arrsz,$rp ; rewind rp
852 subi 0,$arrsz,$idx
859 ldo `$LOCALS+32`($fp),$tp
860L\$copy_pa11
853L\$copy_pa11
861 ldwx $idx($np),$hi0
854 ldw 0($tp),$ti0
855 ldw 0($rp),$hi0
862 stws,ma %r0,4($tp)
856 stws,ma %r0,4($tp)
857 comiclr,= 0,$hi1,%r0
858 copy $ti0,$hi0
863 addib,<> 4,$idx,L\$copy_pa11
864 stws,ma $hi0,4($rp)
865
866 nop ; alignment
867L\$done
868___
869}
870

--- 125 unchanged lines hidden ---
859 addib,<> 4,$idx,L\$copy_pa11
860 stws,ma $hi0,4($rp)
861
862 nop ; alignment
863L\$done
864___
865}
866

--- 125 unchanged lines hidden ---