Fixed FSCAL instruction causing group F registers to exceed their intended maximum value

This commit is contained in:
tevador 2019-05-15 22:07:26 +02:00
parent 2a04dfdd4f
commit 2b3a03a9dc
3 changed files with 3 additions and 3 deletions

View File

@ -3,4 +3,4 @@ mantissaMask:
exp240:
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
scaleMask:
db 0, 0, 0, 0, 0, 0, 240, 129, 0, 0, 0, 0, 0, 0, 240, 129
db 0, 0, 0, 0, 0, 0, 240, 128, 0, 0, 0, 0, 0, 0, 240, 128

View File

@ -229,7 +229,7 @@ int main(int argc, char** argv) {
std::cout << "Calculated result: ";
result.print(std::cout);
if (noncesCount == 1000 && seedValue == 0)
std::cout << "Reference result: 57eb2044a20f8d6d6ef75eba6d879af5b9850556cb5a7cb459d7b091bd8d63aa" << std::endl;
std::cout << "Reference result: d908c4ce0329e2e104c08c3a76b427dd9dad3622a04b06af965cd00cd62b2d2e" << std::endl;
if (!miningMode) {
std::cout << "Performance: " << 1000 * elapsed / noncesCount << " ms per hash" << std::endl;
}

View File

@ -161,7 +161,7 @@ namespace randomx {
} break;
case InstructionType::FSCAL_R: {
const rx_vec_f128 mask = rx_set1_vec_f128(0x81F0000000000000);
const rx_vec_f128 mask = rx_set1_vec_f128(0x80F0000000000000);
*ibc.fdst = rx_xor_vec_f128(*ibc.fdst, mask);
} break;