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_mul_comba_4.c
00001 #define TFM_DEFINES 00002 #include "fp_mul_comba.c" 00003 00004 #ifdef TFM_MUL4 00005 void fp_mul_comba4(fp_int *A, fp_int *B, fp_int *C) 00006 { 00007 fp_digit c0, c1, c2, at[8]; 00008 00009 memcpy(at, A->dp, 4 * sizeof(fp_digit)); 00010 memcpy(at+4, B->dp, 4 * sizeof(fp_digit)); 00011 COMBA_START; 00012 00013 COMBA_CLEAR; 00014 /* 0 */ 00015 MULADD(at[0], at[4]); 00016 COMBA_STORE(C->dp[0]); 00017 /* 1 */ 00018 COMBA_FORWARD; 00019 MULADD(at[0], at[5]); MULADD(at[1], at[4]); 00020 COMBA_STORE(C->dp[1]); 00021 /* 2 */ 00022 COMBA_FORWARD; 00023 MULADD(at[0], at[6]); MULADD(at[1], at[5]); MULADD(at[2], at[4]); 00024 COMBA_STORE(C->dp[2]); 00025 /* 3 */ 00026 COMBA_FORWARD; 00027 MULADD(at[0], at[7]); MULADD(at[1], at[6]); MULADD(at[2], at[5]); MULADD(at[3], at[4]); 00028 COMBA_STORE(C->dp[3]); 00029 /* 4 */ 00030 COMBA_FORWARD; 00031 MULADD(at[1], at[7]); MULADD(at[2], at[6]); MULADD(at[3], at[5]); 00032 COMBA_STORE(C->dp[4]); 00033 /* 5 */ 00034 COMBA_FORWARD; 00035 MULADD(at[2], at[7]); MULADD(at[3], at[6]); 00036 COMBA_STORE(C->dp[5]); 00037 /* 6 */ 00038 COMBA_FORWARD; 00039 MULADD(at[3], at[7]); 00040 COMBA_STORE(C->dp[6]); 00041 COMBA_STORE2(C->dp[7]); 00042 C->used = 8; 00043 C->sign = A->sign ^ B->sign; 00044 fp_clamp(C); 00045 COMBA_FINI; 00046 } 00047 #endif
Generated on Wed Jul 13 2022 00:22:54 by
1.7.2
