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

Method MOVSXOp

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

Source from the content-addressed store, hash-verified

1078}
1079
1080void OpDispatchBuilder::MOVSXOp(OpcodeArgs) {
1081 // Load garbage in upper bits, since we're sign extending anyway
1082 const auto Size = OpSizeFromSrc(Op);
1083 Ref Src = LoadSource(GPRClass, Op, Op->Src[0], Op->Flags, {.AllowUpperGarbage = true});
1084
1085 // Sign-extend to DstSize and zero-extend to the register size, using a fast
1086 // path for 32-bit dests where the native 32-bit Sbfe zero extends the top.
1087 const auto DstSize = OpSizeFromDst(Op);
1088 Src = _Sbfe(DstSize == OpSize::i64Bit ? OpSize::i64Bit : OpSize::i32Bit, IR::OpSizeAsBits(Size), 0, Src);
1089 StoreResult(GPRClass, Op, Op->Dest, Src, OpSize::iInvalid);
1090}
1091
1092void OpDispatchBuilder::MOVZXOp(OpcodeArgs) {
1093 Ref Src = LoadSource(GPRClass, Op, Op->Src[0], Op->Flags);

Callers

nothing calls this directly

Calls 1

OpSizeAsBitsFunction · 0.85

Tested by

no test coverage detected