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

Method MOVBEOp

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

Source from the content-addressed store, hash-verified

4699}
4700
4701void OpDispatchBuilder::MOVBEOp(OpcodeArgs) {
4702 const auto GPRSize = GetGPROpSize();
4703 const auto SrcSize = OpSizeFromSrc(Op);
4704
4705 Ref Src = LoadSource(GPRClass, Op, Op->Src[0], Op->Flags, {.Align = OpSize::i8Bit});
4706 Src = _Rev(std::max(OpSize::i32Bit, SrcSize), Src);
4707
4708 if (SrcSize == OpSize::i16Bit) {
4709 // 16-bit does an insert.
4710 // Rev of 16-bit value as 32-bit replaces the result in the upper 16-bits of the result.
4711 // bfxil the 16-bit result in to the GPR.
4712 Ref Dest = LoadSource_WithOpSize(GPRClass, Op, Op->Dest, GPRSize, Op->Flags);
4713 auto Result = _Bfxil(GPRSize, 16, 16, Dest, Src);
4714 StoreResult_WithOpSize(GPRClass, Op, Op->Dest, Result, GPRSize, OpSize::iInvalid);
4715 } else {
4716 // 32-bit does regular zext
4717 StoreResult(GPRClass, Op, Op->Dest, Src, OpSize::iInvalid);
4718 }
4719}
4720
4721void OpDispatchBuilder::CLWBOrTPause(OpcodeArgs) {
4722 if (DestIsMem(Op)) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected