1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-18 06:26:40 +00:00

(CPU) Fix CRC32 instruction when constant values are used as input (#2183)

This commit is contained in:
gdkchan 2021-04-07 18:43:08 -03:00 committed by GitHub
parent fe452ac784
commit d43a56726c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,7 +135,7 @@ namespace ARMeilleure.CodeGen.X86
private static void HandleConstantRegCopy(IntrusiveList<Node> nodes, Node node, Operation operation)
{
if (operation.SourcesCount == 0 || IsIntrinsic(operation.Instruction))
if (operation.SourcesCount == 0 || IsXmmIntrinsic(operation))
{
return;
}
@ -1400,5 +1400,18 @@ namespace ARMeilleure.CodeGen.X86
{
return inst == Instruction.Extended;
}
private static bool IsXmmIntrinsic(Operation operation)
{
if (operation.Instruction != Instruction.Extended)
{
return false;
}
IntrinsicOperation intrinOp = (IntrinsicOperation)operation;
IntrinsicInfo info = IntrinsicTable.GetInfo(intrinOp.Intrinsic);
return info.Type != IntrinsicType.Crc32;
}
}
}