mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 14:02:19 +00:00
This commit is contained in:
parent
8dce1cfe68
commit
6b58a92c30
2 changed files with 17 additions and 2 deletions
|
|
@ -23,7 +23,21 @@ namespace Cosmos.IL2CPU.X86.IL {
|
|||
|
||||
public override void Execute(MethodInfo aMethod, ILOpCode aOpCode) {
|
||||
var xStackContent = Assembler.Stack.Pop();
|
||||
Assembler.Stack.Pop();
|
||||
switch (aOpCode.OpCode) {
|
||||
case ILOpCode.Code.Beq:
|
||||
case ILOpCode.Code.Bge:
|
||||
case ILOpCode.Code.Bgt:
|
||||
case ILOpCode.Code.Bge_Un:
|
||||
case ILOpCode.Code.Bgt_Un:
|
||||
case ILOpCode.Code.Ble:
|
||||
case ILOpCode.Code.Ble_Un:
|
||||
case ILOpCode.Code.Bne_Un:
|
||||
case ILOpCode.Code.Blt:
|
||||
case ILOpCode.Code.Blt_Un:
|
||||
Assembler.Stack.Pop();
|
||||
break;
|
||||
}
|
||||
|
||||
if (xStackContent.Size > 8) {
|
||||
throw new Exception("StackSize > 8 not supported");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,7 +140,8 @@ namespace Cosmos.IL2CPU {
|
|||
} else {
|
||||
xILOp = mILOpsHi[xOpCodeVal & 0xFF];
|
||||
}
|
||||
//mLog.Write ( "[" + xILOp.ToString() + "] \t Stack start: " + Stack.Count.ToString() );
|
||||
mLog.WriteLine ( "[" + xILOp.ToString() + "] \t Stack start: " + Stack.Count.ToString() );
|
||||
mLog.Flush();
|
||||
new Comment(this, "ILOp: " + xILOp.ToString());
|
||||
new Comment(this, "ILOpCode: " + xOpCode.OpCode.ToString());
|
||||
BeforeOp(aMethod, xOpCode);
|
||||
|
|
|
|||
Loading…
Reference in a new issue