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

Function F32ComBase

source/test/testFPU.cpp:581–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

579}
580
581void F32ComBase(int op, int group, float x, float y, int r, int popCount) {
582 newInstruction(0);
583 fpu_init();
584
585 fldf32(x, 1);
586 writeF(y, 2);
587
588 if (op > 0xFF)
589 pushCode8(0x0F);
590 pushCode8(op & 0xFF);
591
592 pushCode8(rm(true, group, cpu->big ? 5 : 6));
593 if (cpu->big)
594 pushCode32(4 * 2);
595 else
596 pushCode16(4 * 2);
597 writeFPUStatusToAX();
598 runTestCPU();
599 assertTest(r);
600 assertTrue(getFPUStackPosFromAX() == ((7 + popCount) & 7));
601
602 newInstruction(0);
603 fpu_init();
604
605 fldf32(y, 1);
606 fldf32(x, 2);
607 if (op > 0xFF)
608 pushCode8(0x0F);
609 pushCode8(op & 0xFF);
610 pushCode8(rm(false, group, 1));
611 writeFPUStatusToAX();
612 runTestCPU();
613 assertTest(r);
614 assertTrue(getFPUStackPosFromAX() == ((6 + popCount) & 7));
615}
616void F32Com(float x, float y, int r) {
617 F32ComBase(0xd8, 2, x, y, r, 0);
618}

Callers 2

F32ComFunction · 0.85
F32ComPFunction · 0.85

Calls 13

newInstructionFunction · 0.85
fpu_initFunction · 0.85
fldf32Function · 0.85
writeFFunction · 0.85
pushCode8Function · 0.85
rmFunction · 0.85
pushCode32Function · 0.85
pushCode16Function · 0.85
writeFPUStatusToAXFunction · 0.85
runTestCPUFunction · 0.85
assertTestFunction · 0.85
assertTrueFunction · 0.85

Tested by

no test coverage detected