void Write(CJumpInt exp) { Out.Write('\t'); switch (exp.Relop) { case CJUMP.Rel.Equal: Out.Write("beq"); break; case CJUMP.Rel.NotEqual: Out.Write("bne"); break; case CJUMP.Rel.LessThan: Out.Write("blt"); break; case CJUMP.Rel.GreaterThan: Out.Write("bgt"); break; case CJUMP.Rel.LessEqual: Out.Write("ble"); break; case CJUMP.Rel.GreaterEqual: Out.Write("bge"); break; default: throw new FatalError("Error at CJumpI in Codegen"); } Out.WriteLine(' ' + GetColor(exp.Left) + ", " + exp.Right + ", " + exp.Label.Lab); }
void print(CJumpInt exp) { Out.WriteLine("CJumpI " + exp.Relop + ' ' + exp.Left + ' ' + exp.Right + ' ' + exp.Label.Lab); }