mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 22:12:25 +00:00
This commit is contained in:
parent
6a90e8aee1
commit
351ab28cf5
1 changed files with 13 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue