Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: MiniTLS-HTTPS-Example
fp_sqr_comba_3.c
00001 #define TFM_DEFINES 00002 #include "fp_sqr_comba.c" 00003 00004 #ifdef TFM_SQR3 00005 void fp_sqr_comba3(fp_int *A, fp_int *B) 00006 { 00007 fp_digit *a, b[6], c0, c1, c2, sc0, sc1, sc2; 00008 #ifdef TFM_ISO 00009 fp_word tt; 00010 #endif 00011 00012 a = A->dp; 00013 COMBA_START; 00014 00015 /* clear carries */ 00016 CLEAR_CARRY; 00017 00018 /* output 0 */ 00019 SQRADD(a[0],a[0]); 00020 COMBA_STORE(b[0]); 00021 00022 /* output 1 */ 00023 CARRY_FORWARD; 00024 SQRADD2(a[0], a[1]); 00025 COMBA_STORE(b[1]); 00026 00027 /* output 2 */ 00028 CARRY_FORWARD; 00029 SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); 00030 COMBA_STORE(b[2]); 00031 00032 /* output 3 */ 00033 CARRY_FORWARD; 00034 SQRADD2(a[1], a[2]); 00035 COMBA_STORE(b[3]); 00036 00037 /* output 4 */ 00038 CARRY_FORWARD; 00039 SQRADD(a[2], a[2]); 00040 COMBA_STORE(b[4]); 00041 COMBA_STORE2(b[5]); 00042 COMBA_FINI; 00043 00044 B->used = 6; 00045 B->sign = FP_ZPOS; 00046 memcpy(B->dp, b, 6 * sizeof(fp_digit)); 00047 fp_clamp(B); 00048 } 00049 #endif 00050 00051 00052 /* $Source: /cvs/libtom/tomsfastmath/src/sqr/fp_sqr_comba_3.c,v $ */ 00053 /* $Revision: 1.2 $ */ 00054 /* $Date: 2007/02/17 03:39:01 $ */
Generated on Wed Jul 13 2022 00:22:54 by
1.7.2