Przeglądaj źródła

Mask shift constants on x86 backend (#1382)

* Mask shift constants on x86 backendd

* Version bump
gdkchan 5 lat temu
rodzic
commit
38b26cf424

+ 4 - 0
ARMeilleure/CodeGen/X86/Assembler.cs

@@ -882,6 +882,10 @@ namespace ARMeilleure.CodeGen.X86
 
                 source = null;
             }
+            else if (source.Kind == OperandKind.Constant)
+            {
+                source = source.With((uint)source.Value & (dest.Type == OperandType.I32 ? 0x1f : 0x3f));
+            }
 
             WriteInstruction(dest, source, type, inst);
         }

+ 1 - 1
ARMeilleure/Translation/PTC/Ptc.cs

@@ -20,7 +20,7 @@ namespace ARMeilleure.Translation.PTC
     {
         private const string HeaderMagic = "PTChd";
 
-        private const int InternalVersion = 5; //! To be incremented manually for each change to the ARMeilleure project.
+        private const int InternalVersion = 6; //! To be incremented manually for each change to the ARMeilleure project.
 
         private const string BaseDir = "Ryujinx";