aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/CodeGen/X86/PreAllocator.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-05-13 02:30:21 -0300
committerGitHub <noreply@github.com>2020-05-13 15:30:21 +1000
commit96c7988671177eb565728d31a66a232b1e300c9f (patch)
tree5caae5c78ebffd6a354f5802019f1a3a30a2e500 /ARMeilleure/CodeGen/X86/PreAllocator.cs
parent1f8e45c2baac964a2c6b4dea1d7908d9c30a2a29 (diff)
Remove CpuId IR instruction (#1227)
Diffstat (limited to 'ARMeilleure/CodeGen/X86/PreAllocator.cs')
-rw-r--r--ARMeilleure/CodeGen/X86/PreAllocator.cs32
1 files changed, 0 insertions, 32 deletions
diff --git a/ARMeilleure/CodeGen/X86/PreAllocator.cs b/ARMeilleure/CodeGen/X86/PreAllocator.cs
index 65e2e39e..d1794b55 100644
--- a/ARMeilleure/CodeGen/X86/PreAllocator.cs
+++ b/ARMeilleure/CodeGen/X86/PreAllocator.cs
@@ -265,38 +265,6 @@ namespace ARMeilleure.CodeGen.X86
break;
}
- case Instruction.CpuId:
- {
- // Handle the many restrictions of the CPU Id instruction:
- // - EAX controls the information returned by this instruction.
- // - When EAX is 1, feature information is returned.
- // - The information is written to registers EAX, EBX, ECX and EDX.
- Debug.Assert(dest.Type == OperandType.I64);
-
- Operand eax = Gpr(X86Register.Rax, OperandType.I32);
- Operand ebx = Gpr(X86Register.Rbx, OperandType.I32);
- Operand ecx = Gpr(X86Register.Rcx, OperandType.I32);
- Operand edx = Gpr(X86Register.Rdx, OperandType.I32);
-
- // Value 0x01 = Version, family and feature information.
- nodes.AddBefore(node, Operation(Instruction.Copy, eax, Const(1)));
-
- // Copy results to the destination register.
- // The values are split into 2 32-bits registers, we merge them
- // into a single 64-bits register.
- Operand rcx = Gpr(X86Register.Rcx, OperandType.I64);
-
- node = nodes.AddAfter(node, Operation(Instruction.ZeroExtend32, dest, edx));
- node = nodes.AddAfter(node, Operation(Instruction.ShiftLeft, dest, dest, Const(32)));
- node = nodes.AddAfter(node, Operation(Instruction.BitwiseOr, dest, dest, rcx));
-
- operation.SetDestinations(new Operand[] { eax, ebx, ecx, edx });
-
- operation.SetSources(new Operand[] { eax });
-
- break;
- }
-
case Instruction.Divide:
case Instruction.DivideUI:
{