From: Wolfgang Denk Date: Mon, 13 Jul 2009 21:34:41 +0200 Subject: [U-Boot] lib_arm global data pointer In-Reply-To: <5ec3d7930907130900l7e043b11lcf37a0d3e161f511@mail.gmail.com> References: <5ec3d7930907100552i171e7cb8v590d02bba77deb2@mail.gmail.com> <20090713133846.GA3335@debian> <5ec3d7930907130700h24ab20c3t258e2c31e21bb71f@mail.gmail.com> <20090713153559.5EDDB832E416@gemini.denx.de> <5ec3d7930907130900l7e043b11lcf37a0d3e161f511@mail.gmail.com> Message-ID: <20090713193441.EB467832E416@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Drasko DRASKOVIC, In message <5ec3d7930907130900l7e043b11lcf37a0d3e161f511@mail.gmail.com> you wrote: > > > Well, that's easy - as the code has to interface with GCC generated > > code, you have to stick with GCC's register usage conventions. > > > I think we were refering here to ATPCS (ARM-THUMB Procedure Call Standard, > i.e. ARM ABI), which tells that first 4 args of the calee are passed by the > caller via r0-r3, and if calee takes more args, the rest is passed via > stack. IMHO, GCC conventions has not much to do with this. I used r10 > because there is small probability that it will be clobbered in start.S. When I wrote "GCC's register usage conventions" I usually mean exactly that and not some completely different thing. You also might want to read the README. Search for "On ARM, the following registers are used"... > "register volatile" makes sense only for the special case of global > > or local register variables. Whether or not it is implemented in a > > specific version of GCC for a specific architecture is another story; > > please ask this on the GCC mailing list. > > > OK. But since it was implemented in U-Boot and for ARM, I thought that > anybody who wrote this will be so kind to shread some light on this (I am > guessing that that it has something to do with ISR, but in ISR we seem to This has nothing to do with ISRs at all. What makes you think so? > preserve r8), and also on the membar two lines below, and spare me from > subscribing to a huge volume gcc mailing lists for posting just one > question. This rests for me one of the most obscure corners of U-Boot. The GCC mailing list is where GCC experts can answer your questions. I'm not a GCC expert - just a happy user since version 1.35 or so... > --00151748e7286f26c8046e986b49 > Content-Type: text/html; charset=ISO-8859-1 > Content-Transfer-Encoding: quoted-printable And please don't post HTML. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You are only young once, but you can stay immature indefinitely.