Question about the "Global Pointer" address in the defs file

Beta Testing discussion on mikroPascal PRO for PIC32.
Post Reply
Author
Message
Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Question about the "Global Pointer" address in the defs file

#1 Post by Dany » 17 May 2015 15:15

Hi, according to some documentation the GP register of the PIC32 (Global Pointer) should be the same as R28.

However, in the defs file of the P32MX534F064H I can find the following:
// Working space registers
var
R0 : dword; absolute 0x0000; rx;
R1 : dword; absolute 0x0004; rx;
R2 : dword; absolute 0x0008; rx;
R3 : dword; absolute 0x000C; rx;
R4 : dword; absolute 0x0010; rx;
R5 : dword; absolute 0x0014; rx;
R6 : dword; absolute 0x0018; rx;
R7 : dword; absolute 0x001C; rx;
R8 : dword; absolute 0x0020; rx;
R9 : dword; absolute 0x0024; rx;
R10 : dword; absolute 0x0028; rx;
R11 : dword; absolute 0x002C; rx;
R12 : dword; absolute 0x0030; rx;
R13 : dword; absolute 0x0034; rx;
R14 : dword; absolute 0x0038; rx;
R15 : dword; absolute 0x003C; rx;
R16 : dword; absolute 0x0040; rx;
R17 : dword; absolute 0x0044; rx;
R18 : dword; absolute 0x0048; rx;
R19 : dword; absolute 0x004C; rx;
R20 : dword; absolute 0x0050; rx;
R21 : dword; absolute 0x0054; rx;
R22 : dword; absolute 0x0058; rx;
R23 : dword; absolute 0x005C; rx;
R24 : dword; absolute 0x0060; rx;
R25 : dword; absolute 0x0064; rx;
R26 : dword; absolute 0x0068; rx;
R27 : dword; absolute 0x006C; rx;
R28 : dword; absolute 0x0070; rx;
R29 : dword; absolute 0x0074; rx;
R30 : dword; absolute 0x0078; rx;
R31 : dword; absolute 0x007C; rx;

GP : dword; absolute 0x0004; rx;
SP : dword; absolute 0x0074; rx;
RA : dword; absolute 0x007C; rx;
which makes the GP the same as R1. Other special registers declarations SP and RA definitions do match the PIC32 documentation.

Why is this? Has this been done on purpose?
Thanks in advance! :D
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Post Reply

Return to “mikroPascal PRO for PIC32 Beta Testing”