mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-20 04:48:53 +00:00
This commit is contained in:
parent
5147a015dc
commit
d82c83567d
1 changed files with 7 additions and 1 deletions
|
|
@ -17,13 +17,19 @@ namespace Indy.IL2CPU.IL.X86 {
|
|||
}
|
||||
public override void DoAssemble() {
|
||||
Assembler.StackSizes.Pop();
|
||||
Assembler.StackSizes.Pop();
|
||||
int xSize = Assembler.StackSizes.Pop();
|
||||
Assembler.StackSizes.Push(4);
|
||||
string BaseLabel = CurInstructionLabel + "__";
|
||||
string LabelTrue = BaseLabel + "True";
|
||||
string LabelFalse = BaseLabel + "False";
|
||||
new CPUx86.Pop(CPUx86.Registers.ECX);
|
||||
if (xSize > 4) {
|
||||
new CPUx86.Add("esp", "4");
|
||||
}
|
||||
new CPUx86.Pop(CPUx86.Registers.EAX);
|
||||
if (xSize > 4) {
|
||||
new CPUx86.Add("esp", "4");
|
||||
}
|
||||
new CPUx86.Pushd(CPUx86.Registers.ECX);
|
||||
new CPUx86.Compare(CPUx86.Registers.EAX, CPUx86.Registers.AtESP);
|
||||
new CPUx86.JumpIfLess(LabelTrue);
|
||||
|
|
|
|||
Loading…
Reference in a new issue