| 2199 | } |
| 2200 | |
| 2201 | void testFpuCmov(U8 group, U8 flags) { |
| 2202 | struct FPU_Float result; |
| 2203 | |
| 2204 | newInstruction(0); |
| 2205 | fpu_init(); |
| 2206 | fldf32(2.0f, 1); |
| 2207 | fldf32(3.0f, 2); |
| 2208 | pushCode8(0xda); |
| 2209 | pushCode8(rm(false, group, 1)); // cmov top-1 to top |
| 2210 | writeTopFloat(3); |
| 2211 | runTestCPU(); |
| 2212 | result.i = memory->readd(HEAP_ADDRESS + 4 * 3); |
| 2213 | assertTrue(result.f == 3.0f); // top didn't change |
| 2214 | |
| 2215 | newInstruction(flags); |
| 2216 | fpu_init(); |
| 2217 | fldf32(2.0f, 1); |
| 2218 | fldf32(3.0f, 2); |
| 2219 | pushCode8(0xda); |
| 2220 | pushCode8(rm(false, group, 1)); // cmov top-1 to top |
| 2221 | writeTopFloat(3); |
| 2222 | runTestCPU(); |
| 2223 | result.i = memory->readd(HEAP_ADDRESS + 4 * 3); |
| 2224 | assertTrue(result.f == 2.0f); // top changed |
| 2225 | } |
| 2226 | |
| 2227 | static void doFUCOMPPTest(float val1, float val2, U32 swResult) { |
| 2228 | struct FPU_Float result; |
no test coverage detected