[Cbe-oss-dev] [PATCH] libea ppe side support

Joel Schopp jschopp at austin.ibm.com
Tue Jul 3 05:14:52 EST 2007


> I have a question about the SPE side. Is it planned to share
> __send_to_ppe, which is the common and public PPE assisted-call
> support function in newlib, between newlib and libea ? If so, I
> suppose that we need to change the external interface of __send_to_ppe
> because a handle 64 bit value can't be returned via the current
> interface.

It is planned to share __send_to_ppe().  In fact the current implementation of libea 
actually just builds it into the machine specific part of newlib and ships it as part 
of libc.a.  The -mea32 vs -mea64 issue is taken care of in the ea.h header that does 
conditional substitution.  For example a call to malloc_ea() compiled with -mea64 
becomes __malloc_ea64() and when compiled with -mea32 becomes __malloc_ea32(). 
Newlib libc.a then has __malloc_ea64() and __malloc_ea32() objects to link against.

The current interface to __send_to_ppe returns an array of 4 32 bit values over the 
passed in arguments, the first argument is also returned as an int from the function, 
and the 4th argument is the errno which is copied to the local errno.  So functions 
needing to fetch 64 bit values just need to look at slots 0 & 1 as a single 64 bit value.

It would be possible to do a __send_to_ppe_longlong() as a wrapper macro around 
__send_to_ppe() that would automatically do the typecasting.

-Joel





More information about the cbe-oss-dev mailing list