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

Function testFMemInt

source/test/testFPU.cpp:2299–2317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2297}
2298
2299void testFMemInt(U8 inst, U8 group, float val1, U32 val2, float fresult) {
2300 struct FPU_Float result;
2301
2302 newInstruction(0);
2303 fpu_init();
2304 fldf32(val1, 1);
2305 memory->writed(HEAP_ADDRESS + 4 * 2, val2);
2306 pushCode8(inst);
2307 pushCode8(rm(true, group, cpu->big ? 5 : 6));
2308 if (cpu->big) {
2309 pushCode32(4 * 2);
2310 } else {
2311 pushCode16(4 * 2);
2312 }
2313 writeTopFloat(3);
2314 runTestCPU();
2315 result.i = memory->readd(HEAP_ADDRESS + 4 * 3);
2316 assertTrue(result.f == fresult);
2317}
2318
2319void testFPUDA() {
2320 // REGS

Callers 1

testFPUDAFunction · 0.85

Calls 12

newInstructionFunction · 0.85
fpu_initFunction · 0.85
fldf32Function · 0.85
pushCode8Function · 0.85
rmFunction · 0.85
pushCode32Function · 0.85
pushCode16Function · 0.85
writeTopFloatFunction · 0.85
runTestCPUFunction · 0.85
assertTrueFunction · 0.85
writedMethod · 0.45
readdMethod · 0.45

Tested by

no test coverage detected