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

Function testJ

source/test/testCPU.cpp:5496–5517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5494void testIMul0x26b() { cpu->big = true; GdEd(0x6b, imuld_s8); }
5495
5496void testJ(U8 instruction, U32 flags, bool jumped) {
5497 EAX = 0;
5498
5499 newInstruction(instruction, flags);
5500 pushCode8(2); // jmp over next add
5501
5502 // add al, 0x2
5503 pushCode8(0x04);
5504 pushCode8(0x02);
5505
5506 // add al, 0x3
5507 pushCode8(0x04);
5508 pushCode8(0x03);
5509
5510 runTestCPU();
5511
5512 if (jumped) {
5513 assertTrue(AL == 3);
5514 } else {
5515 assertTrue(AL == 5);
5516 }
5517}
5518
5519void testJumpCmp(U8 instruction, U32 value1, U32 value2, bool jumped) {
5520 // cmp eax, value2

Callers 15

testJOFunction · 0.85
testNJOFunction · 0.85
testJBFunction · 0.85
testNJBFunction · 0.85
testJZFunction · 0.85
testJNZFunction · 0.85
testJBEFunction · 0.85
testJNBEFunction · 0.85
testJSFunction · 0.85
testJNSFunction · 0.85
testJPFunction · 0.85
testJNPFunction · 0.85

Calls 4

newInstructionFunction · 0.85
pushCode8Function · 0.85
runTestCPUFunction · 0.85
assertTrueFunction · 0.85

Tested by

no test coverage detected