|
@@ -1418,7 +1418,13 @@ begin
|
|
|
list.concat(Taicpu.op_none(A_P_SET_NOREORDER));
|
|
|
list.concat(Taicpu.op_none(A_P_SET_NOMACRO));
|
|
|
|
|
|
- list.concat(Taicpu.Op_reg_reg_const(A_ADDIU,NR_STACK_POINTER_REG,NR_STACK_POINTER_REG,-LocalSize));
|
|
|
+ if (-LocalSize >= simm16lo) and (-LocalSize <= simm16hi) then
|
|
|
+ list.concat(Taicpu.Op_reg_reg_const(A_ADDIU,NR_STACK_POINTER_REG,NR_STACK_POINTER_REG,-LocalSize))
|
|
|
+ else
|
|
|
+ begin
|
|
|
+ list.concat(Taicpu.Op_reg_const(A_LI,NR_R3,-LocalSize));
|
|
|
+ list.concat(Taicpu.Op_reg_reg_reg(A_ADD,NR_STACK_POINTER_REG,NR_STACK_POINTER_REG,NR_R3));
|
|
|
+ end;
|
|
|
|
|
|
if (cs_create_pic in current_settings.moduleswitches) and
|
|
|
(pi_needs_got in current_procinfo.flags) then
|