ir.c
// IR_JZ and IR_JNZ aren't implemented in the backend for SSE & long doubles.
// Convert:
// - IR_JZ  => IR_EQ with 0.0 & IR_JNZ
// - IR_JNZ => IR_NE with 0.0 & IR_JNZ
IR_JZ and IR_JNZ aren't implemented in the backend for SSE & long doubles.
IR_JZ and IR_JNZ aren ' t implemented in the backend for SSE & long doubles .
void convert_long_doubles_jz_and_jnz(Function *function) {
    make_vreg_count(function, 0);
    for (Tac *ir = function->ir; ir; ir = ir->next) {
        if ((ir->operation == IR_JZ || ir->operation == IR_JNZ) && is_floating_point_type(ir->src1->type)) {
            ir->operation = ir->operation == IR_JZ ? IR_EQ : IR_NE;
            Tac *tac = malloc(sizeof(Tac));
            memset(tac, 0, sizeof(Tac));
            tac->operation = IR_JNZ;
            ir->dst = new_value();
            ir->dst->type = new_type(TYPE_INT);
            ir->dst->vreg = ++function->vreg_count;
            tac->src1 = ir->dst;
            tac->src2 = ir->src2;
            ir->src2 = new_floating_point_constant(ir->src1->type->type, 0.0L);
            ir = insert_instruction_after(ir, tac);
        }
    }
}
void convert_long_doubles_jz_and_jnz ( Function * function ) { make_vreg_count ( function , 0 ) ; for ( Tac * ir = function -> ir ; ir ; ir = ir -> next ) { if ( ( ir -> operation == IR_JZ || ir -> operation == IR_JNZ ) && is_floating_point_type ( ir -> src1 -> type ) ) { ir -> operation = ir -> operation == IR_JZ ? IR_EQ : IR_NE ; Tac * tac = malloc ( sizeof ( Tac ) ) ; memset ( tac , 0 , sizeof ( Tac ) ) ; tac -> operation = IR_JNZ ; ir -> dst = new_value ( ) ; ir -> dst -> type = new_type ( TYPE_INT ) ; ir -> dst -> vreg = ++ function -> vreg_count ; tac -> src1 = ir -> dst ; tac -> src2 = ir -> src2 ; ir -> src2 = new_floating_point_constant ( ir -> src1 -> type -> type , 0.0L ) ; ir = insert_instruction_after ( ir , tac ) ; } } }
IR_JZ and IR_JNZ aren't implemented in the backend for SSE & long doubles.
IR_JZ and IR_JNZ aren ' t implemented in the backend for SSE & long doubles .