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

Function doFRNDINT

source/test/testFPU.cpp:1889–1901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1887#define ROUND_Chop 3
1888
1889void doFRNDINT(U32 mode, float value, float result) {
1890 newInstruction(0);
1891 fpu_init();
1892 setRounding(mode, 0);
1893 fldf32(value, 1);
1894 pushCode8(0xd9);
1895 pushCode8(rm(false, 7, 4));
1896 writeTopFloat(2);
1897 runTestCPU();
1898 struct FPU_Float i2f;
1899 i2f.i = memory->readd(HEAP_ADDRESS + 4 * 2);
1900 assertTrue(i2f.f == result);
1901}
1902
1903void testFRNDINT() {
1904 if (!cpu->big) {

Callers 1

testFRNDINTFunction · 0.85

Calls 10

newInstructionFunction · 0.85
fpu_initFunction · 0.85
setRoundingFunction · 0.85
fldf32Function · 0.85
pushCode8Function · 0.85
rmFunction · 0.85
writeTopFloatFunction · 0.85
runTestCPUFunction · 0.85
assertTrueFunction · 0.85
readdMethod · 0.45

Tested by

no test coverage detected