instrrules.c
// Comparison and assignment rules for integers
Comparison and assignment rules for integers
Comparison and assignment rules for integers
static void add_int_comp_assignment_rules(int is_unsigned, int src1, int src2, char *template) {
    add_int_comparison_assignment_rule(src1, src2, template, IR_EQ, X_SETE,  "sete %vdb");
    add_int_comparison_assignment_rule(src1, src2, template, IR_NE, X_SETNE, "setne %vdb");
    if (is_unsigned) {
        add_int_comparison_assignment_rule(src1, src2, template, IR_LT, X_SETB,  "setb %vdb");
        add_int_comparison_assignment_rule(src1, src2, template, IR_GT, X_SETA,  "seta %vdb");
        add_int_comparison_assignment_rule(src1, src2, template, IR_LE, X_SETBE, "setbe %vdb");
        add_int_comparison_assignment_rule(src1, src2, template, IR_GE, X_SETAE, "setae %vdb");
    }
    else {
        add_int_comparison_assignment_rule(src1, src2, template, IR_LT, X_SETLT, "setl %vdb");
        add_int_comparison_assignment_rule(src1, src2, template, IR_GT, X_SETGT, "setg %vdb");
        add_int_comparison_assignment_rule(src1, src2, template, IR_LE, X_SETLE, "setle %vdb");
        add_int_comparison_assignment_rule(src1, src2, template, IR_GE, X_SETGE, "setge %vdb");
    }
}
static void add_int_comp_assignment_rules ( int is_unsigned , int src1 , int src2 , char * template ) { add_int_comparison_assignment_rule ( src1 , src2 , template , IR_EQ , X_SETE , " " ) ; add_int_comparison_assignment_rule ( src1 , src2 , template , IR_NE , X_SETNE , " " ) ; if ( is_unsigned ) { add_int_comparison_assignment_rule ( src1 , src2 , template , IR_LT , X_SETB , " " ) ; add_int_comparison_assignment_rule ( src1 , src2 , template , IR_GT , X_SETA , " " ) ; add_int_comparison_assignment_rule ( src1 , src2 , template , IR_LE , X_SETBE , " " ) ; add_int_comparison_assignment_rule ( src1 , src2 , template , IR_GE , X_SETAE , " " ) ; } else { add_int_comparison_assignment_rule ( src1 , src2 , template , IR_LT , X_SETLT , " " ) ; add_int_comparison_assignment_rule ( src1 , src2 , template , IR_GT , X_SETGT , " " ) ; add_int_comparison_assignment_rule ( src1 , src2 , template , IR_LE , X_SETLE , " " ) ; add_int_comparison_assignment_rule ( src1 , src2 , template , IR_GE , X_SETGE , " " ) ; } }
Comparison and assignment rules for integers
Comparison and assignment rules for integers