mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-09 20:42:21 +01:00
* patch by Jeppe Johansen: fixes TCGMIPS.getfpuregister
git-svn-id: trunk@21419 -
This commit is contained in:
parent
181bc24945
commit
1b3dd8eefe
@ -544,7 +544,7 @@ end;
|
||||
function TCGMIPS.getfpuregister(list: tasmlist; size: Tcgsize): Tregister;
|
||||
begin
|
||||
if size = OS_F64 then
|
||||
Result := rg[R_FPUREGISTER].getregister(list, R_SUBFS)
|
||||
Result := rg[R_FPUREGISTER].getregister(list, R_SUBFD)
|
||||
else
|
||||
Result := rg[R_FPUREGISTER].getregister(list, R_SUBFS);
|
||||
end;
|
||||
@ -1484,9 +1484,19 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
list.concat(taicpu.op_reg(A_J, NR_R31));
|
||||
{ correct stack pointer in the delay slot }
|
||||
list.concat(Taicpu.Op_reg_reg_const(A_ADDIU, NR_STACK_POINTER_REG, NR_STACK_POINTER_REG, stacksize));
|
||||
if (-stacksize >= simm16lo) and (-stacksize <= simm16hi) then
|
||||
begin
|
||||
list.concat(taicpu.op_reg(A_J, NR_R31));
|
||||
{ correct stack pointer in the delay slot }
|
||||
list.concat(Taicpu.Op_reg_reg_const(A_ADDIU, NR_STACK_POINTER_REG, NR_STACK_POINTER_REG, stacksize));
|
||||
end
|
||||
else
|
||||
begin
|
||||
a_load_const_reg(list,OS_32,stacksize,NR_R1);
|
||||
list.concat(taicpu.op_reg(A_J, NR_R31));
|
||||
{ correct stack pointer in the delay slot }
|
||||
list.concat(taicpu.op_reg_reg_reg(A_ADD,NR_STACK_POINTER_REG,NR_STACK_POINTER_REG,NR_R1));
|
||||
end;
|
||||
list.concat(Taicpu.op_none(A_P_SET_MACRO));
|
||||
list.concat(Taicpu.op_none(A_P_SET_REORDER));
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user