Lines Matching full:c2

309 /* mul_add_c(a,b,c0,c1,c2)  -- c+=a*b for three word number c=(c2,c1,c0) */
310 /* mul_add_c2(a,b,c0,c1,c2) -- c+=2*a*b for three word number c=(c2,c1,c0) */
311 /* sqr_add_c(a,i,c0,c1,c2) -- c+=a[i]^2 for three word number c=(c2,c1,c0) */
313 * sqr_add_c2(a,i,c0,c1,c2) -- c+=2*a[i]*a[j] for three word number
314 * c=(c2,c1,c0)
323 # define mul_add_c(a,b,c0,c1,c2) do { \
328 c1 += hi; c2 += (c1<hi)?1:0; \
331 # define mul_add_c2(a,b,c0,c1,c2) do { \
336 c1 += tt; c2 += (c1<tt)?1:0; \
338 c1 += hi; c2 += (c1<hi)?1:0; \
341 # define sqr_add_c(a,i,c0,c1,c2) do { \
346 c1 += hi; c2 += (c1<hi)?1:0; \
349 # define mul_add_c(a,b,c0,c1,c2) do { \ argument
356 : "+r"(c0),"+r"(c1),"+r"(c2) \
361 # define sqr_add_c(a,i,c0,c1,c2) do { \ argument
368 : "+r"(c0),"+r"(c1),"+r"(c2) \
373 # define mul_add_c2(a,b,c0,c1,c2) do { \ argument
380 : "+r"(c0),"+r"(c1),"+r"(c2) \
384 : "+r"(c0),"+r"(c1),"+r"(c2) \
390 # define sqr_add_c2(a,i,j,c0,c1,c2) \ argument
391 mul_add_c2((a)[i],(a)[j],c0,c1,c2)
395 BN_ULONG c1, c2, c3; in bn_mul_comba8() local
398 c2 = 0; in bn_mul_comba8()
400 mul_add_c(a[0], b[0], c1, c2, c3); in bn_mul_comba8()
403 mul_add_c(a[0], b[1], c2, c3, c1); in bn_mul_comba8()
404 mul_add_c(a[1], b[0], c2, c3, c1); in bn_mul_comba8()
405 r[1] = c2; in bn_mul_comba8()
406 c2 = 0; in bn_mul_comba8()
407 mul_add_c(a[2], b[0], c3, c1, c2); in bn_mul_comba8()
408 mul_add_c(a[1], b[1], c3, c1, c2); in bn_mul_comba8()
409 mul_add_c(a[0], b[2], c3, c1, c2); in bn_mul_comba8()
412 mul_add_c(a[0], b[3], c1, c2, c3); in bn_mul_comba8()
413 mul_add_c(a[1], b[2], c1, c2, c3); in bn_mul_comba8()
414 mul_add_c(a[2], b[1], c1, c2, c3); in bn_mul_comba8()
415 mul_add_c(a[3], b[0], c1, c2, c3); in bn_mul_comba8()
418 mul_add_c(a[4], b[0], c2, c3, c1); in bn_mul_comba8()
419 mul_add_c(a[3], b[1], c2, c3, c1); in bn_mul_comba8()
420 mul_add_c(a[2], b[2], c2, c3, c1); in bn_mul_comba8()
421 mul_add_c(a[1], b[3], c2, c3, c1); in bn_mul_comba8()
422 mul_add_c(a[0], b[4], c2, c3, c1); in bn_mul_comba8()
423 r[4] = c2; in bn_mul_comba8()
424 c2 = 0; in bn_mul_comba8()
425 mul_add_c(a[0], b[5], c3, c1, c2); in bn_mul_comba8()
426 mul_add_c(a[1], b[4], c3, c1, c2); in bn_mul_comba8()
427 mul_add_c(a[2], b[3], c3, c1, c2); in bn_mul_comba8()
428 mul_add_c(a[3], b[2], c3, c1, c2); in bn_mul_comba8()
429 mul_add_c(a[4], b[1], c3, c1, c2); in bn_mul_comba8()
430 mul_add_c(a[5], b[0], c3, c1, c2); in bn_mul_comba8()
433 mul_add_c(a[6], b[0], c1, c2, c3); in bn_mul_comba8()
434 mul_add_c(a[5], b[1], c1, c2, c3); in bn_mul_comba8()
435 mul_add_c(a[4], b[2], c1, c2, c3); in bn_mul_comba8()
436 mul_add_c(a[3], b[3], c1, c2, c3); in bn_mul_comba8()
437 mul_add_c(a[2], b[4], c1, c2, c3); in bn_mul_comba8()
438 mul_add_c(a[1], b[5], c1, c2, c3); in bn_mul_comba8()
439 mul_add_c(a[0], b[6], c1, c2, c3); in bn_mul_comba8()
442 mul_add_c(a[0], b[7], c2, c3, c1); in bn_mul_comba8()
443 mul_add_c(a[1], b[6], c2, c3, c1); in bn_mul_comba8()
444 mul_add_c(a[2], b[5], c2, c3, c1); in bn_mul_comba8()
445 mul_add_c(a[3], b[4], c2, c3, c1); in bn_mul_comba8()
446 mul_add_c(a[4], b[3], c2, c3, c1); in bn_mul_comba8()
447 mul_add_c(a[5], b[2], c2, c3, c1); in bn_mul_comba8()
448 mul_add_c(a[6], b[1], c2, c3, c1); in bn_mul_comba8()
449 mul_add_c(a[7], b[0], c2, c3, c1); in bn_mul_comba8()
450 r[7] = c2; in bn_mul_comba8()
451 c2 = 0; in bn_mul_comba8()
452 mul_add_c(a[7], b[1], c3, c1, c2); in bn_mul_comba8()
453 mul_add_c(a[6], b[2], c3, c1, c2); in bn_mul_comba8()
454 mul_add_c(a[5], b[3], c3, c1, c2); in bn_mul_comba8()
455 mul_add_c(a[4], b[4], c3, c1, c2); in bn_mul_comba8()
456 mul_add_c(a[3], b[5], c3, c1, c2); in bn_mul_comba8()
457 mul_add_c(a[2], b[6], c3, c1, c2); in bn_mul_comba8()
458 mul_add_c(a[1], b[7], c3, c1, c2); in bn_mul_comba8()
461 mul_add_c(a[2], b[7], c1, c2, c3); in bn_mul_comba8()
462 mul_add_c(a[3], b[6], c1, c2, c3); in bn_mul_comba8()
463 mul_add_c(a[4], b[5], c1, c2, c3); in bn_mul_comba8()
464 mul_add_c(a[5], b[4], c1, c2, c3); in bn_mul_comba8()
465 mul_add_c(a[6], b[3], c1, c2, c3); in bn_mul_comba8()
466 mul_add_c(a[7], b[2], c1, c2, c3); in bn_mul_comba8()
469 mul_add_c(a[7], b[3], c2, c3, c1); in bn_mul_comba8()
470 mul_add_c(a[6], b[4], c2, c3, c1); in bn_mul_comba8()
471 mul_add_c(a[5], b[5], c2, c3, c1); in bn_mul_comba8()
472 mul_add_c(a[4], b[6], c2, c3, c1); in bn_mul_comba8()
473 mul_add_c(a[3], b[7], c2, c3, c1); in bn_mul_comba8()
474 r[10] = c2; in bn_mul_comba8()
475 c2 = 0; in bn_mul_comba8()
476 mul_add_c(a[4], b[7], c3, c1, c2); in bn_mul_comba8()
477 mul_add_c(a[5], b[6], c3, c1, c2); in bn_mul_comba8()
478 mul_add_c(a[6], b[5], c3, c1, c2); in bn_mul_comba8()
479 mul_add_c(a[7], b[4], c3, c1, c2); in bn_mul_comba8()
482 mul_add_c(a[7], b[5], c1, c2, c3); in bn_mul_comba8()
483 mul_add_c(a[6], b[6], c1, c2, c3); in bn_mul_comba8()
484 mul_add_c(a[5], b[7], c1, c2, c3); in bn_mul_comba8()
487 mul_add_c(a[6], b[7], c2, c3, c1); in bn_mul_comba8()
488 mul_add_c(a[7], b[6], c2, c3, c1); in bn_mul_comba8()
489 r[13] = c2; in bn_mul_comba8()
490 c2 = 0; in bn_mul_comba8()
491 mul_add_c(a[7], b[7], c3, c1, c2); in bn_mul_comba8()
498 BN_ULONG c1, c2, c3; in bn_mul_comba4() local
501 c2 = 0; in bn_mul_comba4()
503 mul_add_c(a[0], b[0], c1, c2, c3); in bn_mul_comba4()
506 mul_add_c(a[0], b[1], c2, c3, c1); in bn_mul_comba4()
507 mul_add_c(a[1], b[0], c2, c3, c1); in bn_mul_comba4()
508 r[1] = c2; in bn_mul_comba4()
509 c2 = 0; in bn_mul_comba4()
510 mul_add_c(a[2], b[0], c3, c1, c2); in bn_mul_comba4()
511 mul_add_c(a[1], b[1], c3, c1, c2); in bn_mul_comba4()
512 mul_add_c(a[0], b[2], c3, c1, c2); in bn_mul_comba4()
515 mul_add_c(a[0], b[3], c1, c2, c3); in bn_mul_comba4()
516 mul_add_c(a[1], b[2], c1, c2, c3); in bn_mul_comba4()
517 mul_add_c(a[2], b[1], c1, c2, c3); in bn_mul_comba4()
518 mul_add_c(a[3], b[0], c1, c2, c3); in bn_mul_comba4()
521 mul_add_c(a[3], b[1], c2, c3, c1); in bn_mul_comba4()
522 mul_add_c(a[2], b[2], c2, c3, c1); in bn_mul_comba4()
523 mul_add_c(a[1], b[3], c2, c3, c1); in bn_mul_comba4()
524 r[4] = c2; in bn_mul_comba4()
525 c2 = 0; in bn_mul_comba4()
526 mul_add_c(a[2], b[3], c3, c1, c2); in bn_mul_comba4()
527 mul_add_c(a[3], b[2], c3, c1, c2); in bn_mul_comba4()
530 mul_add_c(a[3], b[3], c1, c2, c3); in bn_mul_comba4()
532 r[7] = c2; in bn_mul_comba4()
537 BN_ULONG c1, c2, c3; in bn_sqr_comba8() local
540 c2 = 0; in bn_sqr_comba8()
542 sqr_add_c(a, 0, c1, c2, c3); in bn_sqr_comba8()
545 sqr_add_c2(a, 1, 0, c2, c3, c1); in bn_sqr_comba8()
546 r[1] = c2; in bn_sqr_comba8()
547 c2 = 0; in bn_sqr_comba8()
548 sqr_add_c(a, 1, c3, c1, c2); in bn_sqr_comba8()
549 sqr_add_c2(a, 2, 0, c3, c1, c2); in bn_sqr_comba8()
552 sqr_add_c2(a, 3, 0, c1, c2, c3); in bn_sqr_comba8()
553 sqr_add_c2(a, 2, 1, c1, c2, c3); in bn_sqr_comba8()
556 sqr_add_c(a, 2, c2, c3, c1); in bn_sqr_comba8()
557 sqr_add_c2(a, 3, 1, c2, c3, c1); in bn_sqr_comba8()
558 sqr_add_c2(a, 4, 0, c2, c3, c1); in bn_sqr_comba8()
559 r[4] = c2; in bn_sqr_comba8()
560 c2 = 0; in bn_sqr_comba8()
561 sqr_add_c2(a, 5, 0, c3, c1, c2); in bn_sqr_comba8()
562 sqr_add_c2(a, 4, 1, c3, c1, c2); in bn_sqr_comba8()
563 sqr_add_c2(a, 3, 2, c3, c1, c2); in bn_sqr_comba8()
566 sqr_add_c(a, 3, c1, c2, c3); in bn_sqr_comba8()
567 sqr_add_c2(a, 4, 2, c1, c2, c3); in bn_sqr_comba8()
568 sqr_add_c2(a, 5, 1, c1, c2, c3); in bn_sqr_comba8()
569 sqr_add_c2(a, 6, 0, c1, c2, c3); in bn_sqr_comba8()
572 sqr_add_c2(a, 7, 0, c2, c3, c1); in bn_sqr_comba8()
573 sqr_add_c2(a, 6, 1, c2, c3, c1); in bn_sqr_comba8()
574 sqr_add_c2(a, 5, 2, c2, c3, c1); in bn_sqr_comba8()
575 sqr_add_c2(a, 4, 3, c2, c3, c1); in bn_sqr_comba8()
576 r[7] = c2; in bn_sqr_comba8()
577 c2 = 0; in bn_sqr_comba8()
578 sqr_add_c(a, 4, c3, c1, c2); in bn_sqr_comba8()
579 sqr_add_c2(a, 5, 3, c3, c1, c2); in bn_sqr_comba8()
580 sqr_add_c2(a, 6, 2, c3, c1, c2); in bn_sqr_comba8()
581 sqr_add_c2(a, 7, 1, c3, c1, c2); in bn_sqr_comba8()
584 sqr_add_c2(a, 7, 2, c1, c2, c3); in bn_sqr_comba8()
585 sqr_add_c2(a, 6, 3, c1, c2, c3); in bn_sqr_comba8()
586 sqr_add_c2(a, 5, 4, c1, c2, c3); in bn_sqr_comba8()
589 sqr_add_c(a, 5, c2, c3, c1); in bn_sqr_comba8()
590 sqr_add_c2(a, 6, 4, c2, c3, c1); in bn_sqr_comba8()
591 sqr_add_c2(a, 7, 3, c2, c3, c1); in bn_sqr_comba8()
592 r[10] = c2; in bn_sqr_comba8()
593 c2 = 0; in bn_sqr_comba8()
594 sqr_add_c2(a, 7, 4, c3, c1, c2); in bn_sqr_comba8()
595 sqr_add_c2(a, 6, 5, c3, c1, c2); in bn_sqr_comba8()
598 sqr_add_c(a, 6, c1, c2, c3); in bn_sqr_comba8()
599 sqr_add_c2(a, 7, 5, c1, c2, c3); in bn_sqr_comba8()
602 sqr_add_c2(a, 7, 6, c2, c3, c1); in bn_sqr_comba8()
603 r[13] = c2; in bn_sqr_comba8()
604 c2 = 0; in bn_sqr_comba8()
605 sqr_add_c(a, 7, c3, c1, c2); in bn_sqr_comba8()
612 BN_ULONG c1, c2, c3; in bn_sqr_comba4() local
615 c2 = 0; in bn_sqr_comba4()
617 sqr_add_c(a, 0, c1, c2, c3); in bn_sqr_comba4()
620 sqr_add_c2(a, 1, 0, c2, c3, c1); in bn_sqr_comba4()
621 r[1] = c2; in bn_sqr_comba4()
622 c2 = 0; in bn_sqr_comba4()
623 sqr_add_c(a, 1, c3, c1, c2); in bn_sqr_comba4()
624 sqr_add_c2(a, 2, 0, c3, c1, c2); in bn_sqr_comba4()
627 sqr_add_c2(a, 3, 0, c1, c2, c3); in bn_sqr_comba4()
628 sqr_add_c2(a, 2, 1, c1, c2, c3); in bn_sqr_comba4()
631 sqr_add_c(a, 2, c2, c3, c1); in bn_sqr_comba4()
632 sqr_add_c2(a, 3, 1, c2, c3, c1); in bn_sqr_comba4()
633 r[4] = c2; in bn_sqr_comba4()
634 c2 = 0; in bn_sqr_comba4()
635 sqr_add_c2(a, 3, 2, c3, c1, c2); in bn_sqr_comba4()
638 sqr_add_c(a, 3, c1, c2, c3); in bn_sqr_comba4()
640 r[7] = c2; in bn_sqr_comba4()