From: Wolfgang Denk Date: Mon, 13 Jul 2009 17:35:59 +0200 Subject: [U-Boot] lib_arm global data pointer In-Reply-To: <5ec3d7930907130700h24ab20c3t258e2c31e21bb71f@mail.gmail.com> References: <5ec3d7930907100552i171e7cb8v590d02bba77deb2@mail.gmail.com> <20090713133846.GA3335@debian> <5ec3d7930907130700h24ab20c3t258e2c31e21bb71f@mail.gmail.com> Message-ID: <20090713153559.5EDDB832E416@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 <5ec3d7930907130700h24ab20c3t258e2c31e21bb71f@mail.gmail.com> you wrote: > > there is a reason why I use r10 (and why somebody used r8, I suppose) - I Well, that's easy - as the code has to interface with GCC generated code, you have to stick with GCC's register usage conventions. > And one thing I also noted that is strange a variable of "register > volatile". I played around with arm gcc compiler - does this volatile stuff > really have some effect? Compiler seems to produce asm code like it is not > volatile (optimize by deleting conditions, assign values by add and not mov, > etc...) "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. 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 One of the advantages of being a captain is being able to ask for ad- vice without necessarily having to take it. -- Kirk, "Dagger of the Mind", stardate 2715.2