This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: DP83816
On Thu, Mar 25, 2004 at 09:44:36AM +0530, Giri wrote:
> Hi Nick,
> Thank you very much for your valueble inputs.
>
> in the same file(moab_eth_dp83816.inl) i am finding some functions
> which are lookiing like Power PC specific. can u clarify me whether
> those are Power PC specific or can be used for i386-PC also.
>
> // Map a 32 bit host quantity to little endian
> unsigned long
> _h2le(unsigned long val)
> {
...
> }
>
> // Map a 32 bit little endian quantity to host representation
> unsigned long
> _le2h(unsigned long val)
> {
> }
These are just doing endian conversion. le = little endian. h =
host. Its using assembly since the PPC has a single instruction to do
this rather than write some C which would take a number of
instructions when compiled.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss