From abfd6d7aef996b20bc008fa71865769feef20b51 Mon Sep 17 00:00:00 2001 From: Dokugogagoji_cp Date: Mon, 30 Nov 2009 08:27:50 +0000 Subject: [PATCH] fixing build goofed... --- .../Cosmos.IL2CPU.X86/X86/x87/FXSave.cs | 18 ++++++++++++ .../Cosmos.IL2CPU.X86/X86/x87/FXStore.cs | 20 +++++++++++++ .../CustomImplementation/System/DoubleImpl.cs | 28 +++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/x87/FXSave.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU.X86/X86/x87/FXStore.cs create mode 100644 source2/IL2PCU/Cosmos.IL2CPU/CustomImplementation/System/DoubleImpl.cs diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/x87/FXSave.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/x87/FXSave.cs new file mode 100644 index 000000000..b7c03eaa3 --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/x87/FXSave.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.x87 { + [OpCode("fxsave")] + public class FXSave : InstructionWithDestination { + public static void InitializeEncodingData(Instruction.InstructionData aData) { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption { + OpCode = new byte[] { 0x0F, 0xAE }, + NeedsModRMByte = true, + DestinationMemory = true, + ReverseRegisters=true + }); + } + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/x87/FXStore.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/x87/FXStore.cs new file mode 100644 index 000000000..5ecc04c8a --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/x87/FXStore.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Cosmos.IL2CPU.X86.x87 { + [OpCode("fxrstor")] + public class FXStore : InstructionWithDestination + { + public static void InitializeEncodingData(Instruction.InstructionData aData) { + aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption { + OpCode = new byte[] { 0x0F, 0xAE }, + NeedsModRMByte=true, + InitialModRMByteValue=0x08, + DestinationMemory = true, + ReverseRegisters=true + }); + } + } +} diff --git a/source2/IL2PCU/Cosmos.IL2CPU/CustomImplementation/System/DoubleImpl.cs b/source2/IL2PCU/Cosmos.IL2CPU/CustomImplementation/System/DoubleImpl.cs new file mode 100644 index 000000000..ae1783ced --- /dev/null +++ b/source2/IL2PCU/Cosmos.IL2CPU/CustomImplementation/System/DoubleImpl.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Cosmos.IL2CPU.Plugs; + +namespace Cosmos.IL2CPU.IL.CustomImplementations.System +{ + [Plug(Target = typeof(Double))] + public static class DoubleImpl + { + public static string ToString(ref double aThis) + { + return DoubleImpl2.GetNumberString(aThis); + } + } + public static class DoubleImpl2 + { + public static string GetNumberString(double aValue) + { + const string xDigits = "0123456789"; + const char divisor = '.'; + char[] xResultChars= new char[70]; + //BitConverter.(aValue,0); + return null; + } + } +}