| 1078 | } |
| 1079 | |
| 1080 | void 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 | |
| 1092 | void OpDispatchBuilder::MOVZXOp(OpcodeArgs) { |
| 1093 | Ref Src = LoadSource(GPRClass, Op, Op->Src[0], Op->Flags); |
nothing calls this directly
no test coverage detected