On Mon, Oct 12, 2009 at 5:11 PM, Andrew Dyer <amd...@gmail.com> wrote: > On Mon, Oct 12, 2009 at 10:10 AM, <myub...@fastmail.fm> wrote: >> Thanks for 1) and 2). >> For 3), both results show GP register is modified. >> the result of ${CROSS_COMPILE}objdump --source cpu.o is: >> >> void flush_cache(ulong start_addr, ulong size) >> { >> 7c: 3c1c0000 lui gp,0x0 >> 80: 279c0000 addiu gp,gp,0 >> 84: 0399e021 addu gp,gp,t9 > > It looks like the code expects t9 to have the gp value. I need to get > my setup up to -current and do a build test with eldk to help much > more (we don't do much mips anymore here, so my setup is a bit behind > the times).
whoops - the above is wrong - t9 is supposed to have the starting address of the function in it. The 0 constants in the preceding two instructions are supposed to be setup by the linker to give an offset to the correct value of $gp for this function. http://books.google.com/books?id=kk8G2gK4Tw8C&pg=PA413&lpg=PA413&dq=mips+%24gp+%24t9+register&source=bl&ots=cZ4SkaNyWt&sig=COnSNFcUHtReMS9vVMere9DFzQk&hl=en&ei=G6vTSuXFA42sMOf4xZQD&sa=X&oi=book_result&ct=result&resnum=4&ved=0CBUQ6AEwAw#v=onepage&q=mips%20%24gp%20%24t9%20register&f=false was where I found this. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot