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

Method LoadGPRRegister

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

Source from the content-addressed store, hash-verified

4267}
4268
4269Ref OpDispatchBuilder::LoadGPRRegister(uint32_t GPR, IR::OpSize Size, uint8_t Offset, bool AllowUpperGarbage) {
4270 const auto GPRSize = GetGPROpSize();
4271 if (Size == OpSize::iInvalid) {
4272 Size = GPRSize;
4273 }
4274 Ref Reg = LoadGPR(GPR);
4275
4276 if ((!AllowUpperGarbage && (Size != GPRSize)) || Offset != 0) {
4277 // Extract the subregister if requested.
4278 const auto OpSize = std::max(OpSize::i32Bit, Size);
4279 if (AllowUpperGarbage) {
4280 Reg = _Lshr(OpSize, Reg, Constant(Offset));
4281 } else {
4282 Reg = _Bfe(OpSize, IR::OpSizeAsBits(Size), Offset, Reg);
4283 }
4284 }
4285 return Reg;
4286}
4287
4288void OpDispatchBuilder::StoreGPRRegister(uint32_t GPR, const Ref Src, IR::OpSize Size, uint8_t Offset) {
4289 const auto GPRSize = GetGPROpSize();

Callers

nothing calls this directly

Calls 1

OpSizeAsBitsFunction · 0.85

Tested by

no test coverage detected