From 351ab28cf587eca87507f7d8c5b6ec740858e421 Mon Sep 17 00:00:00 2001 From: smremde_cp <2296c648a83df9531cb573d8dfdead9aa751ab92VfNzPxkR> Date: Fri, 8 Aug 2008 14:29:05 +0000 Subject: [PATCH] --- source/Indy.IL2CPU.IL.X86/Op.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source/Indy.IL2CPU.IL.X86/Op.cs b/source/Indy.IL2CPU.IL.X86/Op.cs index de291809a..98010aafc 100644 --- a/source/Indy.IL2CPU.IL.X86/Op.cs +++ b/source/Indy.IL2CPU.IL.X86/Op.cs @@ -322,7 +322,19 @@ namespace Indy.IL2CPU.IL.X86 { public static void Add(Assembler.Assembler aAssembler) { StackContent xSize = aAssembler.StackContents.Pop(); if (xSize.IsFloat) { - throw new Exception("Floats not yet supported!"); + + if (xSize.Size > 4) + { + throw new Exception("doubles not supported yet!"); + } + else + { + new CPUx86.SSE.MovSS("xmm0", "[esp]"); + new CPUx86.Add("esp", "4"); + new CPUx86.SSE.MovSS("xmm1", "[esp]"); + new CPUx86.SSE.AddSS("xmm0", "xmm1"); + new CPUx86.SSE.MovSS("[esp]", "xmm0"); + } } if (xSize.Size > 8) { throw new Exception("Size '" + xSize.Size + "' not supported");