
On Mon, Oct 12, 2009 at 5:11 PM, Andrew Dyer amdyer@gmail.com wrote:
On Mon, Oct 12, 2009 at 10:10 AM, myuboot@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&...
was where I found this.