mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-03 15:57:10 +01:00
Reserve R25 () register for PIC function calling
git-svn-id: trunk@21857 -
This commit is contained in:
parent
489b93f2f5
commit
ffd01794fb
@ -508,6 +508,7 @@ procedure TCGMIPS.init_register_allocators;
|
||||
begin
|
||||
inherited init_register_allocators;
|
||||
|
||||
{ Keep RS_R25, i.e. $t9 for PIC call }
|
||||
if (cs_create_pic in current_settings.moduleswitches) and assigned(current_procinfo) and
|
||||
(pi_needs_got in current_procinfo.flags) then
|
||||
begin
|
||||
@ -515,14 +516,14 @@ begin
|
||||
rg[R_INTREGISTER] := Trgcpu.Create(R_INTREGISTER, R_SUBD,
|
||||
[RS_R2,RS_R3,RS_R4,RS_R5,RS_R6,RS_R7,RS_R8,RS_R9,
|
||||
RS_R10,RS_R11,RS_R12,RS_R13,RS_R14,RS_R15,RS_R16,RS_R17,RS_R18,RS_R19,
|
||||
RS_R20,RS_R21,RS_R22,RS_R23,RS_R24,RS_R25],
|
||||
RS_R20,RS_R21,RS_R22,RS_R23,RS_R24{,RS_R25}],
|
||||
first_int_imreg, []);
|
||||
end
|
||||
else
|
||||
rg[R_INTREGISTER] := trgcpu.Create(R_INTREGISTER, R_SUBD,
|
||||
[RS_R2,RS_R3,RS_R4,RS_R5,RS_R6,RS_R7,RS_R8,RS_R9,
|
||||
RS_R10,RS_R11,RS_R12,RS_R13,RS_R14,RS_R15,RS_R16,RS_R17,RS_R18,RS_R19,
|
||||
RS_R20,RS_R21,RS_R22,RS_R23,RS_R24,RS_R25],
|
||||
RS_R20,RS_R21,RS_R22,RS_R23,RS_R24{,RS_R25}],
|
||||
first_int_imreg, []);
|
||||
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user