package s3.services.simplejit.x86;

/**
 * @author Hiroshi Yamauchi
 **/
public interface X86Constants {

    public final static byte R_EAX = 0;
    public final static byte R_ECX = 1;
    public final static byte R_EDX = 2;
    public final static byte R_EBX = 3;
    public final static byte R_ESP = 4;
    public final static byte R_EBP = 5;
    public final static byte R_ESI = 6;
    public final static byte R_EDI = 7;

    public final static int MOD_R    = 0xC0;
    public final static int MOD_M_32 = 0x80;
    public final static int MOD_M_8  = 0x40;
    public final static int MOD_M    = 0x0;

    public final static int SS_I_0 = 0x0;
    public final static int SS_I_2 = 0x40;
    public final static int SS_I_4 = 0x80;
    public final static int SS_I_8 = 0xC0;

    // The parameters to the conditional jump instruction
    public final static byte J_L   = 0x0C;
    public final static byte J_LE  = 0x0E;
    public final static byte J_G   = 0x0F;
    public final static byte J_GE  = 0x0D;
    public final static byte J_BE  = 0x06;
    public final static byte J_NBE = 0x07;
    public final static byte J_B   = 0x02;
    public final static byte J_E   = 0x04;
    public final static byte J_NE  = 0x05;
    public final static byte J_A   = 0x07;
    public final static byte J_P   = 0x0A;
    public final static byte J_NP  = 0x0B;
    public final static byte J_C   = 0x02;
    public final static byte J_Z   = 0x04;
    public final static byte J_NZ  = 0x05;

}
