functions.c
// Add an instruction to move a parameter in a register to another register
Add an instruction to move a parameter in a register to another register
Add an instruction to move a parameter in a register to another register
static Tac *make_param_move_to_register_tac(Function *function, Type *type, int function_param_index) {
    Tac *tac = new_instruction(IR_MOVE);
    tac->dst = new_value();
    tac->dst->type = dup_type(type);
    tac->dst->vreg = ++function->vreg_count;
    tac->src1 = new_value();
    tac->src1->type = dup_type(tac->dst->type);
    tac->src1->live_range_preg = is_sse_floating_point_type(type) ? sse_arg_registers[function_param_index] : int_arg_registers[function_param_index];
    return tac;
}
static Tac * make_param_move_to_register_tac ( Function * function , Type * type , int function_param_index ) { Tac * tac = new_instruction ( IR_MOVE ) ; tac -> dst = new_value ( ) ; tac -> dst -> type = dup_type ( type ) ; tac -> dst -> vreg = ++ function -> vreg_count ; tac -> src1 = new_value ( ) ; tac -> src1 -> type = dup_type ( tac -> dst -> type ) ; tac -> src1 -> live_range_preg = is_sse_floating_point_type ( type ) ? sse_arg_registers [ function_param_index ] : int_arg_registers [ function_param_index ] ; return tac ; }
Add an instruction to move a parameter in a register to another register
Add an instruction to move a parameter in a register to another register