713
|
1 |
# HG changeset patch
|
|
2 |
# Parent 1507f021ac93c1d27cfd00e389fba1c9421b3201
|
|
3 |
# User Ulrich Weigand <uweigand@de.ibm.com>
|
|
4 |
Bug 976648 - powerpc64le-linux support
|
|
5 |
|
|
6 |
diff --git a/configure.in b/configure.in
|
|
7 |
--- a/configure.in
|
|
8 |
+++ b/configure.in
|
|
9 |
@@ -1082,17 +1082,17 @@ esac
|
|
10 |
|
|
11 |
# Only set CPU_ARCH if we recognize the value of OS_TEST
|
|
12 |
|
|
13 |
case "$OS_TEST" in
|
|
14 |
*86 | i86pc)
|
|
15 |
CPU_ARCH=x86
|
|
16 |
;;
|
|
17 |
|
|
18 |
-powerpc64 | ppc64)
|
|
19 |
+powerpc64 | ppc64 | powerpc64le | ppc64le)
|
|
20 |
CPU_ARCH=ppc64
|
|
21 |
;;
|
|
22 |
|
|
23 |
powerpc | ppc | rs6000)
|
|
24 |
CPU_ARCH=ppc
|
|
25 |
;;
|
|
26 |
|
|
27 |
Alpha | alpha | ALPHA)
|
|
28 |
diff --git a/js/src/configure.in b/js/src/configure.in
|
|
29 |
--- a/js/src/configure.in
|
|
30 |
+++ b/js/src/configure.in
|
|
31 |
@@ -923,17 +923,17 @@ esac
|
|
32 |
|
|
33 |
# Only set CPU_ARCH if we recognize the value of OS_TEST
|
|
34 |
|
|
35 |
case "$OS_TEST" in
|
|
36 |
*86 | i86pc)
|
|
37 |
CPU_ARCH=x86
|
|
38 |
;;
|
|
39 |
|
|
40 |
-powerpc64 | ppc64)
|
|
41 |
+powerpc64 | ppc64 | powerpc64le | ppc64le)
|
|
42 |
CPU_ARCH=ppc64
|
|
43 |
;;
|
|
44 |
|
|
45 |
powerpc | ppc | rs6000)
|
|
46 |
CPU_ARCH=ppc
|
|
47 |
;;
|
|
48 |
|
|
49 |
Alpha | alpha | ALPHA)
|
|
50 |
diff --git a/js/src/assembler/wtf/Platform.h b/js/src/assembler/wtf/Platform.h
|
|
51 |
--- a/js/src/assembler/wtf/Platform.h
|
|
52 |
+++ b/js/src/assembler/wtf/Platform.h
|
|
53 |
@@ -160,26 +160,32 @@
|
|
54 |
/* WTF_CPU_PPC - PowerPC 32-bit */
|
|
55 |
#if defined(__ppc__) \
|
|
56 |
|| defined(__PPC__) \
|
|
57 |
|| defined(__powerpc__) \
|
|
58 |
|| defined(__powerpc) \
|
|
59 |
|| defined(__POWERPC__) \
|
|
60 |
|| defined(_M_PPC) \
|
|
61 |
|| defined(__PPC)
|
|
62 |
+#if !defined(__ppc64__) && !defined(__PPC64__)
|
|
63 |
#define WTF_CPU_PPC 1
|
|
64 |
+#endif
|
|
65 |
+#if !defined(__LITTLE_ENDIAN__)
|
|
66 |
#define WTF_CPU_BIG_ENDIAN 1
|
|
67 |
#endif
|
|
68 |
+#endif
|
|
69 |
|
|
70 |
/* WTF_CPU_PPC64 - PowerPC 64-bit */
|
|
71 |
#if defined(__ppc64__) \
|
|
72 |
|| defined(__PPC64__)
|
|
73 |
#define WTF_CPU_PPC64 1
|
|
74 |
+#if !defined(__LITTLE_ENDIAN__)
|
|
75 |
#define WTF_CPU_BIG_ENDIAN 1
|
|
76 |
#endif
|
|
77 |
+#endif
|
|
78 |
|
|
79 |
/* WTF_CPU_SH4 - SuperH SH-4 */
|
|
80 |
#if defined(__SH4__)
|
|
81 |
#define WTF_CPU_SH4 1
|
|
82 |
#endif
|
|
83 |
|
|
84 |
/* WTF_CPU_SPARC32 - SPARC 32-bit */
|
|
85 |
#if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
|
|
86 |
diff --git a/js/src/jscpucfg.h b/js/src/jscpucfg.h
|
|
87 |
--- a/js/src/jscpucfg.h
|
|
88 |
+++ b/js/src/jscpucfg.h
|
|
89 |
@@ -26,17 +26,17 @@
|
|
90 |
# define HAVE_VA_LIST_AS_ARRAY 1
|
|
91 |
# endif
|
|
92 |
|
|
93 |
# define IS_LITTLE_ENDIAN 1
|
|
94 |
# undef IS_BIG_ENDIAN
|
|
95 |
# define JS_BYTES_PER_WORD 4
|
|
96 |
# define JS_BITS_PER_WORD_LOG2 5
|
|
97 |
|
|
98 |
-#elif defined(__APPLE__)
|
|
99 |
+#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__)
|
|
100 |
# if __LITTLE_ENDIAN__
|
|
101 |
# define IS_LITTLE_ENDIAN 1
|
|
102 |
# undef IS_BIG_ENDIAN
|
|
103 |
# elif __BIG_ENDIAN__
|
|
104 |
# undef IS_LITTLE_ENDIAN
|
|
105 |
# define IS_BIG_ENDIAN 1
|
|
106 |
# endif
|
|
107 |
|
|
108 |
@@ -88,18 +88,17 @@
|
|
109 |
# if defined(_STACK_GROWS_UPWARD)
|
|
110 |
# define JS_STACK_GROWTH_DIRECTION (1)
|
|
111 |
# elif defined(_STACK_GROWS_DOWNWARD)
|
|
112 |
# define JS_STACK_GROWTH_DIRECTION (-1)
|
|
113 |
# endif
|
|
114 |
# endif
|
|
115 |
|
|
116 |
#elif defined(__sparc) || defined(__sparc__) || \
|
|
117 |
- defined(_POWER) || defined(__powerpc__) || \
|
|
118 |
- defined(__ppc__) || defined(__hppa) || \
|
|
119 |
+ defined(_POWER) || defined(__hppa) || \
|
|
120 |
defined(_MIPSEB) || defined(_BIG_ENDIAN)
|
|
121 |
/* IA64 running HP-UX will have _BIG_ENDIAN defined.
|
|
122 |
* IA64 running Linux will have endian.h and be handled above.
|
|
123 |
*/
|
|
124 |
# undef IS_LITTLE_ENDIAN
|
|
125 |
# define IS_BIG_ENDIAN 1
|
|
126 |
|
|
127 |
#else /* !defined(__sparc) && !defined(__sparc__) && ... */
|
|
128 |
diff --git a/nsprpub/pr/include/md/_linux.cfg b/nsprpub/pr/include/md/_linux.cfg
|
|
129 |
--- a/nsprpub/pr/include/md/_linux.cfg
|
|
130 |
+++ b/nsprpub/pr/include/md/_linux.cfg
|
|
131 |
@@ -24,18 +24,23 @@
|
|
132 |
#elif defined(__GNU__)
|
|
133 |
#define PR_AF_INET6 26 /* same as AF_INET6 */
|
|
134 |
#else
|
|
135 |
#define PR_AF_INET6 10 /* same as AF_INET6 */
|
|
136 |
#endif
|
|
137 |
|
|
138 |
#ifdef __powerpc64__
|
|
139 |
|
|
140 |
+#ifdef __LITTLE_ENDIAN__
|
|
141 |
+#define IS_LITTLE_ENDIAN 1
|
|
142 |
+#undef IS_BIG_ENDIAN
|
|
143 |
+#else
|
|
144 |
#undef IS_LITTLE_ENDIAN
|
|
145 |
#define IS_BIG_ENDIAN 1
|
|
146 |
+#endif
|
|
147 |
#define IS_64
|
|
148 |
|
|
149 |
#define PR_BYTES_PER_BYTE 1
|
|
150 |
#define PR_BYTES_PER_SHORT 2
|
|
151 |
#define PR_BYTES_PER_INT 4
|
|
152 |
#define PR_BYTES_PER_INT64 8
|
|
153 |
#define PR_BYTES_PER_LONG 8
|
|
154 |
#define PR_BYTES_PER_FLOAT 4
|
|
155 |
@@ -70,18 +75,23 @@
|
|
156 |
#define PR_ALIGN_OF_POINTER 8
|
|
157 |
#define PR_ALIGN_OF_WORD 8
|
|
158 |
|
|
159 |
#define PR_BYTES_PER_WORD_LOG2 3
|
|
160 |
#define PR_BYTES_PER_DWORD_LOG2 3
|
|
161 |
|
|
162 |
#elif defined(__powerpc__)
|
|
163 |
|
|
164 |
+#ifdef __LITTLE_ENDIAN__
|
|
165 |
+#define IS_LITTLE_ENDIAN 1
|
|
166 |
+#undef IS_BIG_ENDIAN
|
|
167 |
+#else
|
|
168 |
#undef IS_LITTLE_ENDIAN
|
|
169 |
#define IS_BIG_ENDIAN 1
|
|
170 |
+#endif
|
|
171 |
|
|
172 |
#define PR_BYTES_PER_BYTE 1
|
|
173 |
#define PR_BYTES_PER_SHORT 2
|
|
174 |
#define PR_BYTES_PER_INT 4
|
|
175 |
#define PR_BYTES_PER_INT64 8
|
|
176 |
#define PR_BYTES_PER_LONG 4
|
|
177 |
#define PR_BYTES_PER_FLOAT 4
|
|
178 |
#define PR_BYTES_PER_DOUBLE 8
|