Branch Coverage

inc/matrixssl-3-9-3-open/crypto/math/pstmnt.c
Criterion Covered Total %
branch 89 166 53.6


line true false branch
881 0 11296 PSTMNT_ASSERT((a & 1) == 1); /* Ensure value passed in is odd. */
902 45184 11296 while (countdown > 0)
909 0 11296 PSTMNT_ASSERT(a * t == 1); /* Ensure t has been calculated correctly */
921 133615 154449 if (c)
954 5648 0 PSTMNT_PRECONDITION((b != r) || (a == b));
0 5648 PSTMNT_PRECONDITION((b != r) || (a == b));
955 0 5648 PSTMNT_PRECONDITION(szl >= 1);
956 0 5648 PSTMNT_PRECONDITION(szl <= 4096 / PSTMNT_WORD_BITS);
1025 288064 5648 while (szl > 0)
1055 4936230 0 if (temp_r + n != (PSTMNT_UINT64 *) r)
1060 82092192 4936230 for (high_carry = 0, i = 0; i < n; i++)
1075 1330983264 82092192 for (j = 1; j < (int) n; j++)
1087 4936230 0 if (temp_r + n != (PSTMNT_UINT64 *) r)
1126 0 0 PSTMNT_ASSERT(r[2] != 0xffffffff); /* detect possible carry loss */
1127 0 0 PSTMNT_ASSERT(a <= (((uint64_t) (0xFFFFFFFFU)) << 32)); /* Check range of
1157 164472448 4941878 for (i = 0; i < szl; i++)
1192 493417344 14825634 for (i = 0; i < szl; i++)
1233 0 4941878 while (((int32_t) carry) >= 0)
1256 81804128 2462467 for (i = 0; i < szl; i++)
1269 564832 11296 if (*borrow)
1301 0 11296 PSTMNT_PRECONDITION(b != r);
1302 0 11296 PSTMNT_PRECONDITION(szl >= 1);
1303 0 11296 PSTMNT_PRECONDITION(szl <= 4096 / 32);
1305 576128 11296 while (szl > 0)
1333 0 2462467 if (sz == 1)
1341 0 2462467 PSTMNT_PRECONDITION(sz >= 2);
1342 0 2462467 PSTMNT_PRECONDITION(((pstmnt_uint64_aligned4_t *) a) != r);
1345 40902064 2462467 for (i = 0; i < sz; i++)
1352 175628992 40902064 for (k = i - j; j >= 0; j--, k++)
1362 20451032 20451032 if ((i & 1) == 0)
1372 35977130 2462467 for (; i < sz * 2 - 2; i++)
1377 155177960 35977130 for (k = i - j; k < sz; j--, k++)
1388 17988565 17988565 if ((i & 1) == 0)
1410 0 2462467 if (pstmnt_square_comba(a, r, sz))
1415 2462467 0 if ((sz & 1) == 0 && sz < 4096 / 32)
2462467 0 if ((sz & 1) == 0 && sz < 4096 / 32)
1418 0 2462467 if ((((unsigned long) a) & 0x7) != 0)
1426 0 2462467 if (a == (pstmnt_word *) a_storage)
1654 0 2468115 PSTMNT_PRECONDITION(sz >= 2);
1659 41046096 2468115 for (i = 0; i < sz; i++)
1661 373791912 41046096 for (j = i; j >= 0; j--)
1675 38577981 2468115 for (; i < sz * 2 - 1; i++)
1677 332745816 38577981 for (j = i - (sz - 1) - sz; j < 0; j++)
1928 0 2468115 PSTMNT_PRECONDITION(sz >= 2);
1929 0 2468115 PSTMNT_PRECONDITION(a != r);
1930 0 2468115 PSTMNT_PRECONDITION(b != r);
1932 0 2468115 if (pstmnt_mult_comba(a, b, r, sz))
1938 2468115 0 if ((sz & 1) == 0 && sz >= 4 && sz < 4096 / 32)
2468115 0 if ((sz & 1) == 0 && sz >= 4 && sz < 4096 / 32)
2468115 0 if ((sz & 1) == 0 && sz >= 4 && sz < 4096 / 32)
1942 0 2468115 if ((((unsigned long) a) & 0x7) != 0)
1948 0 2468115 if ((((unsigned long) b) & 0x7) != 0)
1956 0 2468115 if (a == (pstmnt_word *) a_storage)
1960 0 2468115 if (b == (pstmnt_word *) b_storage)
1968 0 0 for (i = 0; i < sz; i++)
1974 0 0 for (i = 0; i < sz * 2 - 2; i++)
1977 0 0 if (j >= sz)
1982 0 0 for (k = i - j; j >= 0 && k < sz; j--, k++)
0 0 for (k = i - j; j >= 0 && k < sz; j--, k++)
1998 0 0 PSTMNT_ASSERT(i == 0);
2285 4936230 0 if ((n & 1) == 0 && n <= 4096 / 32)
4936230 0 if ((n & 1) == 0 && n <= 4096 / 32)
2289 0 4936230 if ((((unsigned long) temp_r) & 0x7) != 0)
2296 0 4936230 if ((((unsigned long) p) & 0x7) != 0)
2307 0 4936230 if (p == (pstmnt_word *) p_storage)
2311 0 4936230 if (temp_r == (pstmnt_word *) temp_r_storage)
2319 0 0 if (temp_r + n != r)
2324 0 0 for (high_carry = 0, i = 0; i < n; i++)
2328 0 0 for (j = 0, c = 0; j < n; j++)
2337 0 0 if (a1 < c)
2349 0 0 if (t < a1)
2358 0 0 if (c < high_carry)
2367 0 0 if (t < c)
2375 0 0 if (temp_r + n != r)
2395 2462467 2462467 if (a == b)
2531 0 11296 for (i = 0; i < start_bit; i++)
2533 0 0 if ((i & 31) == 0)
2541 11296 0 if ((i & 31) == 0)
2546 5648 5648 if (xw & 1)
2561 2462467 11296 for (; i < bits; i++)
2565 71114 2391353 if ((i & 31) == 0)
2570 2462467 0 if (moflags & PSTMNT_MODEXP_FLAGS_SELECT)
2579 0 0 if ((xw & 1) == 1)