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

Function EwReg

source/test/testCPU.cpp:2831–2854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2829}
2830
2831void 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
2856void EbReg(int instruction, int eb, struct Data* data) {
2857 while (data->valid) {

Callers 15

testAaa0x037Function · 0.85
testAaa0x237Function · 0.85
testAas0x03fFunction · 0.85
testAas0x23fFunction · 0.85
testIncAx0x040Function · 0.85
testIncCx0x041Function · 0.85
testIncDx0x042Function · 0.85
testIncBx0x043Function · 0.85
testIncSp0x044Function · 0.85
testIncBp0x045Function · 0.85
testIncSi0x046Function · 0.85
testIncDi0x047Function · 0.85

Calls 4

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

Tested by

no test coverage detected