All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] [ARM] Fix DECLARE_GLOBAL_DATA_PTR and make gd global
Date: Sat, 15 Sep 2007 07:44:37 +0200	[thread overview]
Message-ID: <46EB7145.1050307@googlemail.com> (raw)


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 

             reply	other threads:[~2007-09-15  5:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-15  5:44 Dirk Behme [this message]
2007-09-15  7:43 ` [U-Boot-Users] [PATCH] [ARM] Fix DECLARE_GLOBAL_DATA_PTR and make gd global Wolfgang Denk
2007-09-15  9:43   ` Dirk Behme
2007-09-15 16:45     ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46EB7145.1050307@googlemail.com \
    --to=dirk.behme@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.