aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/CodeGen/X86/CodeGenerator.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-12-19 14:45:58 -0300
committerGitHub <noreply@github.com>2022-12-19 14:45:58 -0300
commitee0f9b03a4a28bc27351cda9f6e2f7a921ad1fd5 (patch)
tree7b6edbcef42d74243c48a8ddc8c50b1fed78cb46 /ARMeilleure/CodeGen/X86/CodeGenerator.cs
parentf93c5f006a44fb4b32ad6e7afdaaaf737b115ace (diff)
Eliminate zero-extension moves in more cases on 32-bit games (#4140)1.1.480
* Eliminate zero-extension moves in more cases on 32-bit games * PPTC version bump * Revert X86Optimizer changes
Diffstat (limited to 'ARMeilleure/CodeGen/X86/CodeGenerator.cs')
-rw-r--r--ARMeilleure/CodeGen/X86/CodeGenerator.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/ARMeilleure/CodeGen/X86/CodeGenerator.cs b/ARMeilleure/CodeGen/X86/CodeGenerator.cs
index 8d8d3b0a..e589da14 100644
--- a/ARMeilleure/CodeGen/X86/CodeGenerator.cs
+++ b/ARMeilleure/CodeGen/X86/CodeGenerator.cs
@@ -1587,6 +1587,12 @@ namespace ARMeilleure.CodeGen.X86
Debug.Assert(dest.Type.IsInteger() && source.Type.IsInteger());
+ // We can eliminate the move if source is already 32-bit and the registers are the same.
+ if (dest.Value == source.Value && source.Type == OperandType.I32)
+ {
+ return;
+ }
+
context.Assembler.Mov(dest, source, OperandType.I32);
}