OpcodeDispatcher: allow upper garbage for MOVGPR

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
Alyssa Rosenzweig 2024-08-11 09:52:25 -04:00
parent 6cddd6cbe7
commit 3429321d59

View File

@ -4609,7 +4609,9 @@ void OpDispatchBuilder::UnhandledOp(OpcodeArgs) {
template<uint32_t SrcIndex>
void OpDispatchBuilder::MOVGPROp(OpcodeArgs) {
Ref Src = LoadSource(GPRClass, Op, Op->Src[SrcIndex], Op->Flags, {.Align = 1});
// StoreResult will store with the same size as the input, so we allow upper
// garbage on the input. The zero extension would be pointless.
Ref Src = LoadSource(GPRClass, Op, Op->Src[SrcIndex], Op->Flags, {.Align = 1, .AllowUpperGarbage = true});
StoreResult(GPRClass, Op, Src, 1);
}