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

Function EaxId

source/test/testCPU.cpp:2804–2829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2802}
2803
2804void EaxId(int instruction, struct Data* data) {
2805 while (data->valid) {
2806 // this will verify flags will be set correctly
2807 newInstruction(instruction, data->flags);
2808 pushCode32(data->var2);
2809 EAX = data->var1;
2810 runTestCPU();
2811 assertResult(data, cpu, instruction, EAX, 0, -1, -1, 0, 0);
2812
2813 // this will ignore flags, might take a different path
2814 newInstruction(instruction, data->flags);
2815 pushCode32(data->var2);
2816
2817 // this will generate flags so the above code can ignore flag generation
2818 // cmp eax, 0
2819 pushCode8(0x83);
2820 pushCode8(0xf8);
2821 pushCode8(0);
2822
2823 EAX = data->var1;
2824 runTestCPU();
2825 assertResult(data, cpu, instruction, EAX, 0, -1, -1, 0, 0, true);
2826
2827 data++;
2828 }
2829}
2830
2831void EwReg(int instruction, int ew, struct Data* data) {
2832 while (data->valid) {

Callers 9

testAdd0x205Function · 0.85
testOr0x20dFunction · 0.85
testAdc0x215Function · 0.85
testSbb0x21dFunction · 0.85
testAnd0x225Function · 0.85
testSub0x22dFunction · 0.85
testXor0x235Function · 0.85
testCmp0x23dFunction · 0.85
testTestEaxId0x2a9Function · 0.85

Calls 5

newInstructionFunction · 0.85
pushCode32Function · 0.85
runTestCPUFunction · 0.85
assertResultFunction · 0.85
pushCode8Function · 0.85

Tested by

no test coverage detected