GNU C has platform independent macros for this very problem.
If you #include <stdint.h> then you will have int8_t, int16_t, int32_t,
and int64_t as well as uint8_t, uint16_t, uint32_t, and uint64_t defined
as the proper sized integer. There are also other types and constants
in this file you might want to check out.
If you #include <endian.h> then the __BYTE_ORDER macro will be defined
either __BIG_ENDIAN or __LITTLE_ENDIAN.
On Wed, 2006-09-13 at 16:48 +0000, Yan Seiner wrote:
> Anyone know off-hand where I can find a reference to the length of
> various ints on the arm chip?
>
> I need to allocate 16, 32, and 64 unsigned ints, and I don't know if
> such animals exist on the arm....
>
> Also, I've read that the arm can be both big-endian and little-endian.
> How does one go about determining which variant we have? Or is it
> software-set?
>
> --Yan
--
Mike Magee <>
Remtrol Inc.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|