[U-Boot-Users] Global Data Pointer

Hi
I don't understand the way the global data pointer (gd) is implemented in u-boot.
Why is declared as a local register variable (in functions that access it), rather than a global register variable?
I know this more a gcc question, rather than u-boot, but perhaps someone in the group has time to enlighten me, or point me to some documentation.
Regards
Peter

On Fri, 14 Jan 2005, Peter Pearse wrote:
I don't understand the way the global data pointer (gd) is implemented in u-boot.
Why is declared as a local register variable (in functions that access it), rather than a global register variable?
I know this more a gcc question, rather than u-boot, but perhaps someone in the group has time to enlighten me, or point me to some documentation.
Well, the register which is used for gd is reserved globally using gcc's -ffixed-r* option. So I'd say this is actually a global register variable, which the local declarations just hook on to.
Regards, Marius
participants (2)
-
Marius Groeger
-
Peter Pearse