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

Method CPUIDOp

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

Source from the content-addressed store, hash-verified

1365}
1366
1367void OpDispatchBuilder::CPUIDOp(OpcodeArgs) {
1368 const auto GPRSize = GetGPROpSize();
1369
1370 Ref Src = LoadSource_WithOpSize(GPRClass, Op, Op->Src[0], GPRSize, Op->Flags);
1371 Ref Leaf = LoadGPRRegister(X86State::REG_RCX);
1372
1373 Ref RAX = _AllocateGPR(false);
1374 Ref RBX = _AllocateGPR(false);
1375 Ref RCX = _AllocateGPR(false);
1376 Ref RDX = _AllocateGPR(false);
1377
1378 _CPUID(Src, Leaf, RAX, RBX, RCX, RDX);
1379
1380 StoreGPRRegister(X86State::REG_RAX, RAX);
1381 StoreGPRRegister(X86State::REG_RBX, RBX);
1382 StoreGPRRegister(X86State::REG_RCX, RCX);
1383 StoreGPRRegister(X86State::REG_RDX, RDX);
1384}
1385
1386uint32_t OpDispatchBuilder::LoadConstantShift(X86Tables::DecodedOp Op, bool Is1Bit) {
1387 if (Is1Bit) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected