Dear Joakim Tjernlund, In message <of52c94a3d.c3bd2e6f-onc1257afd.005bafe0-c1257afd.00673...@transmode.se> you wrote: > > This adds some extra churn to the code that my patch didn't do. > On the other hand your patch makes the function look more > like how gcc would have done so I am fine with that. > However, I am not sure r14 is a good fit, I cannot remember if there is > some > special purpose for r14. Hopefully somebody on the list knows.
This is documented in the README: | For PowerPC, the following registers have specific use: | R1: stack pointer | R2: reserved for system use | R3-R4: parameter passing and return values | R5-R10: parameter passing | R13: small data area pointer | R30: GOT pointer | R31: frame pointer | | (U-Boot also uses R12 as internal GOT pointer. r12 | is a volatile register so r12 needs to be reset when | going back and forth between asm and C) | | ==> U-Boot will use R2 to hold a pointer to the global data | 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: [email protected] The idea of male and female are universal constants. -- Kirk, "Metamorphosis", stardate 3219.8 _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

