js/src/jscpucfg.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
michael@0 2 * vim: set ts=8 sts=4 et sw=4 tw=99:
michael@0 3 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #ifndef jscpucfg_h
michael@0 8 #define jscpucfg_h
michael@0 9
michael@0 10 #define JS_HAVE_LONG_LONG
michael@0 11
michael@0 12 #if defined(_WIN64)
michael@0 13
michael@0 14 # if defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
michael@0 15 # define IS_LITTLE_ENDIAN 1
michael@0 16 # undef IS_BIG_ENDIAN
michael@0 17 # else /* !(defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)) */
michael@0 18 # error "CPU type is unknown"
michael@0 19 # endif /* !(defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)) */
michael@0 20
michael@0 21 #elif defined(_WIN32)
michael@0 22
michael@0 23 # ifdef __WATCOMC__
michael@0 24 # define HAVE_VA_LIST_AS_ARRAY 1
michael@0 25 # endif
michael@0 26
michael@0 27 # define IS_LITTLE_ENDIAN 1
michael@0 28 # undef IS_BIG_ENDIAN
michael@0 29
michael@0 30 #elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__)
michael@0 31 # if __LITTLE_ENDIAN__
michael@0 32 # define IS_LITTLE_ENDIAN 1
michael@0 33 # undef IS_BIG_ENDIAN
michael@0 34 # elif __BIG_ENDIAN__
michael@0 35 # undef IS_LITTLE_ENDIAN
michael@0 36 # define IS_BIG_ENDIAN 1
michael@0 37 # endif
michael@0 38
michael@0 39 #elif defined(JS_HAVE_ENDIAN_H)
michael@0 40 # include <endian.h>
michael@0 41
michael@0 42 # if defined(__BYTE_ORDER)
michael@0 43 # if __BYTE_ORDER == __LITTLE_ENDIAN
michael@0 44 # define IS_LITTLE_ENDIAN 1
michael@0 45 # undef IS_BIG_ENDIAN
michael@0 46 # elif __BYTE_ORDER == __BIG_ENDIAN
michael@0 47 # undef IS_LITTLE_ENDIAN
michael@0 48 # define IS_BIG_ENDIAN 1
michael@0 49 # endif
michael@0 50 # else /* !defined(__BYTE_ORDER) */
michael@0 51 # error "endian.h does not define __BYTE_ORDER. Cannot determine endianness."
michael@0 52 # endif
michael@0 53
michael@0 54 /* BSDs */
michael@0 55 #elif defined(JS_HAVE_MACHINE_ENDIAN_H)
michael@0 56 # include <sys/types.h>
michael@0 57 # include <machine/endian.h>
michael@0 58
michael@0 59 # if defined(_BYTE_ORDER)
michael@0 60 # if _BYTE_ORDER == _LITTLE_ENDIAN
michael@0 61 # define IS_LITTLE_ENDIAN 1
michael@0 62 # undef IS_BIG_ENDIAN
michael@0 63 # elif _BYTE_ORDER == _BIG_ENDIAN
michael@0 64 # undef IS_LITTLE_ENDIAN
michael@0 65 # define IS_BIG_ENDIAN 1
michael@0 66 # endif
michael@0 67 # else /* !defined(_BYTE_ORDER) */
michael@0 68 # error "machine/endian.h does not define _BYTE_ORDER. Cannot determine endianness."
michael@0 69 # endif
michael@0 70
michael@0 71 #elif defined(JS_HAVE_SYS_ISA_DEFS_H)
michael@0 72 # include <sys/isa_defs.h>
michael@0 73
michael@0 74 # if defined(_BIG_ENDIAN)
michael@0 75 # undef IS_LITTLE_ENDIAN
michael@0 76 # define IS_BIG_ENDIAN 1
michael@0 77 # elif defined(_LITTLE_ENDIAN)
michael@0 78 # define IS_LITTLE_ENDIAN 1
michael@0 79 # undef IS_BIG_ENDIAN
michael@0 80 # else /* !defined(_LITTLE_ENDIAN) */
michael@0 81 # error "sys/isa_defs.h does not define _BIG_ENDIAN or _LITTLE_ENDIAN. Cannot determine endianness."
michael@0 82 # endif
michael@0 83 # if !defined(JS_STACK_GROWTH_DIRECTION)
michael@0 84 # if defined(_STACK_GROWS_UPWARD)
michael@0 85 # define JS_STACK_GROWTH_DIRECTION (1)
michael@0 86 # elif defined(_STACK_GROWS_DOWNWARD)
michael@0 87 # define JS_STACK_GROWTH_DIRECTION (-1)
michael@0 88 # endif
michael@0 89 # endif
michael@0 90
michael@0 91 #elif defined(__sparc) || defined(__sparc__) || \
michael@0 92 defined(_POWER) || defined(__hppa) || \
michael@0 93 defined(_MIPSEB) || defined(_BIG_ENDIAN)
michael@0 94 /* IA64 running HP-UX will have _BIG_ENDIAN defined.
michael@0 95 * IA64 running Linux will have endian.h and be handled above.
michael@0 96 */
michael@0 97 # undef IS_LITTLE_ENDIAN
michael@0 98 # define IS_BIG_ENDIAN 1
michael@0 99
michael@0 100 #else /* !defined(__sparc) && !defined(__sparc__) && ... */
michael@0 101 # error "Cannot determine endianness of your platform. Please add support to jscpucfg.h."
michael@0 102 #endif
michael@0 103
michael@0 104 #ifndef JS_STACK_GROWTH_DIRECTION
michael@0 105 # ifdef __hppa
michael@0 106 # define JS_STACK_GROWTH_DIRECTION (1)
michael@0 107 # else
michael@0 108 # define JS_STACK_GROWTH_DIRECTION (-1)
michael@0 109 # endif
michael@0 110 #endif
michael@0 111
michael@0 112 #endif /* jscpucfg_h */

mercurial