Re: [U-Boot] lib_arm global data pointer

2009-07-14 Thread Drasko DRASKOVIC
Dear Wolfgang Denk. >On Mon, Jul 13, 2009 at 9:34 PM, Wolfgang Denk wrote: > 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".

Re: [U-Boot] lib_arm global data pointer

2009-07-13 Thread Wolfgang Denk
Dear Drasko DRASKOVIC, In message <5ec3d7930907130900l7e043b11lcf37a0d3e161f...@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 (

Re: [U-Boot] lib_arm global data pointer

2009-07-13 Thread Drasko DRASKOVIC
> > 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

Re: [U-Boot] lib_arm global data pointer

2009-07-13 Thread Wolfgang Denk
Dear Drasko DRASKOVIC, In message <5ec3d7930907130700h24ab20c3t258e2c31e21bb...@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 regis

Re: [U-Boot] lib_arm global data pointer

2009-07-13 Thread Drasko DRASKOVIC
> > While the above may work, why you don't just follow the procedure call > standard instead? Place the value in r0 instead of r10, and you'll have > it as the first argument to the function. > there is a reason why I use r10 (and why somebody used r8, I suppose) - I search some address during s

Re: [U-Boot] lib_arm global data pointer

2009-07-13 Thread Rabin Vincent
On Fri, Jul 10, 2009 at 02:52:32PM +0200, Drasko DRASKOVIC wrote: [...] > Suppose that I allocated one register in start.S and put in it some data I > want to have later on C side. From start.S we enter to start_armboot(void) > function. > Would this work : > > void start_armboot (void) > { >

[U-Boot] lib_arm global data pointer

2009-07-10 Thread Drasko DRASKOVIC
Hi all, in libarm/board.c, in function start_armboot(void) I found lines like these: /* Pointer is writable since we allocated a register for it */ gd = (gd_t*)(_armboot_start - CFG_MALLOC_LEN - sizeof(gd_t)); /* compiler optimization barrier needed for GCC >= 3.4 */ __asm__ __vola