зеркало из https://github.com/mozilla/pjs.git
MSVC on AMD64 LLP64 type model support (226094, r=me on patch from Michael Moy <mmoy@yahoo.com>).
This commit is contained in:
Родитель
e514bbf222
Коммит
24b5f83b35
|
@ -48,7 +48,58 @@
|
|||
#define HAVE_VA_LIST_AS_ARRAY
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(XP_OS2) || defined(WINCE)
|
||||
#if defined(_WIN64)
|
||||
|
||||
#if defined(_AMD64_)
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
||||
#define JS_BYTES_PER_BYTE 1L
|
||||
#define JS_BYTES_PER_SHORT 2L
|
||||
#define JS_BYTES_PER_INT 4L
|
||||
#define JS_BYTES_PER_INT64 8L
|
||||
#define JS_BYTES_PER_LONG 4L
|
||||
#define JS_BYTES_PER_FLOAT 4L
|
||||
#define JS_BYTES_PER_DOUBLE 8L
|
||||
#define JS_BYTES_PER_WORD 8L
|
||||
#define JS_BYTES_PER_DWORD 8L
|
||||
|
||||
#define JS_BITS_PER_BYTE 8L
|
||||
#define JS_BITS_PER_SHORT 16L
|
||||
#define JS_BITS_PER_INT 32L
|
||||
#define JS_BITS_PER_INT64 64L
|
||||
#define JS_BITS_PER_LONG 32L
|
||||
#define JS_BITS_PER_FLOAT 32L
|
||||
#define JS_BITS_PER_DOUBLE 64L
|
||||
#define JS_BITS_PER_WORD 64L
|
||||
|
||||
#define JS_BITS_PER_BYTE_LOG2 3L
|
||||
#define JS_BITS_PER_SHORT_LOG2 4L
|
||||
#define JS_BITS_PER_INT_LOG2 5L
|
||||
#define JS_BITS_PER_INT64_LOG2 6L
|
||||
#define JS_BITS_PER_LONG_LOG2 5L
|
||||
#define JS_BITS_PER_FLOAT_LOG2 5L
|
||||
#define JS_BITS_PER_DOUBLE_LOG2 6L
|
||||
#define JS_BITS_PER_WORD_LOG2 6L
|
||||
|
||||
#define JS_ALIGN_OF_SHORT 2L
|
||||
#define JS_ALIGN_OF_INT 4L
|
||||
#define JS_ALIGN_OF_LONG 4L
|
||||
#define JS_ALIGN_OF_INT64 8L
|
||||
#define JS_ALIGN_OF_FLOAT 4L
|
||||
#define JS_ALIGN_OF_DOUBLE 8L
|
||||
#define JS_ALIGN_OF_POINTER 8L
|
||||
#define JS_ALIGN_OF_WORD 8L
|
||||
|
||||
#define JS_BYTES_PER_WORD_LOG2 3L
|
||||
#define JS_BYTES_PER_DWORD_LOG2 3L
|
||||
#define PR_WORDS_PER_DWORD_LOG2 0L
|
||||
#else /* !defined(_AMD64_) */
|
||||
#error "CPU type is unknown"
|
||||
#endif /* !defined(_AMD64_) */
|
||||
|
||||
#elif defined(_WIN32) || defined(XP_OS2) || defined(WINCE)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
||||
|
@ -94,7 +145,8 @@
|
|||
#define PR_WORDS_PER_DWORD_LOG2 1L
|
||||
#endif /* _WIN32 || XP_OS2 || WINCE*/
|
||||
|
||||
#if defined(_WINDOWS) && !defined(_WIN32) /* WIN16 */
|
||||
#elif defined(_WINDOWS) && !defined(_WIN32) /* WIN16 */
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
||||
|
@ -138,6 +190,7 @@
|
|||
#define JS_BYTES_PER_WORD_LOG2 2L
|
||||
#define JS_BYTES_PER_DWORD_LOG2 3L
|
||||
#define PR_WORDS_PER_DWORD_LOG2 1L
|
||||
|
||||
#endif /* defined(_WINDOWS) && !defined(_WIN32) */
|
||||
|
||||
#elif defined(XP_UNIX) || defined(XP_BEOS)
|
||||
|
|
|
@ -362,7 +362,11 @@ typedef ptrdiff_t JSPtrdiff;
|
|||
** A type for pointer difference. Variables of this type are suitable
|
||||
** for storing a pointer or pointer sutraction.
|
||||
************************************************************************/
|
||||
#if JS_BYTES_PER_WORD == 8 && JS_BYTES_PER_LONG != 8
|
||||
typedef JSUint64 JSUptrdiff;
|
||||
#else
|
||||
typedef unsigned long JSUptrdiff;
|
||||
#endif
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: JSBool
|
||||
|
@ -387,8 +391,13 @@ typedef JSUint8 JSPackedBool;
|
|||
/*
|
||||
** A JSWord is an integer that is the same size as a void*
|
||||
*/
|
||||
#if JS_BYTES_PER_WORD == 8 && JS_BYTES_PER_LONG != 8
|
||||
typedef JSInt64 JSWord;
|
||||
typedef JSUint64 JSUword;
|
||||
#else
|
||||
typedef long JSWord;
|
||||
typedef unsigned long JSUword;
|
||||
#endif
|
||||
|
||||
#include "jsotypes.h"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче