OpcodeDispatcher: Optimizes < 32-bit register push

We don't need zero in the upper bits for a push.
Makes a couple variants optimal.

Adds missing tests to the 32-bit file, since only 32-bit can push a
32-bit register.
This commit is contained in:
Ryan Houdek committed 2023-10-10 12:04:41 -07:00
1 parent 6253f4f708
commit 4be649c44e
1 file changed
+1 -1
@@ -512,7 +512,7 @@ void OpDispatchBuilder::PUSHOp(OpcodeArgs) {
void OpDispatchBuilder::PUSHREGOp(OpcodeArgs) {
const uint8_t Size = GetSrcSize(Op);
OrderedNode *Src = LoadSource(GPRClass, Op, Op->Dest, Op->Flags, -1);
OrderedNode *Src = LoadSource(GPRClass, Op, Op->Dest , Op->Flags, -1, true, false, MemoryAccessType::ACCESS_DEFAULT, true);
auto OldSP = LoadGPRRegister(X86State::REG_RSP);
const uint8_t GPRSize = CTX->GetGPRSize();