| 701 | } |
| 702 | |
| 703 | void FSTFloat(int op, int group, float f, int pop) { |
| 704 | struct FPU_Float result; |
| 705 | newInstruction(0); |
| 706 | fpu_init(); |
| 707 | |
| 708 | fldf32(f, 1); |
| 709 | memory->writed(HEAP_ADDRESS + 4 * 2, 0xCDCDCDCD); |
| 710 | |
| 711 | pushCode8(op); |
| 712 | pushCode8(rm(true, group, cpu->big ? 5 : 6)); |
| 713 | if (cpu->big) |
| 714 | pushCode32(4 * 2); |
| 715 | else |
| 716 | pushCode16(4 * 2); |
| 717 | writeFPUStatusToAX(); |
| 718 | runTestCPU(); |
| 719 | result.i = memory->readd(HEAP_ADDRESS + 4 * 2); |
| 720 | assertTrue(result.f == f || (isnan(result.f) && isnan(f))); |
| 721 | assertTrue(getFPUStackPosFromAX() == (pop ? 0 : 7)); |
| 722 | } |
| 723 | |
| 724 | void doFSTFloat(int op, int group, int pop) { |
| 725 | FSTFloat(op, group, 0.0f, pop); |
no test coverage detected