diff --git a/compiler/m68k/cpubase.pas b/compiler/m68k/cpubase.pas index 8afdc98531..d021eb0b86 100644 --- a/compiler/m68k/cpubase.pas +++ b/compiler/m68k/cpubase.pas @@ -268,7 +268,8 @@ unit cpubase; NR_STACK_POINTER_REG = NR_SP; RS_STACK_POINTER_REG = RS_SP; {# Frame pointer register } -{ Frame pointer register (initialized in tcpuprocinfo.init_framepointer) } + + { Frame pointer register (initialized in tcpuprocinfo.init_framepointer) } RS_FRAME_POINTER_REG: tsuperregister = RS_NO; NR_FRAME_POINTER_REG: tregister = NR_NO; @@ -276,8 +277,9 @@ unit cpubase; such as in PIC code. The exact meaning is ABI specific. For further information look at GCC source : PIC_OFFSET_TABLE_REGNUM } -{ TODO: FIX ME!!! pic offset reg conflicts with frame pointer?} - NR_PIC_OFFSET_REG = NR_A5; + RS_PIC_OFFSET_REG: tsuperregister = RS_NO; + NR_PIC_OFFSET_REG: tregister = NR_NO; + { Return address for DWARF } NR_RETURN_ADDRESS_REG = NR_A0; RS_RETURN_ADDRESS_REG = RS_A0; diff --git a/compiler/m68k/cpupi.pas b/compiler/m68k/cpupi.pas index 5d6773f066..bdd3ab2ecd 100644 --- a/compiler/m68k/cpupi.pas +++ b/compiler/m68k/cpupi.pas @@ -50,11 +50,15 @@ unit cpupi; begin RS_FRAME_POINTER_REG:=RS_A6; NR_FRAME_POINTER_REG:=NR_A6; + RS_PIC_OFFSET_REG:=RS_A5; + NR_PIC_OFFSET_REG:=NR_A5; end else begin NR_FRAME_POINTER_REG:=NR_A5; RS_FRAME_POINTER_REG:=RS_A5; + RS_PIC_OFFSET_REG:=RS_A4; + NR_PIC_OFFSET_REG:=NR_A4; end; end;