From a0262e054f44556f503db4085f2fa3738cf39d10 Mon Sep 17 00:00:00 2001 From: Dokugogagoji_cp Date: Tue, 3 Nov 2009 17:18:47 +0000 Subject: [PATCH] fix current build --- .../Cosmos.IL2CPU.X86/X86/SSEAndMMX2/AndPS.cs | 19 ++++++++++++++ .../X86/SSEAndMMX2/ComparePS.cs | 17 ++++++++++++ .../X86/SSEAndMMX2/CompareSS.cs | 19 ++++++++++++++ .../Cosmos.IL2CPU.X86/X86/SSEAndMMX2/Enums.cs | 19 ++++++++++++++ .../X86/SSEAndMMX2/FloatLoad.cs | 11 -------- .../Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MaxSS.cs | 19 ++++++++++++++ .../Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MinSS.cs | 19 ++++++++++++++ .../X86/SSEAndMMX2/MoveAPS.cs | 24 +++++++++++++++++ .../X86/SSEAndMMX2/MoveHLPS.cs | 19 ++++++++++++++ .../X86/SSEAndMMX2/MoveHPS.cs | 23 ++++++++++++++++ .../X86/SSEAndMMX2/MoveLHPS.cs | 19 ++++++++++++++ .../X86/SSEAndMMX2/MoveUPS.cs | 24 +++++++++++++++++ .../Cosmos.IL2CPU.X86/X86/SSEAndMMX2/XorPD.cs | 19 ++++++++++++++ ...ithDestinationAndSourceAndPseudoOpcodes.cs | 26 +++++++++++++++++++ 14 files changed, 266 insertions(+), 11 deletions(-) create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/AndPS.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/ComparePS.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/CompareSS.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/Enums.cs delete mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/FloatLoad.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MaxSS.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MinSS.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveAPS.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveHLPS.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveHPS.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveLHPS.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveUPS.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/XorPD.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/_Infra/InstructionWithDestinationAndSourceAndPseudoOpcodes.cs diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/AndPS.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/AndPS.cs new file mode 100644 index 000000000..fee5d4473 --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/AndPS.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + [OpCode("andps")] + public class AndPS : InstructionWithDestinationAndSource + { + public static void InitializeEncodingData(Instruction.InstructionData aData) + { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0x0F, 0x54 } + }); + } + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/ComparePS.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/ComparePS.cs new file mode 100644 index 000000000..cc9d9efce --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/ComparePS.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + [OpCode("cmpps")] + public class ComparePS : InstructionWithDestinationAndSourceAndPseudoOpcodes + { + public static void InitializeEncodingData(Instruction.InstructionData aData) { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption { + OpCode = new byte[] { 0x0F,0xC2 } + }); + } + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/CompareSS.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/CompareSS.cs new file mode 100644 index 000000000..8caef7f9b --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/CompareSS.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + [OpCode("cmpss")] + public class CompareSS : InstructionWithDestinationAndSourceAndPseudoOpcodes + { + public static void InitializeEncodingData(Instruction.InstructionData aData) + { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0xF3,0x0F,0xC2 } + }); + } + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/Enums.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/Enums.cs new file mode 100644 index 000000000..9c953016d --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/Enums.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + public enum ComparePseudoOpcodes : byte + { + Equal = 0, + LessThan = 1, + LessThanOrEqualTo = 2, + Unordered = 3, + NotEqual = 4, + NotLessThan = 5, + NotLessThanOrEqualTo = 6, + Ordered = 7 + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/FloatLoad.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/FloatLoad.cs deleted file mode 100644 index 3a6d34071..000000000 --- a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/FloatLoad.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Cosmos.IL2CPU.X86.X86.SSEAndMMX2 -{ - public class FloatLoad : InstructionWithDestination - { - } -} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MaxSS.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MaxSS.cs new file mode 100644 index 000000000..3eb3e2784 --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MaxSS.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + [OpCode("maxss")] + public class MaxSS : InstructionWithDestinationAndSource + { + public static void InitializeEncodingData(Instruction.InstructionData aData) + { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0x66, 0x0F, 0x57 } + }); + } + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MinSS.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MinSS.cs new file mode 100644 index 000000000..96d6caae1 --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MinSS.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + [OpCode("minss")] + public class MinSS : InstructionWithDestinationAndSource + { + public static void InitializeEncodingData(Instruction.InstructionData aData) + { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0xF3, 0x0F, 0x5D } + }); + } + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveAPS.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveAPS.cs new file mode 100644 index 000000000..0ecbb30e2 --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveAPS.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + [OpCode("movaps")] + public class MoveAPS : InstructionWithDestinationAndSource + { + public static void InitializeEncodingData(Instruction.InstructionData aData) + { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0x0F, 0x28} + }); + + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0x0F, 0x29 } + }); + } + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveHLPS.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveHLPS.cs new file mode 100644 index 000000000..738f6f5d1 --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveHLPS.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + [OpCode("movhlps")] + public class MoveHLPS : InstructionWithDestinationAndSource + { + public static void InitializeEncodingData(Instruction.InstructionData aData) + { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0x0F, 0x12 } + }); + } + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveHPS.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveHPS.cs new file mode 100644 index 000000000..f9df2c024 --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveHPS.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + [OpCode("movhps")] + public class MoveHPS : InstructionWithDestinationAndSource + { + public static void InitializeEncodingData(Instruction.InstructionData aData) + { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0x0F, 0x16 } + }); + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0x0F, 0x17 } + }); + } + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveLHPS.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveLHPS.cs new file mode 100644 index 000000000..cb1c0496c --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveLHPS.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + [OpCode("movlhps")] + public class MoveLHPS : InstructionWithDestinationAndSource + { + public static void InitializeEncodingData(Instruction.InstructionData aData) + { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0x0F, 0x16 } + }); + } + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveUPS.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveUPS.cs new file mode 100644 index 000000000..5614b1af4 --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/MoveUPS.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + [OpCode("movups")] + public class MoveUPS : InstructionWithDestinationAndSource + { + public static void InitializeEncodingData(Instruction.InstructionData aData) + { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0x0F, 0x10 } + }); + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0x0F, 0x11 } + }); + } + + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/XorPD.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/XorPD.cs new file mode 100644 index 000000000..45ac9f90a --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/XorPD.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + public class XorPD : InstructionWithDestinationAndSource + { + public static void InitializeEncodingData(Instruction.InstructionData aData) + { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption + { + OpCode = new byte[] { 0x66, 0x0F,0x57} + }); + } + + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/_Infra/InstructionWithDestinationAndSourceAndPseudoOpcodes.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/_Infra/InstructionWithDestinationAndSourceAndPseudoOpcodes.cs new file mode 100644 index 000000000..baca98077 --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/SSEAndMMX2/_Infra/InstructionWithDestinationAndSourceAndPseudoOpcodes.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.SSE +{ + public abstract class InstructionWithDestinationAndSourceAndPseudoOpcodes : InstructionWithDestinationAndSource + { + public byte pseudoOpcode + { + get; + set; + } + public override void WriteText(Assembler aAssembler, System.IO.TextWriter aOutput) + { + aOutput.Write(mMnemonic); + aOutput.Write(" "); + aOutput.Write(this.GetDestinationAsString()); + aOutput.Write(", "); + aOutput.Write(this.GetSourceAsString()); + aOutput.Write(", "); + aOutput.Write(this.pseudoOpcode); + } + } +}