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

Function EbCl

source/test/testCPU.cpp:654–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652}
653
654void 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
705void EbIb(int instruction, int which, struct Data* data, bool address32, bool includeLock = false) {
706 while (data->valid) {

Callers 2

testGrp20x0d2Function · 0.85
testGrp20x2d2Function · 0.85

Calls 9

newInstructionWithRMFunction · 0.85
useFlagsFunction · 0.85
runTestCPUFunction · 0.85
assertResultFunction · 0.85
pushCode32Function · 0.85
pushCode16Function · 0.85
writedMethod · 0.45
writebMethod · 0.45
readbMethod · 0.45

Tested by

no test coverage detected