| 1037 | } |
| 1038 | |
| 1039 | void EwCl(int instruction, int which, struct Data* data) { |
| 1040 | struct Data* start = data; |
| 1041 | for (int i = 0; i < 2; i++) { |
| 1042 | while (data->valid) { |
| 1043 | int ew; |
| 1044 | int rm; |
| 1045 | U32 result; |
| 1046 | |
| 1047 | for (ew = 0; ew < 8; ew++) { |
| 1048 | Reg* reg; |
| 1049 | |
| 1050 | if (ew == 1) |
| 1051 | continue; |
| 1052 | rm = ew | (which << 3) | 0xC0; |
| 1053 | newInstructionWithRM(instruction, rm, data->flags); |
| 1054 | reg = &cpu->reg[E(rm)]; |
| 1055 | reg->u32 = DEFAULT; |
| 1056 | ECX = DEFAULT; |
| 1057 | reg->u16 = data->var1; |
| 1058 | CL = data->var2; |
| 1059 | if (i == 1) { |
| 1060 | useFlags(); // for dynamic core, this will result in a different code path because the flags won't be needed |
| 1061 | } |
| 1062 | runTestCPU(); |
| 1063 | assertResult(data, cpu, instruction, reg->u16, 0, E(rm), -1, 0, 16, i == 1); |
| 1064 | } |
| 1065 | |
| 1066 | rm = (which << 3); |
| 1067 | if (cpu->big) |
| 1068 | rm += 5; |
| 1069 | else |
| 1070 | rm += 6; |
| 1071 | newInstructionWithRM(instruction, rm, data->flags); |
| 1072 | ECX = DEFAULT; |
| 1073 | CL = data->var2; |
| 1074 | if (cpu->big) |
| 1075 | pushCode32(200); |
| 1076 | else |
| 1077 | pushCode16(200); |
| 1078 | memory->writed(cpu->seg[DS].address + 200, DEFAULT); |
| 1079 | memory->writew(cpu->seg[DS].address + 200, data->var1); |
| 1080 | if (i == 1) { |
| 1081 | useFlags(); // for dynamic core, this will result in a different code path because the flags won't be needed |
| 1082 | } |
| 1083 | runTestCPU(); |
| 1084 | result = memory->readw(cpu->seg[DS].address + 200); |
| 1085 | assertResult(data, cpu, instruction, result, 0, -1, -1, cpu->seg[DS].address + 200, 16, i == 1); |
| 1086 | data++; |
| 1087 | } |
| 1088 | data = start; |
| 1089 | } |
| 1090 | } |
| 1091 | |
| 1092 | void EwIx(int instruction, int which, struct Data* data, bool includeLock = false) { |
| 1093 | while (data->valid) { |
no test coverage detected