[Cbe-oss-dev] elfspe & argument passing

Ulrich Weigand Ulrich.Weigand at de.ibm.com
Thu Jul 5 22:00:26 EST 2007


Jeremy Kerr wrote:

> A couple of questions:
> 
>  * do I need to to do anything extra to make crt0 do the setup 
> correctly?

Link with -mstd-main.

>  * why does it need to be done in crt0 (hence causing an extra DMA) 
> anyway? This could done in libspe instead, where we set up the original 
> registers. We'd just need to copy the argv region to the top of local 
> store, and offset the stack pointer appropriately.

For a long time, crt0 would ignore the incoming stack pointer
and always reset $1 to the top of local store.

Also, when we discussed this, it was considered more efficient
to copy the arguments in via DMA.


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

-- 
  Dr. Ulrich Weigand | Phone: +49-7031/16-3727
  GNU compiler/toolchain for Linux on System z and Cell BE
  IBM Deutschland Entwicklung GmbH
  Vorsitzender des Aufsichtsrats: Martin Jetter | Geschäftsführung: 
Herbert Kircher
  Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht 
Stuttgart, HRB 24329
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/cbe-oss-dev/attachments/20070705/f3b6c22e/attachment.htm>


More information about the cbe-oss-dev mailing list