instrrules.c
// Add integer comparision conditional jump rules
Add integer comparision conditional jump rules
Add integer comparision conditional jump rules
static void add_int_comp_cond_jmp_rules(int *ntc, int is_unsigned, int src1, int src2, char *template) {
    add_int_comp_cond_jmp_rule(ntc, src1, src2, template, IR_EQ, X_JE,  "je %v1",  X_JNE, "jne %v1");
    add_int_comp_cond_jmp_rule(ntc, src1, src2, template, IR_NE, X_JNE, "jne %v1", X_JE,  "je %v1");
    if (is_unsigned) {
        add_int_comp_cond_jmp_rule(ntc, src1, src2, template, IR_LT, X_JB,  "jb %v1" , X_JAE, "jae %v1" );
        add_int_comp_cond_jmp_rule(ntc, src1, src2, template, IR_GT, X_JA,  "ja %v1",  X_JBE, "jbe %v1");
        add_int_comp_cond_jmp_rule(ntc, src1, src2, template, IR_LE, X_JBE, "jbe %v1", X_JA,  "ja %v1");
        add_int_comp_cond_jmp_rule(ntc, src1, src2, template, IR_GE, X_JAE, "jae %v1", X_JB,  "jb %v1");
    }
    else {
        add_int_comp_cond_jmp_rule(ntc, src1, src2, template, IR_LT, X_JLT, "jl %v1" , X_JGE, "jge %v1" );
        add_int_comp_cond_jmp_rule(ntc, src1, src2, template, IR_GT, X_JGT, "jg %v1",  X_JLE, "jle %v1");
        add_int_comp_cond_jmp_rule(ntc, src1, src2, template, IR_LE, X_JLE, "jle %v1", X_JGT, "jg %v1");
        add_int_comp_cond_jmp_rule(ntc, src1, src2, template, IR_GE, X_JGE, "jge %v1", X_JLT, "jl %v1");
    }
}
static void add_int_comp_cond_jmp_rules ( int * ntc , int is_unsigned , int src1 , int src2 , char * template ) { add_int_comp_cond_jmp_rule ( ntc , src1 , src2 , template , IR_EQ , X_JE , " " , X_JNE , " " ) ; add_int_comp_cond_jmp_rule ( ntc , src1 , src2 , template , IR_NE , X_JNE , " " , X_JE , " " ) ; if ( is_unsigned ) { add_int_comp_cond_jmp_rule ( ntc , src1 , src2 , template , IR_LT , X_JB , " " , X_JAE , " " ) ; add_int_comp_cond_jmp_rule ( ntc , src1 , src2 , template , IR_GT , X_JA , " " , X_JBE , " " ) ; add_int_comp_cond_jmp_rule ( ntc , src1 , src2 , template , IR_LE , X_JBE , " " , X_JA , " " ) ; add_int_comp_cond_jmp_rule ( ntc , src1 , src2 , template , IR_GE , X_JAE , " " , X_JB , " " ) ; } else { add_int_comp_cond_jmp_rule ( ntc , src1 , src2 , template , IR_LT , X_JLT , " " , X_JGE , " " ) ; add_int_comp_cond_jmp_rule ( ntc , src1 , src2 , template , IR_GT , X_JGT , " " , X_JLE , " " ) ; add_int_comp_cond_jmp_rule ( ntc , src1 , src2 , template , IR_LE , X_JLE , " " , X_JGT , " " ) ; add_int_comp_cond_jmp_rule ( ntc , src1 , src2 , template , IR_GE , X_JGE , " " , X_JLT , " " ) ; } }
Add integer comparision conditional jump rules
Add integer comparision conditional jump rules