MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / FSTFloat

Function FSTFloat

source/test/testFPU.cpp:703–722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

701}
702
703void FSTFloat(int op, int group, float f, int pop) {
704 struct FPU_Float result;
705 newInstruction(0);
706 fpu_init();
707
708 fldf32(f, 1);
709 memory->writed(HEAP_ADDRESS + 4 * 2, 0xCDCDCDCD);
710
711 pushCode8(op);
712 pushCode8(rm(true, group, cpu->big ? 5 : 6));
713 if (cpu->big)
714 pushCode32(4 * 2);
715 else
716 pushCode16(4 * 2);
717 writeFPUStatusToAX();
718 runTestCPU();
719 result.i = memory->readd(HEAP_ADDRESS + 4 * 2);
720 assertTrue(result.f == f || (isnan(result.f) && isnan(f)));
721 assertTrue(getFPUStackPosFromAX() == (pop ? 0 : 7));
722}
723
724void doFSTFloat(int op, int group, int pop) {
725 FSTFloat(op, group, 0.0f, pop);

Callers 1

doFSTFloatFunction · 0.85

Calls 13

newInstructionFunction · 0.85
fpu_initFunction · 0.85
fldf32Function · 0.85
pushCode8Function · 0.85
rmFunction · 0.85
pushCode32Function · 0.85
pushCode16Function · 0.85
writeFPUStatusToAXFunction · 0.85
runTestCPUFunction · 0.85
assertTrueFunction · 0.85
getFPUStackPosFromAXFunction · 0.85
writedMethod · 0.45

Tested by

no test coverage detected