Home | History | Annotate | Download | only in bn

Lines Matching defs:c2

623 /* mul_add_c(a,b,c0,c1,c2)  -- c+=a*b for three word number c=(c2,c1,c0) */
624 /* mul_add_c2(a,b,c0,c1,c2) -- c+=2*a*b for three word number c=(c2,c1,c0) */
625 /* sqr_add_c(a,i,c0,c1,c2) -- c+=a[i]^2 for three word number c=(c2,c1,c0) */
626 /* sqr_add_c2(a,i,c0,c1,c2) -- c+=2*a[i]*a[j] for three word number c=(c2,c1,c0) */
632 #define mul_add_c(a, b, c0, c1, c2) \
641 c2++; \
644 c2) \
653 c2++; \
659 c2++; \
662 #define sqr_add_c(a, i, c0, c1, c2) \
671 c2++; \
674 #define sqr_add_c2(a, i, j, c0, c1, c2) mul_add_c2((a)[i], (a)[j], c0, c1, c2)
680 #define mul_add_c(a, b, c0, c1, c2) \
688 c2 += (c1 < hi) ? 1 : 0; \
691 #define mul_add_c2(a, b, c0, c1, c2) \
699 c2 += (c1 < tt) ? 1 : 0; \
703 c2 += (c1 < hi) ? 1 : 0; \
706 #define sqr_add_c(a, i, c0, c1, c2) \
714 c2 += (c1 < hi) ? 1 : 0; \
717 #define sqr_add_c2(a, i, j, c0, c1, c2) mul_add_c2((a)[i], (a)[j], c0, c1, c2)
724 #define mul_add_c(a, b, c0, c1, c2) \
734 c2++; \
737 #define mul_add_c2(a, b, c0, c1, c2) \
749 c2++; \
755 c2++; \
758 #define sqr_add_c(a, i, c0, c1, c2) \
767 c2++; \
770 #define sqr_add_c2(a, i, j, c0, c1, c2) mul_add_c2((a)[i], (a)[j], c0, c1, c2)
774 BN_ULONG c1, c2, c3;
777 c2 = 0;
779 mul_add_c(a[0], b[0], c1, c2, c3);
782 mul_add_c(a[0], b[1], c2, c3, c1);
783 mul_add_c(a[1], b[0], c2, c3, c1);
784 r[1] = c2;
785 c2 = 0;
786 mul_add_c(a[2], b[0], c3, c1, c2);
787 mul_add_c(a[1], b[1], c3, c1, c2);
788 mul_add_c(a[0], b[2], c3, c1, c2);
791 mul_add_c(a[0], b[3], c1, c2, c3);
792 mul_add_c(a[1], b[2], c1, c2, c3);
793 mul_add_c(a[2], b[1], c1, c2, c3);
794 mul_add_c(a[3], b[0], c1, c2, c3);
797 mul_add_c(a[4], b[0], c2, c3, c1);
798 mul_add_c(a[3], b[1], c2, c3, c1);
799 mul_add_c(a[2], b[2], c2, c3, c1);
800 mul_add_c(a[1], b[3], c2, c3, c1);
801 mul_add_c(a[0], b[4], c2, c3, c1);
802 r[4] = c2;
803 c2 = 0;
804 mul_add_c(a[0], b[5], c3, c1, c2);
805 mul_add_c(a[1], b[4], c3, c1, c2);
806 mul_add_c(a[2], b[3], c3, c1, c2);
807 mul_add_c(a[3], b[2], c3, c1, c2);
808 mul_add_c(a[4], b[1], c3, c1, c2);
809 mul_add_c(a[5], b[0], c3, c1, c2);
812 mul_add_c(a[6], b[0], c1, c2, c3);
813 mul_add_c(a[5], b[1], c1, c2, c3);
814 mul_add_c(a[4], b[2], c1, c2, c3);
815 mul_add_c(a[3], b[3], c1, c2, c3);
816 mul_add_c(a[2], b[4], c1, c2, c3);
817 mul_add_c(a[1], b[5], c1, c2, c3);
818 mul_add_c(a[0], b[6], c1, c2, c3);
821 mul_add_c(a[0], b[7], c2, c3, c1);
822 mul_add_c(a[1], b[6], c2, c3, c1);
823 mul_add_c(a[2], b[5], c2, c3, c1);
824 mul_add_c(a[3], b[4], c2, c3, c1);
825 mul_add_c(a[4], b[3], c2, c3, c1);
826 mul_add_c(a[5], b[2], c2, c3, c1);
827 mul_add_c(a[6], b[1], c2, c3, c1);
828 mul_add_c(a[7], b[0], c2, c3, c1);
829 r[7] = c2;
830 c2 = 0;
831 mul_add_c(a[7], b[1], c3, c1, c2);
832 mul_add_c(a[6], b[2], c3, c1, c2);
833 mul_add_c(a[5], b[3], c3, c1, c2);
834 mul_add_c(a[4], b[4], c3, c1, c2);
835 mul_add_c(a[3], b[5], c3, c1, c2);
836 mul_add_c(a[2], b[6], c3, c1, c2);
837 mul_add_c(a[1], b[7], c3, c1, c2);
840 mul_add_c(a[2], b[7], c1, c2, c3);
841 mul_add_c(a[3], b[6], c1, c2, c3);
842 mul_add_c(a[4], b[5], c1, c2, c3);
843 mul_add_c(a[5], b[4], c1, c2, c3);
844 mul_add_c(a[6], b[3], c1, c2, c3);
845 mul_add_c(a[7], b[2], c1, c2, c3);
848 mul_add_c(a[7], b[3], c2, c3, c1);
849 mul_add_c(a[6], b[4], c2, c3, c1);
850 mul_add_c(a[5], b[5], c2, c3, c1);
851 mul_add_c(a[4], b[6], c2, c3, c1);
852 mul_add_c(a[3], b[7], c2, c3, c1);
853 r[10] = c2;
854 c2 = 0;
855 mul_add_c(a[4], b[7], c3, c1, c2);
856 mul_add_c(a[5], b[6], c3, c1, c2);
857 mul_add_c(a[6], b[5], c3, c1, c2);
858 mul_add_c(a[7], b[4], c3, c1, c2);
861 mul_add_c(a[7], b[5], c1, c2, c3);
862 mul_add_c(a[6], b[6], c1, c2, c3);
863 mul_add_c(a[5], b[7], c1, c2, c3);
866 mul_add_c(a[6], b[7], c2, c3, c1);
867 mul_add_c(a[7], b[6], c2, c3, c1);
868 r[13] = c2;
869 c2 = 0;
870 mul_add_c(a[7], b[7], c3, c1, c2);
876 BN_ULONG c1, c2, c3;
879 c2 = 0;
881 mul_add_c(a[0], b[0], c1, c2, c3);
884 mul_add_c(a[0], b[1], c2, c3, c1);
885 mul_add_c(a[1], b[0], c2, c3, c1);
886 r[1] = c2;
887 c2 = 0;
888 mul_add_c(a[2], b[0], c3, c1, c2);
889 mul_add_c(a[1], b[1], c3, c1, c2);
890 mul_add_c(a[0], b[2], c3, c1, c2);
893 mul_add_c(a[0], b[3], c1, c2, c3);
894 mul_add_c(a[1], b[2], c1, c2, c3);
895 mul_add_c(a[2], b[1], c1, c2, c3);
896 mul_add_c(a[3], b[0], c1, c2, c3);
899 mul_add_c(a[3], b[1], c2, c3, c1);
900 mul_add_c(a[2], b[2], c2, c3, c1);
901 mul_add_c(a[1], b[3], c2, c3, c1);
902 r[4] = c2;
903 c2 = 0;
904 mul_add_c(a[2], b[3], c3, c1, c2);
905 mul_add_c(a[3], b[2], c3, c1, c2);
908 mul_add_c(a[3], b[3], c1, c2, c3);
910 r[7] = c2;
914 BN_ULONG c1, c2, c3;
917 c2 = 0;
919 sqr_add_c(a, 0, c1, c2, c3);
922 sqr_add_c2(a, 1, 0, c2, c3, c1);
923 r[1] = c2;
924 c2 = 0;
925 sqr_add_c(a, 1, c3, c1, c2);
926 sqr_add_c2(a, 2, 0, c3, c1, c2);
929 sqr_add_c2(a, 3, 0, c1, c2, c3);
930 sqr_add_c2(a, 2, 1, c1, c2, c3);
933 sqr_add_c(a, 2, c2, c3, c1);
934 sqr_add_c2(a, 3, 1, c2, c3, c1);
935 sqr_add_c2(a, 4, 0, c2, c3, c1);
936 r[4] = c2;
937 c2 = 0;
938 sqr_add_c2(a, 5, 0, c3, c1, c2);
939 sqr_add_c2(a, 4, 1, c3, c1, c2);
940 sqr_add_c2(a, 3, 2, c3, c1, c2);
943 sqr_add_c(a, 3, c1, c2, c3);
944 sqr_add_c2(a, 4, 2, c1, c2, c3);
945 sqr_add_c2(a, 5, 1, c1, c2, c3);
946 sqr_add_c2(a, 6, 0, c1, c2, c3);
949 sqr_add_c2(a, 7, 0, c2, c3, c1);
950 sqr_add_c2(a, 6, 1, c2, c3, c1);
951 sqr_add_c2(a, 5, 2, c2, c3, c1);
952 sqr_add_c2(a, 4, 3, c2, c3, c1);
953 r[7] = c2;
954 c2 = 0;
955 sqr_add_c(a, 4, c3, c1, c2);
956 sqr_add_c2(a, 5, 3, c3, c1, c2);
957 sqr_add_c2(a, 6, 2, c3, c1, c2);
958 sqr_add_c2(a, 7, 1, c3, c1, c2);
961 sqr_add_c2(a, 7, 2, c1, c2, c3);
962 sqr_add_c2(a, 6, 3, c1, c2, c3);
963 sqr_add_c2(a, 5, 4, c1, c2, c3);
966 sqr_add_c(a, 5, c2, c3, c1);
967 sqr_add_c2(a, 6, 4, c2, c3, c1);
968 sqr_add_c2(a, 7, 3, c2, c3, c1);
969 r[10] = c2;
970 c2 = 0;
971 sqr_add_c2(a, 7, 4, c3, c1, c2);
972 sqr_add_c2(a, 6, 5, c3, c1, c2);
975 sqr_add_c(a, 6, c1, c2, c3);
976 sqr_add_c2(a, 7, 5, c1, c2, c3);
979 sqr_add_c2(a, 7, 6, c2, c3, c1);
980 r[13] = c2;
981 c2 = 0;
982 sqr_add_c(a, 7, c3, c1, c2);
988 BN_ULONG c1, c2, c3;
991 c2 = 0;
993 sqr_add_c(a, 0, c1, c2, c3);
996 sqr_add_c2(a, 1, 0, c2, c3, c1);
997 r[1] = c2;
998 c2 = 0;
999 sqr_add_c(a, 1, c3, c1, c2);
1000 sqr_add_c2(a, 2, 0, c3, c1, c2);
1003 sqr_add_c2(a, 3, 0, c1, c2, c3);
1004 sqr_add_c2(a, 2, 1, c1, c2, c3);
1007 sqr_add_c(a, 2, c2, c3, c1);
1008 sqr_add_c2(a, 3, 1, c2, c3, c1);
1009 r[4] = c2;
1010 c2 = 0;
1011 sqr_add_c2(a, 3, 2, c3, c1, c2);
1014 sqr_add_c(a, 3, c1, c2, c3);
1016 r[7] = c2;