| 652 | } |
| 653 | |
| 654 | void EbCl(int instruction, int which, struct Data* data) { |
| 655 | for (int i = 0; i < 2; i++) { |
| 656 | while (data->valid) { |
| 657 | int rm; |
| 658 | U32 result; |
| 659 | int eb; |
| 660 | |
| 661 | for (eb = 0; eb < 8; eb++) { |
| 662 | U8* reg; |
| 663 | |
| 664 | if (eb == 1) |
| 665 | continue; |
| 666 | rm = eb | (which << 3) | 0xC0; |
| 667 | newInstructionWithRM(instruction, rm, data->flags); |
| 668 | reg = cpu->reg8[E(rm)]; |
| 669 | cpu->reg[E8(rm)].u32 = DEFAULT; |
| 670 | ECX = DEFAULT; |
| 671 | *reg = data->var1; |
| 672 | CL = data->var2; |
| 673 | if (i == 1) { |
| 674 | useFlags(); // for dynamic core, this will result in a different code path because the flags won't be needed |
| 675 | } |
| 676 | runTestCPU(); |
| 677 | assertResult(data, cpu, instruction, *reg, 0, E8(rm), -1, 0, 8, i == 1); |
| 678 | } |
| 679 | |
| 680 | rm = (which << 3); |
| 681 | if (cpu->big) |
| 682 | rm += 5; |
| 683 | else |
| 684 | rm += 6; |
| 685 | newInstructionWithRM(instruction, rm, data->flags); |
| 686 | ECX = DEFAULT; |
| 687 | CL = data->var2; |
| 688 | if (cpu->big) |
| 689 | pushCode32(200); |
| 690 | else |
| 691 | pushCode16(200); |
| 692 | memory->writed(cpu->seg[DS].address + 200, DEFAULT); |
| 693 | memory->writeb(cpu->seg[DS].address + 200, data->var1); |
| 694 | if (i == 1) { |
| 695 | useFlags(); // for dynamic core, this will result in a different code path because the flags won't be needed |
| 696 | } |
| 697 | runTestCPU(); |
| 698 | result = memory->readb(cpu->seg[DS].address + 200); |
| 699 | assertResult(data, cpu, instruction, result, 0, -1, -1, cpu->seg[DS].address + 200, 8, i == 1); |
| 700 | data++; |
| 701 | } |
| 702 | } |
| 703 | } |
| 704 | |
| 705 | void EbIb(int instruction, int which, struct Data* data, bool address32, bool includeLock = false) { |
| 706 | while (data->valid) { |
no test coverage detected