summaryrefslogtreecommitdiff
path: root/meta/recipes-support/js/files/jsautocfg.h
blob: 16e38bf8d61c9500dc01c6cb0d2ae1c870a25a12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef js_cpucfg___
#define js_cpucfg___

/* AUTOMATICALLY GENERATED - DO NOT EDIT */

#include "../conf.h"

#ifdef WORDS_BIGENDIAN
# undef  IS_LITTLE_ENDIAN
# define IS_BIG_ENDIAN 1
#else
# define IS_LITTLE_ENDIAN 1
# undef  IS_BIG_ENDIAN
#endif

#define __I_LOG2(n) (    \
        ((n) == 1)?   0: \
        ((n) == 2)?   1: \
        ((n) == 4)?   2: \
        ((n) == 8)?   3: \
        ((n) == 16)?  4: \
        ((n) == 32)?  5: \
        ((n) == 64)?  6: \
        ((n) == 128)? 7: \
            -1)

#define JS_BYTES_PER_BYTE   SIZEOF_CHAR
#define JS_BYTES_PER_SHORT  SIZEOF_SHORT
#define JS_BYTES_PER_INT    SIZEOF_INT
#define JS_BYTES_PER_INT64  SIZEOF_INT64_T
#define JS_BYTES_PER_LONG   SIZEOF_LONG
#define JS_BYTES_PER_FLOAT  SIZEOF_FLOAT
#define JS_BYTES_PER_DOUBLE SIZEOF_DOUBLE
#define JS_BYTES_PER_WORD   SIZEOF_LONG
#define JS_BYTES_PER_DWORD  SIZEOF_LONG_LONG

#define JS_BITS_PER_BYTE    8L
#define JS_BITS_PER_SHORT   (JS_BITS_PER_BYTE * JS_BYTES_PER_SHORT)
#define JS_BITS_PER_INT     (JS_BITS_PER_BYTE * JS_BYTES_PER_INT)
#define JS_BITS_PER_INT64   (JS_BITS_PER_BYTE * JS_BYTES_PER_INT64)
#define JS_BITS_PER_LONG    (JS_BITS_PER_BYTE * JS_BYTES_PER_LONG)
#define JS_BITS_PER_FLOAT   (JS_BITS_PER_BYTE * JS_BYTES_PER_GLOAT)
#define JS_BITS_PER_DOUBLE  (JS_BITS_PER_BYTE * JS_BYTES_PER_DOUBLE)
#define JS_BITS_PER_WORD    (JS_BITS_PER_BYTE * JS_BYTES_PER_WORD)

#define JS_BITS_PER_BYTE_LOG2   __I_LOG2(JS_BITS_PER_BYTE)
#define JS_BITS_PER_SHORT_LOG2  __I_LOG2(JS_BITS_PER_BYTE)
#define JS_BITS_PER_INT_LOG2    __I_LOG2(JS_BITS_PER_BYTE)
#define JS_BITS_PER_INT64_LOG2  __I_LOG2(JS_BITS_PER_BYTE)
#define JS_BITS_PER_LONG_LOG2   __I_LOG2(JS_BITS_PER_BYTE)
#define JS_BITS_PER_FLOAT_LOG2  __I_LOG2(JS_BITS_PER_BYTE)
#define JS_BITS_PER_DOUBLE_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
#define JS_BITS_PER_WORD_LOG2   __I_LOG2(JS_BITS_PER_BYTE)

#define JS_ALIGN_OF_SHORT   ALIGNOF_SHORT
#define JS_ALIGN_OF_INT     ALIGNOF_INT
#define JS_ALIGN_OF_LONG    ALIGNOF_LONG
#define JS_ALIGN_OF_INT64   ALIGNOF_INT64_T
#define JS_ALIGN_OF_FLOAT   ALIGNOF_FLOAT
#define JS_ALIGN_OF_DOUBLE  ALIGNOF_DOUBLE
#define JS_ALIGN_OF_POINTER ALIGNOF_INT_P
#define JS_ALIGN_OF_WORD    ALIGNOF_LONG

#define JS_BYTES_PER_WORD_LOG2   __I_LOG2(JS_BYTES_PER_WORD)
#define JS_BYTES_PER_DWORD_LOG2  __I_LOG2(JS_BYTES_PER_DWORDS)
#define JS_WORDS_PER_DWORD_LOG2  __I_LOG2(JS_BYTES_PER_DWORDS / JS_BYTES_PER_WORD)

#define JS_STACK_GROWTH_DIRECTION (-1)

#ifdef HAVE_LONG_LONG_INT
# define JS_HAVE_LONG_LONG
#endif

#endif /* js_cpucfg___ */