mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 01:29:29 +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;
|
||||
reg : Tsuperregister;
|
||||
helplist : TAsmList;
|
||||
largeoffs : boolean;
|
||||
begin
|
||||
a_reg_alloc(list,NR_STACK_POINTER_REG);
|
||||
|
||||
@ -1306,9 +1307,12 @@ begin
|
||||
if (cs_create_pic in current_settings.moduleswitches) and
|
||||
(pi_needs_got in current_procinfo.flags) then
|
||||
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_none(A_P_SET_NOMACRO));
|
||||
if largeoffs then
|
||||
list.concat(Taicpu.op_none(A_P_SET_NOMACRO));
|
||||
end;
|
||||
|
||||
href.base:=NR_STACK_POINTER_REG;
|
||||
|
Loading…
Reference in New Issue
Block a user