lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Misalignment problems on PowerPC (little endian mode)


From: Simon Goldschmidt
Subject: Re: [lwip-users] Misalignment problems on PowerPC (little endian mode)
Date: Tue, 27 May 2008 12:39:37 +0200

> #define FIELD1(A) (*((short int*)&A[0]))
> #define FIELD2(A) (*((long*)&A[2]))
> x=FIELD1(data); /* using field1 */

I don't know how this should help: say A starts at 0x03, then accessing FIELD2 
would still result in a long-pointer being accessed at 0x03+2 = 0x05. This is 
what will not work on most platforms.

Simon
-- 
Super-Aktion nur in der GMX Spieleflat: 10 Tage für 1 Euro.
Über 180 Spiele downloaden und spiele: http://flat.games.gmx.de




reply via email to

[Prev in Thread] Current Thread [Next in Thread]