hotspot/src/cpu/x86/vm/stubRoutines_x86.cpp
changeset 33794 41ef3dc95179
parent 33066 d98eab8215c4
child 35154 a9b3c1984a01
equal deleted inserted replaced
33790:229ed95d8958 33794:41ef3dc95179
   145   uint32_t product = 0;
   145   uint32_t product = 0;
   146   uint32_t b_pow_x_table[D + 1]; // b_pow_x_table[k] = (b * x**k) mod P
   146   uint32_t b_pow_x_table[D + 1]; // b_pow_x_table[k] = (b * x**k) mod P
   147   b_pow_x_table[0] = b;
   147   b_pow_x_table[0] = b;
   148   for (int k = 0; k < D; ++k) {
   148   for (int k = 0; k < D; ++k) {
   149     // If "a" has non-zero coefficient at x**k,/ add ((b * x**k) mod P) to the result.
   149     // If "a" has non-zero coefficient at x**k,/ add ((b * x**k) mod P) to the result.
   150     if ((a & (uint64_t)(1 << (D - 1 - k))) != 0) product ^= b_pow_x_table[k];
   150     if ((a & (((uint32_t)1) << (D - 1 - k))) != 0) product ^= b_pow_x_table[k];
   151 
   151 
   152     // Compute b_pow_x_table[k+1] = (b ** x**(k+1)) mod P.
   152     // Compute b_pow_x_table[k+1] = (b ** x**(k+1)) mod P.
   153     if (b_pow_x_table[k] & 1) {
   153     if (b_pow_x_table[k] & 1) {
   154       // If degree of (b_pow_x_table[k] * x) is D, then
   154       // If degree of (b_pow_x_table[k] * x) is D, then
   155       // degree of (b_pow_x_table[k] * x - P) is less than D.
   155       // degree of (b_pow_x_table[k] * x - P) is less than D.