| 2829 | } |
| 2830 | |
| 2831 | void EwReg(int instruction, int ew, struct Data* data) { |
| 2832 | while (data->valid) { |
| 2833 | Reg* reg = &cpu->reg[ew]; |
| 2834 | newInstruction(instruction, data->flags); |
| 2835 | reg->u32 = DEFAULT; |
| 2836 | reg->u16 = data->var1; |
| 2837 | runTestCPU(); |
| 2838 | assertResult(data, cpu, instruction, reg->u16, 0, ew, -1, 0, 16); |
| 2839 | |
| 2840 | newInstruction(instruction, data->flags); |
| 2841 | |
| 2842 | // this will generate flags so the above code can ignore flag generation |
| 2843 | // cmp eax, 0 |
| 2844 | pushCode8(0x83); |
| 2845 | pushCode8(0xf8); |
| 2846 | pushCode8(0); |
| 2847 | |
| 2848 | reg->u32 = DEFAULT; |
| 2849 | reg->u16 = data->var1; |
| 2850 | runTestCPU(); |
| 2851 | assertResult(data, cpu, instruction, reg->u16, 0, ew, -1, 0, 16, true); |
| 2852 | data++; |
| 2853 | } |
| 2854 | } |
| 2855 | |
| 2856 | void EbReg(int instruction, int eb, struct Data* data) { |
| 2857 | while (data->valid) { |
no test coverage detected