diff options
author | vapier@chromium.org <vapier@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-06 22:23:13 +0000 |
---|---|---|
committer | vapier@chromium.org <vapier@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-06 22:23:13 +0000 |
commit | 5ba38d3413ac598739a38ea7d9184b056a5fb2ee (patch) | |
tree | d770073f1af42eab490b860f4f3e21f463127c6c /base/third_party | |
parent | fa9bd3fdae2d1250eab5325d3ab39179e64def16 (diff) | |
download | chromium_src-5ba38d3413ac598739a38ea7d9184b056a5fb2ee.zip chromium_src-5ba38d3413ac598739a38ea7d9184b056a5fb2ee.tar.gz chromium_src-5ba38d3413ac598739a38ea7d9184b056a5fb2ee.tar.bz2 |
import x32 updates for nspr code
This is taken from the upstream nspr code base to support x32.
BUG=chromium-os:36866
TEST=compiled the code for x86_64 (64bit) & x86_64 (x32)
Review URL: https://chromiumcodereview.appspot.com/12180007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181067 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/third_party')
-rw-r--r-- | base/third_party/nspr/prcpucfg_linux.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/base/third_party/nspr/prcpucfg_linux.h b/base/third_party/nspr/prcpucfg_linux.h index 776c21e..e4336da 100644 --- a/base/third_party/nspr/prcpucfg_linux.h +++ b/base/third_party/nspr/prcpucfg_linux.h @@ -233,6 +233,53 @@ #elif defined(__x86_64__) +#ifdef __ILP32__ + +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 4 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 4 +#define PR_ALIGN_OF_POINTER 4 +#define PR_ALIGN_OF_WORD 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#else + #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #define IS_64 @@ -277,6 +324,8 @@ #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 +#endif + #elif defined(__mc68000__) #undef IS_LITTLE_ENDIAN |