@@ -113,6 +113,8 @@ uint24_t CRT_imulu_b_fast(uint24_t, uint8_t);
113113uint32_t  CRT_lmulu_b (uint32_t , uint8_t );
114114uint32_t  CRT_lmulu_b_fast (uint32_t , uint8_t );
115115
116+ uint64_t  CRT_llmulu_b (uint64_t , uint8_t );
117+ 
116118typedef  struct  reg_group  {
117119    union  {
118120        struct  {
@@ -177,6 +179,14 @@ static bool test_A_UBC_UD(void) {
177179    return  false;
178180}
179181
182+ static  bool  test_A (void ) {
183+     if  (prev_reg .A  ==  next_reg .A ) {
184+         return  true;
185+     }
186+     print_reg ();
187+     return  false;
188+ }
189+ 
180190int  test_smulu_b (void ) {
181191    for  (int  i  =  0 ; i  <  RANDOM_TEST_COUNT ; i ++ ) {
182192        uint16_t  truth , guess , x ;
@@ -258,6 +268,20 @@ int test_lmulu_b_fast(void) {
258268    return  0 ;
259269}
260270
271+ int  test_llmulu_b (void ) {
272+     for  (int  i  =  0 ; i  <  RANDOM_TEST_COUNT ; i ++ ) {
273+         uint64_t  truth , guess , x ;
274+         uint8_t  y ;
275+         x  =  rand64 ();
276+         y  =  rand8 ();
277+         truth  =  x  *  (uint64_t )y ;
278+         guess  =  CRT_llmulu_b (x , y );
279+         CMP ("%016llX" , x , y , truth , guess );
280+         C ((test_A ()));
281+     }
282+     return  0 ;
283+ }
284+ 
261285int  run_tests (void ) {
262286    srand (AUTOTEST_SEED );
263287    int  ret  =  0 ;
@@ -267,6 +291,7 @@ int run_tests(void) {
267291    TEST (test_imulu_b_fast ());
268292    TEST (test_lmulu_b ());
269293    TEST (test_lmulu_b_fast ());
294+     TEST (test_llmulu_b ());
270295
271296    return  ret ;
272297}
0 commit comments