diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-05-02 16:27:10 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-05-02 16:27:10 +0000 |
commit | 3033d3b0511b9a187a987c002883c499a26f9ac8 (patch) | |
tree | 05bf6a75fc38fe04952136da6fe59e0ebd9c8007 /lib/util/wordaccess.h | |
parent | 6b3bf5ec47a8e2a00bc6e744935fc606505e33ec (diff) | |
download | netpbm-mirror-3033d3b0511b9a187a987c002883c499a26f9ac8.tar.gz netpbm-mirror-3033d3b0511b9a187a987c002883c499a26f9ac8.tar.xz netpbm-mirror-3033d3b0511b9a187a987c002883c499a26f9ac8.zip |
Release 10.62.04
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@1893 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/util/wordaccess.h')
-rw-r--r-- | lib/util/wordaccess.h | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/lib/util/wordaccess.h b/lib/util/wordaccess.h index 2eaa2b24..09a896c4 100644 --- a/lib/util/wordaccess.h +++ b/lib/util/wordaccess.h @@ -44,33 +44,32 @@ #include "pm_config.h" -#if (!defined(WORDACCESS_GENERIC) && HAVE_GCC_BITCOUNT ) - - #if BYTE_ORDER == BIG_ENDIAN /* See pm_config.h */ - /* Sun Sparc 64, etc */ - #include "wordaccess_gcc3_be.h" - - #elif (BITS_PER_LONG == 64) - /* AMD Athlon 64, Intel x86_64, Intel Itanium, etc. */ - #include "wordaccess_64_le.h" - - #elif (BITS_PER_LONG == 32) - /* Intel x86_32 (80386, 80486, Pentium), etc. */ - #include "wordaccess_generic.h" - - #else - /* Extremely rare case. - If long is neither 32 nor 64 bits, (say, 128) it comes here. - */ - #define WORDACCESS_GENERIC - #include "wordaccess_generic.h" - - #endif - +#if defined(WORDACCESS_GENERIC) + /* User wants this, regardless of whether machine can do better */ + #include "wordaccess_generic.h" +#elif BYTE_ORDER == BIG_ENDIAN + #if UNALIGNED_OK + #include wordaccess_be_unaligned.h + #else + /* Sparc */ + #include wordaccess_be_aligned.h + #endif +#elif HAVE_GCC_BITCOUNT + #if (BITS_PER_LONG == 64) + /* AMD Athlon 64, Intel x86_64, Intel Itanium, etc. */ + #include "wordaccess_64_le.h" + #elif (BITS_PER_LONG == 32) + /* Intel x86_32 (80386, 80486, Pentium), etc. */ + #include "wordaccess_generic.h" + #else + /* Extremely rare case. + If long is neither 32 nor 64 bits, (say, 128) it comes here. + */ + #include "wordaccess_generic.h" + #endif #else - /* Non GCC, GCC prior to v.3.4 or WORDACCESS_GENERIC defined */ - #include "wordaccess_generic.h" - + /* Non GCC or GCC prior to v.3.4; little-endian */ + #include "wordaccess_generic.h" #endif #endif |