mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 10:50:14 +02:00
Use the correct frame pointer register: A6 on Unixes and A5 on everything else. The only
open question is embedded systems (currently it counts as "everything else"). git-svn-id: trunk@22741 -
This commit is contained in:
parent
43d8da7aa3
commit
786e814d49
@ -254,9 +254,9 @@ unit cpubase;
|
||||
NR_STACK_POINTER_REG = NR_SP;
|
||||
RS_STACK_POINTER_REG = RS_SP;
|
||||
{# Frame pointer register }
|
||||
{ TODO: FIX ME!!! frame pointer is A5 on Amiga, but A6 on unixes?}
|
||||
NR_FRAME_POINTER_REG = NR_A5;
|
||||
RS_FRAME_POINTER_REG = RS_A5;
|
||||
{ Frame pointer register (initialized in tm68kprocinfo.init_framepointer) }
|
||||
RS_FRAME_POINTER_REG: tsuperregister = RS_NO;
|
||||
NR_FRAME_POINTER_REG: tregister = NR_NO;
|
||||
|
||||
{# Register for addressing absolute data in a position independant way,
|
||||
such as in PIC code. The exact meaning is ABI specific. For
|
||||
|
@ -28,14 +28,37 @@ unit cpupi;
|
||||
interface
|
||||
|
||||
uses
|
||||
procinfo,cgbase,psub;
|
||||
psub;
|
||||
|
||||
type
|
||||
tm68kprocinfo = class(tcgprocinfo)
|
||||
procedure init_framepointer;override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
procinfo,
|
||||
cpubase,
|
||||
systems;
|
||||
|
||||
{ tm68kprocinfo }
|
||||
|
||||
procedure tm68kprocinfo.init_framepointer;
|
||||
begin
|
||||
{ ToDo : what about system_m68k_embedded? }
|
||||
if target_info.system in [system_m68k_linux,system_m68k_netbsd,system_m68k_openbsd] then
|
||||
begin
|
||||
RS_FRAME_POINTER_REG:=RS_A6;
|
||||
NR_FRAME_POINTER_REG:=NR_A6;
|
||||
end
|
||||
else
|
||||
begin
|
||||
NR_FRAME_POINTER_REG:=NR_A5;
|
||||
RS_FRAME_POINTER_REG:=RS_A5;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
cprocinfo:=tm68kprocinfo;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user