All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] [ARM] Fix DECLARE_GLOBAL_DATA_PTR and make gd global
@ 2007-09-15  5:44 Dirk Behme
  2007-09-15  7:43 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Dirk Behme @ 2007-09-15  5:44 UTC (permalink / raw)
  To: u-boot


Some users [1] with (some?) ARM toolchains report issues with

#define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("r8")

in include/asm-arm/global_data.h

The issue seems to be [2]

-- cut --
The gcc documentation [3] clearly states that local register variables
are not guaranteed to contain the values you think they do, except in
certain circumstances. In particular: "Stores into local register
variables may be deleted when they appear to be dead according to
dataflow analysis."
-- cut --

This patch makes DECLARE_GLOBAL_DATA_PTR empty, so no local register
variable any more, and makes gd global.

Original patch by Paul Brook <paul@codesourcery.com>

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>

[1]
http://linux.omap.com/pipermail/davinci-linux-open-source/2007-September/004068.html
http://www.codesourcery.com/archives/arm-gnu/msg00736.html

[2]
http://www.codesourcery.com/archives/arm-gnu/msg00741.html
http://linux.omap.com/pipermail/davinci-linux-open-source/2007-September/004072.html

[3]
http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Local-Reg-Vars.html#Local-Reg-Vars

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: arm_global_data_pointer_patch.txt
Url: http://lists.denx.de/pipermail/u-boot/attachments/20070915/f342351a/attachment.txt 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-15 16:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-15  5:44 [U-Boot-Users] [PATCH] [ARM] Fix DECLARE_GLOBAL_DATA_PTR and make gd global Dirk Behme
2007-09-15  7:43 ` Wolfgang Denk
2007-09-15  9:43   ` Dirk Behme
2007-09-15 16:45     ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.