mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 00:59:08 +02:00
* MIPS: ".set macro"/".set nomacro" directives around ".cprestore" are necessary only when offset is outside smallint range. Otherwise they just clutter the assembler file.
git-svn-id: trunk@25767 -
This commit is contained in:
parent
d80b242347
commit
e10e383b8e
@ -1196,6 +1196,7 @@ var
|
|||||||
href: treference;
|
href: treference;
|
||||||
reg : Tsuperregister;
|
reg : Tsuperregister;
|
||||||
helplist : TAsmList;
|
helplist : TAsmList;
|
||||||
|
largeoffs : boolean;
|
||||||
begin
|
begin
|
||||||
a_reg_alloc(list,NR_STACK_POINTER_REG);
|
a_reg_alloc(list,NR_STACK_POINTER_REG);
|
||||||
|
|
||||||
@ -1306,9 +1307,12 @@ begin
|
|||||||
if (cs_create_pic in current_settings.moduleswitches) and
|
if (cs_create_pic in current_settings.moduleswitches) and
|
||||||
(pi_needs_got in current_procinfo.flags) then
|
(pi_needs_got in current_procinfo.flags) then
|
||||||
begin
|
begin
|
||||||
list.concat(Taicpu.op_none(A_P_SET_MACRO));
|
largeoffs:=(TMIPSProcinfo(current_procinfo).save_gp_ref.offset>simm16hi);
|
||||||
|
if largeoffs then
|
||||||
|
list.concat(Taicpu.op_none(A_P_SET_MACRO));
|
||||||
list.concat(Taicpu.op_const(A_P_CPRESTORE,TMIPSProcinfo(current_procinfo).save_gp_ref.offset));
|
list.concat(Taicpu.op_const(A_P_CPRESTORE,TMIPSProcinfo(current_procinfo).save_gp_ref.offset));
|
||||||
list.concat(Taicpu.op_none(A_P_SET_NOMACRO));
|
if largeoffs then
|
||||||
|
list.concat(Taicpu.op_none(A_P_SET_NOMACRO));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
href.base:=NR_STACK_POINTER_REG;
|
href.base:=NR_STACK_POINTER_REG;
|
||||||
|
Loading…
Reference in New Issue
Block a user