aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/CodeGen/X86
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-07-11 02:52:38 -0300
committerGitHub <noreply@github.com>2020-07-11 15:52:38 +1000
commit38b26cf4242999fa7d8c550993ac0940cd03d55f (patch)
tree1384ad4fd152802dd61153b14b84cd8487c0ffed /ARMeilleure/CodeGen/X86
parent0195d0938d7582d8b4155482e4eef60406ba5ed8 (diff)
Mask shift constants on x86 backend (#1382)
* Mask shift constants on x86 backendd * Version bump
Diffstat (limited to 'ARMeilleure/CodeGen/X86')
-rw-r--r--ARMeilleure/CodeGen/X86/Assembler.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/ARMeilleure/CodeGen/X86/Assembler.cs b/ARMeilleure/CodeGen/X86/Assembler.cs
index 62ca05b2..537c746c 100644
--- a/ARMeilleure/CodeGen/X86/Assembler.cs
+++ b/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);
}