MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / CLWBOrTPause

Method CLWBOrTPause

FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp:4721–4741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4719}
4720
4721void OpDispatchBuilder::CLWBOrTPause(OpcodeArgs) {
4722 if (DestIsMem(Op)) {
4723 Ref DestMem = MakeSegmentAddress(Op, Op->Dest);
4724 _CacheLineClean(DestMem);
4725 } else {
4726 if (!CTX->HostFeatures.SupportsWFXT) {
4727 UnimplementedOp(Op);
4728 } else {
4729 auto RAX = LoadGPRRegister(X86State::REG_RAX);
4730 auto RDX = LoadGPRRegister(X86State::REG_RDX);
4731
4732 // Incoming source register is unused.
4733 _WFET(RDX, RAX);
4734
4735 // OF, SF, ZF, AF, PF, CF all zero.
4736 // CF is used if the OS deadline is set, which we don't do anything with.
4737 ZeroPF_AF();
4738 ZeroNZCV();
4739 }
4740 }
4741}
4742
4743void OpDispatchBuilder::CLFLUSHOPT(OpcodeArgs) {
4744 Ref DestMem = MakeSegmentAddress(Op, Op->Dest);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected