> I'm not sure which ARM processor you're referring to, but that can't > actually be true. By definition in the C standard, every compiler is > guaranteed to have byte access anywhere it wants (IIRC, a byte is > defined as the minimal unit addressable on the architecture). The fun > part is that a byte (as defined by the C standard) is not guaranteed to > have 8-bits!
Are there really any processors in the last 10-20 years that didn't have bytes that are 8-bits? To be semantically correct, C defines char (not byte). Sizeof char is always 1, and if bytes have 8-bits, then the compiler is guaranteed to load chars as you stated. Then it follows that macros are possible that do 2 char accesses. The macros I posted that do this work - they do 2 separate byte reads and form the final int. This should work everywhere. Bill > > Jared > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:lwip- > [EMAIL PROTECTED] On Behalf Of Alain M. > Sent: Friday, August 29, 2008 09:37 > To: Mailing list for lwIP users > Subject: Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers > > Then we can make macros to be that and optimyzed. There could be a file > of such macros for a few architectures. Let me try an example por ARM > which is intereting because it is 32 bit and does not have byte access: > > > > _______________________________________________ > lwip-users mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
