aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/CodeGen
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
parent1f8e45c2baac964a2c6b4dea1d7908d9c30a2a29 (diff)
Remove CpuId IR instruction (#1227)
Diffstat (limited to 'ARMeilleure/CodeGen')
-rw-r--r--ARMeilleure/CodeGen/X86/CodeGenerator.cs6
-rw-r--r--ARMeilleure/CodeGen/X86/PreAllocator.cs32
2 files changed, 0 insertions, 38 deletions
diff --git a/ARMeilleure/CodeGen/X86/CodeGenerator.cs b/ARMeilleure/CodeGen/X86/CodeGenerator.cs
index 1bcab736..a6347b27 100644
--- a/ARMeilleure/CodeGen/X86/CodeGenerator.cs
+++ b/ARMeilleure/CodeGen/X86/CodeGenerator.cs
@@ -53,7 +53,6 @@ namespace ARMeilleure.CodeGen.X86
Add(Instruction.ConvertToFP, GenerateConvertToFP);
Add(Instruction.Copy, GenerateCopy);
Add(Instruction.CountLeadingZeros, GenerateCountLeadingZeros);
- Add(Instruction.CpuId, GenerateCpuId);
Add(Instruction.Divide, GenerateDivide);
Add(Instruction.DivideUI, GenerateDivideUI);
Add(Instruction.Fill, GenerateFill);
@@ -765,11 +764,6 @@ namespace ARMeilleure.CodeGen.X86
context.Assembler.Xor(dest, Const(operandMask), OperandType.I32);
}
- private static void GenerateCpuId(CodeGenContext context, Operation operation)
- {
- context.Assembler.Cpuid();
- }
-
private static void GenerateDivide(CodeGenContext context, Operation operation)
{
Operand dest = operation.Destination;
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:
{