mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-22 22:09:12 +00:00
This commit is contained in:
parent
76b48915c3
commit
f0052deb3a
9 changed files with 12 additions and 173 deletions
|
|
@ -11,36 +11,8 @@ namespace Cosmos.IL2CPU.X86.IL
|
|||
|
||||
public override void Execute(uint aMethodUID, ILOpCode aOpCode)
|
||||
{
|
||||
//TODO: Implement this Op
|
||||
}
|
||||
throw new NotImplementedException("Add_Ovf not implemented");
|
||||
}
|
||||
|
||||
|
||||
// using System;
|
||||
// using System.IO;
|
||||
//
|
||||
//
|
||||
// using CPU = Indy.IL2CPU.Assembler.X86;
|
||||
//
|
||||
// namespace Indy.IL2CPU.IL.X86 {
|
||||
// [OpCode(OpCodeEnum.Add_Ovf)]
|
||||
// public class Add_Ovf: Op {
|
||||
// private string mNextLabel;
|
||||
// private string mCurLabel;
|
||||
// private uint mCurOffset;
|
||||
// private MethodInformation mMethodInformation;
|
||||
// public Add_Ovf(ILReader aReader, MethodInformation aMethodInfo)
|
||||
// : base(aReader, aMethodInfo) {
|
||||
// mMethodInformation = aMethodInfo;
|
||||
// mCurOffset = aReader.Position;
|
||||
// mCurLabel = IL.Op.GetInstructionLabel(aReader);
|
||||
// mNextLabel = IL.Op.GetInstructionLabel(aReader.NextPosition);
|
||||
// }
|
||||
// public override void DoAssemble() {
|
||||
// EmitNotImplementedException(Assembler, GetServiceProvider(), "Add_Ovf not yet implemented", mCurLabel, mMethodInformation, mCurOffset, mNextLabel);
|
||||
// //AddWithOverflow(Assembler, true);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,36 +14,5 @@ namespace Cosmos.IL2CPU.X86.IL
|
|||
throw new NotImplementedException("Add_Ovf_Un not implemented");
|
||||
}
|
||||
|
||||
|
||||
// using System;
|
||||
// using System.IO;
|
||||
//
|
||||
//
|
||||
// using CPU = Indy.IL2CPU.Assembler.X86;
|
||||
//
|
||||
// namespace Indy.IL2CPU.IL.X86 {
|
||||
// [OpCode(OpCodeEnum.Add_Ovf_Un)]
|
||||
// public class Add_Ovf_Un: Add_Ovf {
|
||||
// private string mNextLabel;
|
||||
// private string mCurLabel;
|
||||
// private uint mCurOffset;
|
||||
// private MethodInformation mMethodInformation;
|
||||
// public Add_Ovf_Un(ILReader aReader, MethodInformation aMethodInfo)
|
||||
// : base(aReader, aMethodInfo) {
|
||||
// mMethodInformation = aMethodInfo;
|
||||
// mCurOffset = aReader.Position;
|
||||
// mCurLabel = IL.Op.GetInstructionLabel(aReader);
|
||||
// mNextLabel = IL.Op.GetInstructionLabel(aReader.NextPosition);
|
||||
// }
|
||||
//
|
||||
// public override void DoAssemble()
|
||||
// {
|
||||
// EmitNotImplementedException(Assembler, GetServiceProvider(), "Add_Ovf_Un not yet implemented", mCurLabel, mMethodInformation, mCurOffset, mNextLabel);
|
||||
//
|
||||
// //AddWithOverflow(Assembler, false);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,26 +43,6 @@ namespace Cosmos.IL2CPU.X86.IL
|
|||
}
|
||||
OldAsmblr.StackContents.Push(xStackContent);
|
||||
}
|
||||
|
||||
|
||||
// using System;
|
||||
// using System.IO;
|
||||
//
|
||||
//
|
||||
// using CPU = Indy.IL2CPU.Assembler.X86;
|
||||
// using Indy.IL2CPU.Assembler;
|
||||
//
|
||||
// namespace Indy.IL2CPU.IL.X86 {
|
||||
// [OpCode(OpCodeEnum.And)]
|
||||
// public class And: Op {
|
||||
// public And(ILReader aReader, MethodInformation aMethodInfo)
|
||||
// : base(aReader, aMethodInfo) {
|
||||
// }
|
||||
// public override void DoAssemble() {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,34 +13,6 @@ namespace Cosmos.IL2CPU.X86.IL
|
|||
{
|
||||
throw new NotImplementedException("Arglist not yet implemented!");
|
||||
}
|
||||
|
||||
|
||||
// using System;
|
||||
// using System.IO;
|
||||
//
|
||||
//
|
||||
// using CPU = Indy.IL2CPU.Assembler.X86;
|
||||
//
|
||||
// namespace Indy.IL2CPU.IL.X86 {
|
||||
// [OpCode(OpCodeEnum.Arglist)]
|
||||
// public class Arglist: Op {
|
||||
// private string mNextLabel;
|
||||
// private string mCurLabel;
|
||||
// private uint mCurOffset;
|
||||
// private MethodInformation mMethodInformation;
|
||||
//
|
||||
// public Arglist(ILReader aReader, MethodInformation aMethodInfo)
|
||||
// : base(aReader, aMethodInfo) {
|
||||
// mMethodInformation = aMethodInfo;
|
||||
// mCurOffset = aReader.Position;
|
||||
// mCurLabel = IL.Op.GetInstructionLabel(aReader);
|
||||
// mNextLabel = IL.Op.GetInstructionLabel(aReader.NextPosition);
|
||||
// }
|
||||
// public override void DoAssemble() {
|
||||
// EmitNotImplementedException(Assembler, GetServiceProvider(), "ArgList opcode has not been implemented yet", mCurLabel, mMethodInformation, mCurOffset, mNextLabel);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ namespace Cosmos.IL2CPU.X86.IL
|
|||
|
||||
public override void Execute(uint aMethodUID, ILOpCode aOpCode) {
|
||||
//TODO: Implement this Op
|
||||
//TODO: Merge these like Branch if possible, ie Branch_Un
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using CPUx86 = Indy.IL2CPU.Assembler.X86;
|
||||
|
||||
namespace Cosmos.IL2CPU.X86.IL
|
||||
{
|
||||
|
|
@ -10,30 +11,13 @@ namespace Cosmos.IL2CPU.X86.IL
|
|||
}
|
||||
|
||||
public override void Execute(uint aMethodUID, ILOpCode aOpCode) {
|
||||
//TODO: Implement this Op
|
||||
var xStackContent = OldAsmblr.StackContents.Peek();
|
||||
for (int i = 0; i < ((xStackContent.Size / 4) + (xStackContent.Size % 4 == 0 ? 0 : 1)); i++) {
|
||||
new CPUx86.Move { DestinationReg = CPUx86.Registers.EAX, SourceReg = CPUx86.Registers.ESP, SourceDisplacement = i * 4, SourceIsIndirect = true };
|
||||
new CPUx86.Push { DestinationReg = CPUx86.Registers.EAX };
|
||||
}
|
||||
OldAsmblr.StackContents.Push(xStackContent);
|
||||
}
|
||||
|
||||
|
||||
// using System;
|
||||
//
|
||||
// using CPUx86 = Indy.IL2CPU.Assembler.X86;
|
||||
//
|
||||
// namespace Indy.IL2CPU.IL.X86 {
|
||||
// [OpCode(OpCodeEnum.Dup)]
|
||||
// public class Dup: Op {
|
||||
// public Dup(ILReader aReader, MethodInformation aMethodInfo)
|
||||
// : base(aReader, aMethodInfo) {
|
||||
// }
|
||||
// public override void DoAssemble() {
|
||||
// var xStackContent = Assembler.StackContents.Peek();
|
||||
// for (int i = 0; i < ((xStackContent.Size / 4) + (xStackContent.Size % 4 == 0 ? 0 : 1)) ; i++) {
|
||||
// new CPUx86.Move { DestinationReg = CPUx86.Registers.EAX, SourceReg = CPUx86.Registers.ESP, SourceDisplacement=i*4, SourceIsIndirect=true };
|
||||
// new CPUx86.Push { DestinationReg = CPUx86.Registers.EAX };
|
||||
// }
|
||||
// Assembler.StackContents.Push(xStackContent);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,27 +10,8 @@ namespace Cosmos.IL2CPU.X86.IL
|
|||
}
|
||||
|
||||
public override void Execute(uint aMethodUID, ILOpCode aOpCode) {
|
||||
//TODO: Implement this Op
|
||||
throw new Exception("not implemented");
|
||||
}
|
||||
|
||||
|
||||
// using System;
|
||||
// using System.IO;
|
||||
//
|
||||
//
|
||||
// using CPU = Indy.IL2CPU.Assembler.X86;
|
||||
//
|
||||
// namespace Indy.IL2CPU.IL.X86 {
|
||||
// [OpCode(OpCodeEnum.Endfilter)]
|
||||
// public class Endfilter: Op {
|
||||
// public Endfilter(ILReader aReader, MethodInformation aMethodInfo)
|
||||
// : base(aReader, aMethodInfo) {
|
||||
// }
|
||||
// public override void DoAssemble() {
|
||||
// throw new NotImplementedException("This file has been autogenerated and not been changed afterwards!");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,26 +12,6 @@ namespace Cosmos.IL2CPU.X86.IL
|
|||
public override void Execute(uint aMethodUID, ILOpCode aOpCode) {
|
||||
//TODO: Implement this Op
|
||||
}
|
||||
|
||||
|
||||
// using System;
|
||||
// using System.IO;
|
||||
//
|
||||
//
|
||||
// using CPU = Indy.IL2CPU.Assembler.X86;
|
||||
//
|
||||
// namespace Indy.IL2CPU.IL.X86 {
|
||||
// [OpCode(OpCodeEnum.Endfinally)]
|
||||
// public class Endfinally: Op {
|
||||
// public Endfinally(ILReader aReader, MethodInformation aMethodInfo)
|
||||
// : base(aReader, aMethodInfo) {
|
||||
// }
|
||||
// public override void DoAssemble() {
|
||||
// // TODO: unimplemented
|
||||
// //throw new NotImplementedException("This file has been autogenerated and not been changed afterwards!");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Cosmos.IL2CPU.X86.IL
|
|||
}
|
||||
|
||||
public override void Execute(uint aMethodUID, ILOpCode aOpCode) {
|
||||
throw new Exception("TODO: Volatile");
|
||||
//TODO: Volatile
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue