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

Function testFILD

source/test/testFPU.cpp:2725–2750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2723}
2724
2725void testFILD() {
2726 U64 data = 0x123456789abcdef0l;
2727
2728#if defined (BOXEDWINE_MSVC) && !defined (BOXEDWINE_64)
2729 {
2730 struct FSaveState state;
2731 __asm {
2732 finit;
2733 fild data;
2734 fsave[state];
2735 }
2736 assertTrue(state.fsw == 0x3800);
2737 assertTrue(state.st[1].q == data);
2738 }
2739#endif
2740 newInstruction(0);
2741 fpu_init();
2742 fild64(data, 0);
2743 runTestCPU();
2744 assertTrue(cpu->fpu.GetTop() == 7);
2745 U64 low = 0;
2746 U64 high = 0;
2747 cpu->fpu.ST80(cpu->fpu.STV(1), &low, &high);
2748 assertTrue(low == data);
2749 assertTrue(cpu->fpu.SW() == 0x3800);
2750}
2751
2752void testFILD_I16() {
2753 S16 data = -10235;

Callers 1

testFPUDFFunction · 0.85

Calls 9

assertTrueFunction · 0.85
newInstructionFunction · 0.85
fpu_initFunction · 0.85
fild64Function · 0.85
runTestCPUFunction · 0.85
GetTopMethod · 0.80
ST80Method · 0.80
STVMethod · 0.80
SWMethod · 0.80

Tested by

no test coverage detected