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

Function doFSIN_inst

source/test/testFPU.cpp:1775–1809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1773}
1774
1775void doFSIN_inst(FPU_Float* st0, FPU_Float* st0Result) {
1776#if defined (BOXEDWINE_MSVC) && !defined (BOXEDWINE_64)
1777 {
1778 float f1 = st0->f;
1779 struct FPU_Float result;
1780
1781 __asm {
1782 finit;
1783 fld f1;
1784 fsin;
1785 fstp result.f;
1786 }
1787 if (st0Result->i == FLOAT_QUIET_NAN_BITS) {
1788 assertTrue(isnan(result.f));
1789 } else {
1790 assertFloat(result.f, st0Result->f);
1791 }
1792 }
1793#endif
1794 struct FPU_Float result;
1795
1796 newInstruction(0);
1797 fpu_init();
1798 fldf32(st0->f, 1);
1799 pushCode8(0xd9);
1800 pushCode8(rm(false, 7, 6));
1801 writeTopFloat(2);
1802 runTestCPU();
1803 result.i = memory->readd(HEAP_ADDRESS + 4 * 2);
1804 if (st0Result->i == FLOAT_QUIET_NAN_BITS) {
1805 assertTrue(isnan(result.f));
1806 } else {
1807 assertFloat(result.f, st0Result->f);
1808 }
1809}
1810
1811void testFSIN() {
1812 FPU_Float st0;

Callers 1

testFSINFunction · 0.85

Calls 10

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

Tested by

no test coverage detected