mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 09:28:19 +02:00
* Moved fixup_jmps to target-specific classes for powerpc,powerpc64 and MIPS, cleaned out remaining $ifdef's. A slight functionality change is that fixup_jmps is now called before adding the procedure end symbol, not after, but that should not matter.
git-svn-id: trunk@27450 -
This commit is contained in:
parent
eeb15fc445
commit
96dd464bf2
@ -126,7 +126,6 @@
|
||||
{$define cpumm}
|
||||
{$define cpurox}
|
||||
{$define cpurefshaveindexreg}
|
||||
{$define fpc_compiler_has_fixup_jmps}
|
||||
{$endif powerpc}
|
||||
|
||||
{$ifdef powerpc64}
|
||||
@ -137,7 +136,6 @@
|
||||
{$define cpumm}
|
||||
{$define cpurox}
|
||||
{$define cpurefshaveindexreg}
|
||||
{$define fpc_compiler_has_fixup_jmps}
|
||||
{$define cpuno32bitops}
|
||||
{$endif powerpc64}
|
||||
|
||||
@ -222,7 +220,6 @@
|
||||
{$define cpurequiresproperalignment}
|
||||
{ define cpumm}
|
||||
{$define cpurefshaveindexreg}
|
||||
{$define fpc_compiler_has_fixup_jmps}
|
||||
{$define SUPPORT_GET_FRAME}
|
||||
{$define SUPPORT_SAFECALL}
|
||||
{$endif mips}
|
||||
|
@ -49,6 +49,7 @@ interface
|
||||
function calc_stackframe_size:longint;override;
|
||||
procedure set_first_temp_offset;override;
|
||||
procedure allocate_got_register(list:tasmlist);override;
|
||||
procedure postprocess_code;override;
|
||||
end;
|
||||
|
||||
{ Used by Stabs debug info generator }
|
||||
@ -60,7 +61,7 @@ implementation
|
||||
uses
|
||||
systems,globals,verbose,
|
||||
cpubase,cgbase,cgobj,
|
||||
tgobj,paramgr,symconst,symcpu;
|
||||
tgobj,paramgr,symconst,symcpu,aasmcpu;
|
||||
|
||||
constructor TMIPSProcInfo.create(aparent: tprocinfo);
|
||||
begin
|
||||
@ -149,6 +150,13 @@ implementation
|
||||
Comment(V_Error,'TMIPSProcInfo.calc_stackframe_size result changed');
|
||||
end;
|
||||
|
||||
|
||||
procedure TMIPSProcInfo.postprocess_code;
|
||||
begin
|
||||
fixup_jmps(aktproccode);
|
||||
end;
|
||||
|
||||
|
||||
function mips_extra_offset(procdef : tprocdef) : longint;
|
||||
begin
|
||||
if procdef=nil then
|
||||
|
@ -51,7 +51,7 @@ unit cpupi;
|
||||
|
||||
property get_first_save_int_reg: tsuperregister read first_save_int_reg;
|
||||
property get_first_save_fpu_reg: tsuperregister read first_save_fpu_reg;
|
||||
|
||||
procedure postprocess_code;override;
|
||||
end;
|
||||
|
||||
|
||||
@ -63,7 +63,8 @@ unit cpupi;
|
||||
aasmtai,
|
||||
tgobj,cgobj,
|
||||
symconst,symsym,paramgr,symutil,symtable,
|
||||
verbose;
|
||||
verbose,
|
||||
aasmcpu;
|
||||
|
||||
constructor tppcprocinfo.create(aparent:tprocinfo);
|
||||
|
||||
@ -201,6 +202,12 @@ unit cpupi;
|
||||
end;
|
||||
|
||||
|
||||
procedure tppcprocinfo.postprocess_code;
|
||||
begin
|
||||
fixup_jmps(aktproccode);
|
||||
end;
|
||||
|
||||
|
||||
begin
|
||||
cprocinfo:=tppcprocinfo;
|
||||
end.
|
||||
|
@ -46,6 +46,7 @@ type
|
||||
function calc_stackframe_size(numgpr, numfpr : longint): longint;
|
||||
|
||||
procedure allocate_got_register(list: TAsmList); override;
|
||||
procedure postprocess_code;override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -56,7 +57,8 @@ uses
|
||||
aasmtai,
|
||||
tgobj,cgobj,
|
||||
symconst, symsym, paramgr, symutil, symtable,
|
||||
verbose;
|
||||
verbose,
|
||||
aasmcpu;
|
||||
|
||||
constructor tppcprocinfo.create(aparent: tprocinfo);
|
||||
|
||||
@ -124,6 +126,13 @@ procedure tppcprocinfo.allocate_got_register(list: TAsmList);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure tppcprocinfo.postprocess_code;
|
||||
begin
|
||||
fixup_jmps(aktproccode);
|
||||
end;
|
||||
|
||||
|
||||
begin
|
||||
cprocinfo := tppcprocinfo;
|
||||
end.
|
||||
|
@ -119,9 +119,6 @@ implementation
|
||||
optloop,
|
||||
optconstprop,
|
||||
optdeadstore
|
||||
{$if defined(arm) or defined(avr) or defined(fpc_compiler_has_fixup_jmps)}
|
||||
,aasmcpu
|
||||
{$endif arm}
|
||||
{$if defined(arm)}
|
||||
,cpuinfo
|
||||
{$endif arm}
|
||||
@ -1613,9 +1610,7 @@ implementation
|
||||
current_filepos:=exitpos;
|
||||
hlcg.gen_proc_symbol_end(templist);
|
||||
aktproccode.concatlist(templist);
|
||||
{$ifdef fpc_compiler_has_fixup_jmps}
|
||||
fixup_jmps(aktproccode);
|
||||
{$endif}
|
||||
|
||||
{ insert line debuginfo }
|
||||
if (cs_debuginfo in current_settings.moduleswitches) or
|
||||
(cs_use_lineinfo in current_settings.globalswitches) then
|
||||
|
Loading…
Reference in New Issue
Block a user