[Cbe-oss-dev] elfspe & argument passing

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


Jeremy,

> > For a long time, crt0 would ignore the incoming stack pointer
> > and always reset $1 to the top of local store.
> 
> So this problem is fixed now? Is it reasonable to assume that a user is 
> using a fixed crt0?

Actually, it is not.  The reason why crt0 did this is that libspe for a
long time did not *set* $1 to any reasonable value.  This was fixed
only very recently, SDK 2.1 is still broken.

In fact, even the current crt0 still does not rely on $1 on startup,
for that reason.

> This also means that we can simplify crt0 a little (doesn't need to do 
> the DMA for argv), and maybe even remove the need for -mstd-main ?

I guess if the SDK 3.0 libspe always sets $1 correctly, we could
switch crt0 to rely on it with SDK 4.0 ...


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 243294
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/cbe-oss-dev/attachments/20070705/d27084b2/attachment.htm>


More information about the cbe-oss-dev mailing list