Little-endian YDL?

Kevin B. Hendricks yellowdog-general@lists.terrasoftsolutions.com
Thu Nov 20 14:46:02 2003


Hi,

So you are thinking of rebuilding all of YDL under a new abi that specifies 
little endian memory layout and storage just to work around the code that 
does endian conversion in one of your applications?

Is that what you are asking?

There are ways to determine if a machine is big or little endian at compile 
time (and run time) and the code to do endian conversion exists in lots and 
lots of places (including the kernel, X11, sound drivers, and many userland 
apps such as the Java Virtual machine and can easily be borrowed.

So simply add a ifdef under linux and have it properly endian convert the code 
would seem to be the rational choice, woudln't it?

BTW: there are many many Linux architectures that are big endian like PPC, 
PPC64, Sparc32, Sparc64, S390, and many others.  So having code that assumes 
linux is little endian is probably not a good thing!

My 2 cents,

Kevin



On Thursday 20 November 2003 16:36, Robert Sanders wrote:
> Hey y'all,
>    First, I hope folks don't mind the cross-post.
>    Has anyone tried, or does anyone have any comments on a
> *little-endian* version
> of YDL?  I believe the PowerPC can operate in both little-endian and
> big-endian modes, and
> I think I've seen reports from gcc of little-endian powerpc builds.
> I'm wondering about this
> because one of the tools we use at work "equates" linux with
> little-endian byte ordering, and
> we have several algorithms that are counting on this ordering.  These
> algorithms have been
> more-or-less hand crafted in fortran and C expecting the x86
> little-endian byte ordering.  I've
> gotten this tool to compile and run nicely under big-endian YDL, but
> haven't had the time
> to try and recode these little-endian required apps for big-endian.
>    I'm not trying to get into a 'big-endian' vice 'little-endian' war,
> just wondering what the YDL
> community thinks of the merits of a YDL little-endian version.  Could
> it work on the various
> PowerPC platforms out there, other porting issues, etc.
>
> 						Thanks....
>
>
> 							Rob
> _______________________________________________
> yellowdog-devel mailing list
> yellowdog-devel@lists.terrasoftsolutions.com
> http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-devel