This commit is contained in:
kudzu_cp 2009-09-09 16:37:21 +00:00
parent 8dce1cfe68
commit 6b58a92c30
2 changed files with 17 additions and 2 deletions

View file

@ -23,7 +23,21 @@ namespace Cosmos.IL2CPU.X86.IL {
public override void Execute(MethodInfo aMethod, ILOpCode aOpCode) { public override void Execute(MethodInfo aMethod, ILOpCode aOpCode) {
var xStackContent = Assembler.Stack.Pop(); 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) { if (xStackContent.Size > 8) {
throw new Exception("StackSize > 8 not supported"); throw new Exception("StackSize > 8 not supported");
} }

View file

@ -140,7 +140,8 @@ namespace Cosmos.IL2CPU {
} else { } else {
xILOp = mILOpsHi[xOpCodeVal & 0xFF]; 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, "ILOp: " + xILOp.ToString());
new Comment(this, "ILOpCode: " + xOpCode.OpCode.ToString()); new Comment(this, "ILOpCode: " + xOpCode.OpCode.ToString());
BeforeOp(aMethod, xOpCode); BeforeOp(aMethod, xOpCode);