diff --git a/src/CompiledVirtualMachine.cpp b/src/CompiledVirtualMachine.cpp index d7477a3..79dac1d 100644 --- a/src/CompiledVirtualMachine.cpp +++ b/src/CompiledVirtualMachine.cpp @@ -29,10 +29,6 @@ namespace RandomX { for (unsigned i = 0; i < sizeof(reg) / sizeof(Pcg32::result_type); ++i) { *(((uint32_t*)®) + i) = gen(); } - FPINIT(); - for (int i = 0; i < 8; ++i) { - reg.f[i].f64 = (double)reg.f[i].i64; - } for (unsigned i = 0; i < ProgramLength; ++i) { gen(); gen(); gen(); gen(); } @@ -41,7 +37,6 @@ namespace RandomX { } void CompiledVirtualMachine::execute() { - FPINIT(); executeProgram(reg, mem, readDataset, scratchpad); #ifdef TRACE for (int32_t i = InstructionCount - 1; i >= 0; --i) { diff --git a/src/executeProgram-win64.asm b/src/executeProgram-win64.asm index 5d18a04..476e6dc 100644 --- a/src/executeProgram-win64.asm +++ b/src/executeProgram-win64.asm @@ -96,14 +96,16 @@ executeProgram PROC mov r13, qword ptr [rcx+40] mov r14, qword ptr [rcx+48] mov r15, qword ptr [rcx+56] - movd xmm8, qword ptr [rcx+64] - movd xmm9, qword ptr [rcx+72] - movd xmm2, qword ptr [rcx+80] - movd xmm3, qword ptr [rcx+88] - movd xmm4, qword ptr [rcx+96] - movd xmm5, qword ptr [rcx+104] - movd xmm6, qword ptr [rcx+112] - movd xmm7, qword ptr [rcx+120] + mov dword ptr [rsp - 8], 40896 + ldmxcsr dword ptr [rsp - 8] + cvtsi2sd xmm8, qword ptr [rcx+64] + cvtsi2sd xmm9, qword ptr [rcx+72] + cvtsi2sd xmm2, qword ptr [rcx+80] + cvtsi2sd xmm3, qword ptr [rcx+88] + cvtsi2sd xmm4, qword ptr [rcx+96] + cvtsi2sd xmm5, qword ptr [rcx+104] + cvtsi2sd xmm6, qword ptr [rcx+112] + cvtsi2sd xmm7, qword ptr [rcx+120] ; program body