| 2271 | } |
| 2272 | |
| 2273 | void 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 | |
| 2318 | void EdGd(int instruction, struct Data* data, U8 prefix = 0, bool includeLock = false) { |
| 2319 | while (data->valid) { |
no test coverage detected