using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Indy.IL2CPU.Assembler.X86
{
[Serializable]
public enum Condition
{
///
/// DEST > SOURCE (signed)
///
Greater,
///
/// DEST >= SOURCE (singed)
///
GreaterOrEqual,
///
/// DEST < SOURCE (signed)
///
Less,
///
/// DEST <= SOURCE (signed)
///
LessOrEqual,
///
/// DEST > SOURCE (unsigned)
///
Above,
///
/// DEST >= SOURCE (unsigned)
///
AboveOrEqual,
///
/// DEST < SOURCE (unsigned)
///
Below,
///
/// DEST <= SOURCE (unsigned)
///
BelowOrEqual,
}
public static class ConditionHelperExt
{
public static string GetMnemonics(this Condition condition)
{
switch (condition)
{
case Condition.Above:
return "a";
case Condition.AboveOrEqual:
return "ae";
case Condition.Below:
return "b";
case Condition.BelowOrEqual:
return "be";
case Condition.Greater:
return "g";
case Condition.GreaterOrEqual:
return "ge";
case Condition.Less:
return "l";
case Condition.LessOrEqual:
return "le";
default:
throw new NotSupportedException();
}
}
}
}