From cee712105850ac3385cd0091a923438167433f9f Mon Sep 17 00:00:00 2001 From: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Date: Sat, 8 Apr 2023 01:22:00 +0200 Subject: Move solution and projects to src --- .../IntermediateRepresentation/OperandType.cs | 65 ---------------------- 1 file changed, 65 deletions(-) delete mode 100644 ARMeilleure/IntermediateRepresentation/OperandType.cs (limited to 'ARMeilleure/IntermediateRepresentation/OperandType.cs') diff --git a/ARMeilleure/IntermediateRepresentation/OperandType.cs b/ARMeilleure/IntermediateRepresentation/OperandType.cs deleted file mode 100644 index 81b22cf5..00000000 --- a/ARMeilleure/IntermediateRepresentation/OperandType.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; - -namespace ARMeilleure.IntermediateRepresentation -{ - enum OperandType - { - None, - I32, - I64, - FP32, - FP64, - V128 - } - - static class OperandTypeExtensions - { - public static bool IsInteger(this OperandType type) - { - return type == OperandType.I32 || - type == OperandType.I64; - } - - public static RegisterType ToRegisterType(this OperandType type) - { - switch (type) - { - case OperandType.FP32: return RegisterType.Vector; - case OperandType.FP64: return RegisterType.Vector; - case OperandType.I32: return RegisterType.Integer; - case OperandType.I64: return RegisterType.Integer; - case OperandType.V128: return RegisterType.Vector; - } - - throw new InvalidOperationException($"Invalid operand type \"{type}\"."); - } - - public static int GetSizeInBytes(this OperandType type) - { - switch (type) - { - case OperandType.FP32: return 4; - case OperandType.FP64: return 8; - case OperandType.I32: return 4; - case OperandType.I64: return 8; - case OperandType.V128: return 16; - } - - throw new InvalidOperationException($"Invalid operand type \"{type}\"."); - } - - public static int GetSizeInBytesLog2(this OperandType type) - { - switch (type) - { - case OperandType.FP32: return 2; - case OperandType.FP64: return 3; - case OperandType.I32: return 2; - case OperandType.I64: return 3; - case OperandType.V128: return 4; - } - - throw new InvalidOperationException($"Invalid operand type \"{type}\"."); - } - } -} \ No newline at end of file -- cgit v1.2.3