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

Function EdId

source/test/testCPU.cpp:2273–2316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2271}
2272
2273void EdId(int instruction, int which, struct Data* data, bool includeLock = false) {
2274 while (data->valid) {
2275 int ed;
2276 int rm;
2277 U32 result;
2278
2279 for (ed = 0; ed < 8; ed++) {
2280 Reg* e;
2281
2282 rm = ed | (which << 3) | 0xC0;
2283 newInstructionWithRM(instruction, rm, data->flags);
2284 pushCode32(data->var2);
2285 e = &cpu->reg[ed];
2286 e->u32 = data->var1;
2287 runTestCPU();
2288 assertResult(data, cpu, instruction, e->u32, 0, -1, -1, 0, 0);
2289 }
2290
2291 for (int lock = 0; lock < 2; lock++) {
2292 rm = (which << 3);
2293 if (cpu->big)
2294 rm += 5;
2295 else
2296 rm += 6;
2297 newInstructionWithRM(instruction, rm, data->flags, lock ? LOCK_PREFIX : 0);
2298 U16 addressOffset = lock == 2 ? 202 : 200;
2299
2300 if (cpu->big)
2301 pushCode32(addressOffset);
2302 else
2303 pushCode16(addressOffset);
2304 pushCode32(data->var2);
2305 memory->writed(cpu->seg[DS].address + addressOffset, data->var1);
2306 runTestCPU();
2307 result = memory->readd(cpu->seg[DS].address + addressOffset);
2308 assertResult(data, cpu, instruction, result, 0, -1, -1, 0, 0);
2309
2310 if (!includeLock) {
2311 break;
2312 }
2313 }
2314 data++;
2315 }
2316}
2317
2318void EdGd(int instruction, struct Data* data, U8 prefix = 0, bool includeLock = false) {
2319 while (data->valid) {

Callers 3

testGrp10x281Function · 0.85
testMovEdId0x2c7Function · 0.85
testGrp30x2f7Function · 0.85

Calls 7

newInstructionWithRMFunction · 0.85
pushCode32Function · 0.85
runTestCPUFunction · 0.85
assertResultFunction · 0.85
pushCode16Function · 0.85
writedMethod · 0.45
readdMethod · 0.45

Tested by

no test coverage detected