diff options
author | gdkchan <gab.dark.100@gmail.com> | 2021-04-07 18:43:08 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-07 23:43:08 +0200 |
commit | d43a56726c0640d1af00c58b284e7f6d949302d9 (patch) | |
tree | a4788d43780aa6d67ed275e6ec5b40c7c4cd2528 /ARMeilleure | |
parent | fe452ac7841481017fbbf658cbf842b52e236331 (diff) |
(CPU) Fix CRC32 instruction when constant values are used as input (#2183)
Diffstat (limited to 'ARMeilleure')
-rw-r--r-- | ARMeilleure/CodeGen/X86/PreAllocator.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ARMeilleure/CodeGen/X86/PreAllocator.cs b/ARMeilleure/CodeGen/X86/PreAllocator.cs index cb2476b4..3b3fd683 100644 --- a/ARMeilleure/CodeGen/X86/PreAllocator.cs +++ b/ARMeilleure/CodeGen/X86/PreAllocator.cs @@ -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; + } } }
\ No newline at end of file |