| 192 | } |
| 193 | |
| 194 | void OpDispatchBuilder::FixupAF() { |
| 195 | // The caller has set a desired value of AF in AF[4], regardless of the value |
| 196 | // of PF. We need to fixup AF[4] so that we get the right value when we XOR in |
| 197 | // PF[4] later. The easiest solution is to XOR by PF[4], since: |
| 198 | // |
| 199 | // (AF[4] ^ PF[4]) ^ PF[4] = AF[4] |
| 200 | |
| 201 | auto PFRaw = GetRFLAG(FEXCore::X86State::RFLAG_PF_RAW_LOC); |
| 202 | auto AFRaw = GetRFLAG(FEXCore::X86State::RFLAG_AF_RAW_LOC); |
| 203 | |
| 204 | // Again 64-bit as masking is more expensive. |
| 205 | Ref XorRes = _Xor(OpSize::i64Bit, AFRaw, PFRaw); |
| 206 | SetRFLAG<FEXCore::X86State::RFLAG_AF_RAW_LOC>(XorRes); |
| 207 | } |
| 208 | |
| 209 | void OpDispatchBuilder::SetAFAndFixup(Ref AF) { |
| 210 | // We have a value of AF, we shift into AF[4]. We need to fixup AF[4] so that |
nothing calls this directly
no outgoing calls
no test coverage detected