Fix pre-allocator shift instruction copy on a specific case (#1752)

* Fix pre-allocator shift instruction copy on a specific case

* Fix to make shift use int rather than long for constants
This commit is contained in:
gdkchan 2020-12-14 17:56:07 -03:00 committed by GitHub
parent c8bb3cc50e
commit 47ba81c661
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 47 deletions

View file

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