Mercurial > mxe-octave
annotate src/native-gcc-2-intrinsics.patch @ 4043:b54e00ea56bc
of-fl-core: readd fl-core patch in dos mode
* src/of-fl-core-1-fixes.patch: readd patch
author | John Donoghue |
---|---|
date | Fri, 02 Oct 2015 10:24:38 -0400 |
parents | eba1c6e9cbb8 |
children |
rev | line source |
---|---|
3590 | 1 # This file is part of MXE. |
2 # See index.html for further information. | |
3 | |
4 This patch has been taken from: | |
5 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56038 | |
6 | |
7 diff --git a/gcc/config/i386/adxintrin.h b/gcc/config/i386/adxintrin.h | |
8 index 6118900..a83410d 100644 | |
9 --- a/gcc/config/i386/adxintrin.h | |
10 +++ b/gcc/config/i386/adxintrin.h | |
11 @@ -28,6 +28,10 @@ | |
12 #ifndef _ADXINTRIN_H_INCLUDED | |
13 #define _ADXINTRIN_H_INCLUDED | |
14 | |
15 +#ifdef __cplusplus | |
16 +extern "C" { | |
17 +#endif | |
18 + | |
19 extern __inline unsigned char | |
20 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
21 _addcarryx_u32 (unsigned char __CF, unsigned int __X, | |
22 @@ -46,4 +50,8 @@ _addcarryx_u64 (unsigned char __CF, unsigned long __X, | |
23 } | |
24 #endif | |
25 | |
26 +#ifdef __cplusplus | |
27 +} | |
28 +#endif | |
29 + | |
30 #endif /* _ADXINTRIN_H_INCLUDED */ | |
31 diff --git a/gcc/config/i386/ammintrin.h b/gcc/config/i386/ammintrin.h | |
32 index a89b204..a370eb0 100644 | |
33 --- a/gcc/config/i386/ammintrin.h | |
34 +++ b/gcc/config/i386/ammintrin.h | |
35 @@ -36,6 +36,10 @@ | |
36 #define __DISABLE_SSE4A__ | |
37 #endif /* __SSE4A__ */ | |
38 | |
39 +#ifdef __cplusplus | |
40 +extern "C" { | |
41 +#endif | |
42 + | |
43 extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
44 _mm_stream_sd (double * __P, __m128d __Y) | |
45 { | |
46 @@ -85,6 +89,10 @@ _mm_inserti_si64(__m128i __X, __m128i __Y, unsigned const int __I, unsigned cons | |
47 (unsigned int)(I), (unsigned int)(L))) | |
48 #endif | |
49 | |
50 +#ifdef __cplusplus | |
51 +} | |
52 +#endif | |
53 + | |
54 #ifdef __DISABLE_SSE4A__ | |
55 #undef __DISABLE_SSE4A__ | |
56 #pragma GCC pop_options | |
57 diff --git a/gcc/config/i386/avx2intrin.h b/gcc/config/i386/avx2intrin.h | |
3735
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
58 index d04c972..2c0d6e7 100644 |
3590 | 59 --- a/gcc/config/i386/avx2intrin.h |
60 +++ b/gcc/config/i386/avx2intrin.h | |
61 @@ -34,6 +34,10 @@ | |
62 #define __DISABLE_AVX2__ | |
63 #endif /* __AVX2__ */ | |
64 | |
65 +#ifdef __cplusplus | |
66 +extern "C" { | |
67 +#endif | |
68 + | |
69 /* Sum absolute 8-bit integer difference of adjacent groups of 4 | |
70 byte integers in the first 2 operands. Starting offsets within | |
71 operands are determined by the 3rd mask operand. */ | |
3735
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
72 @@ -1886,4 +1890,8 @@ _mm256_mask_i64gather_epi32 (__m128i src, int const *base, |
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
73 #pragma GCC pop_options |
3590 | 74 #endif /* __DISABLE_AVX2__ */ |
75 | |
76 +#ifdef __cplusplus | |
77 +} | |
78 +#endif | |
79 + | |
3735
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
80 #endif /* _AVX2INTRIN_H_INCLUDED */ |
3590 | 81 diff --git a/gcc/config/i386/avxintrin.h b/gcc/config/i386/avxintrin.h |
3735
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
82 index 2ea327c..f61d850 100644 |
3590 | 83 --- a/gcc/config/i386/avxintrin.h |
84 +++ b/gcc/config/i386/avxintrin.h | |
85 @@ -37,6 +37,10 @@ | |
86 #define __DISABLE_AVX__ | |
87 #endif /* __AVX__ */ | |
88 | |
89 +#ifdef __cplusplus | |
90 +extern "C" { | |
91 +#endif | |
92 + | |
93 /* Internal data types for implementing the intrinsics. */ | |
94 typedef double __v4df __attribute__ ((__vector_size__ (32))); | |
95 typedef float __v8sf __attribute__ ((__vector_size__ (32))); | |
3735
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
96 @@ -1460,4 +1464,8 @@ _mm256_castsi128_si256 (__m128i __A) |
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
97 #pragma GCC pop_options |
3590 | 98 #endif /* __DISABLE_AVX__ */ |
99 | |
100 +#ifdef __cplusplus | |
101 +} | |
102 +#endif | |
103 + | |
3735
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
104 #endif /* _AVXINTRIN_H_INCLUDED */ |
3590 | 105 diff --git a/gcc/config/i386/bmi2intrin.h b/gcc/config/i386/bmi2intrin.h |
106 index ff96296..b01e1e1 100644 | |
107 --- a/gcc/config/i386/bmi2intrin.h | |
108 +++ b/gcc/config/i386/bmi2intrin.h | |
109 @@ -34,6 +34,10 @@ | |
110 #define __DISABLE_BMI2__ | |
111 #endif /* __BMI2__ */ | |
112 | |
113 +#ifdef __cplusplus | |
114 +extern "C" { | |
115 +#endif | |
116 + | |
117 extern __inline unsigned int | |
118 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
119 _bzhi_u32 (unsigned int __X, unsigned int __Y) | |
120 @@ -106,4 +110,8 @@ _mulx_u32 (unsigned int __X, unsigned int __Y, unsigned int *__P) | |
121 #pragma GCC pop_options | |
122 #endif /* __DISABLE_BMI2__ */ | |
123 | |
124 +#ifdef __cplusplus | |
125 +} | |
126 +#endif | |
127 + | |
128 #endif /* _BMI2INTRIN_H_INCLUDED */ | |
129 diff --git a/gcc/config/i386/bmiintrin.h b/gcc/config/i386/bmiintrin.h | |
130 index b2d7c60..c8ad38a 100644 | |
131 --- a/gcc/config/i386/bmiintrin.h | |
132 +++ b/gcc/config/i386/bmiintrin.h | |
133 @@ -34,6 +34,10 @@ | |
134 #define __DISABLE_BMI__ | |
135 #endif /* __BMI__ */ | |
136 | |
137 +#ifdef __cplusplus | |
138 +extern "C" { | |
139 +#endif | |
140 + | |
141 extern __inline unsigned short __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
142 __tzcnt_u16 (unsigned short __X) | |
143 { | |
144 @@ -181,4 +185,8 @@ _tzcnt_u64 (unsigned long long __X) | |
145 #pragma GCC pop_options | |
146 #endif /* __DISABLE_BMI__ */ | |
147 | |
148 +#ifdef __cplusplus | |
149 +} | |
150 +#endif | |
151 + | |
152 #endif /* _BMIINTRIN_H_INCLUDED */ | |
153 diff --git a/gcc/config/i386/cpuid.h b/gcc/config/i386/cpuid.h | |
154 index 8c323ae..52047e3 100644 | |
155 --- a/gcc/config/i386/cpuid.h | |
156 +++ b/gcc/config/i386/cpuid.h | |
157 @@ -21,6 +21,10 @@ | |
158 * <http://www.gnu.org/licenses/>. | |
159 */ | |
160 | |
161 +#ifdef __cplusplus | |
162 +extern "C" { | |
163 +#endif | |
164 + | |
165 /* %ecx */ | |
166 #define bit_SSE3 (1 << 0) | |
167 #define bit_PCLMUL (1 << 1) | |
168 @@ -275,3 +279,8 @@ __get_cpuid (unsigned int __level, | |
169 __cpuid (__level, *__eax, *__ebx, *__ecx, *__edx); | |
170 return 1; | |
171 } | |
172 + | |
173 +#ifdef __cplusplus | |
174 +} | |
175 +#endif | |
176 + | |
177 diff --git a/gcc/config/i386/emmintrin.h b/gcc/config/i386/emmintrin.h | |
178 index a2bdf0e..2c4af53 100644 | |
179 --- a/gcc/config/i386/emmintrin.h | |
180 +++ b/gcc/config/i386/emmintrin.h | |
181 @@ -36,6 +36,10 @@ | |
182 #define __DISABLE_SSE2__ | |
183 #endif /* __SSE2__ */ | |
184 | |
185 +#ifdef __cplusplus | |
186 +extern "C" { | |
187 +#endif | |
188 + | |
189 /* SSE2 */ | |
190 typedef double __v2df __attribute__ ((__vector_size__ (16))); | |
191 typedef long long __v2di __attribute__ ((__vector_size__ (16))); | |
192 @@ -1515,6 +1519,10 @@ _mm_castps_pd(__m128 __A) | |
193 return (__m128d) __A; | |
194 } | |
195 | |
196 +#ifdef __cplusplus | |
197 +} | |
198 +#endif | |
199 + | |
200 extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
201 _mm_castps_si128(__m128 __A) | |
202 { | |
203 diff --git a/gcc/config/i386/f16cintrin.h b/gcc/config/i386/f16cintrin.h | |
204 index 1181f8b..5cc37dd 100644 | |
205 --- a/gcc/config/i386/f16cintrin.h | |
206 +++ b/gcc/config/i386/f16cintrin.h | |
207 @@ -34,6 +34,10 @@ | |
208 #define __DISABLE_F16C__ | |
209 #endif /* __F16C__ */ | |
210 | |
211 +#ifdef __cplusplus | |
212 +extern "C" { | |
213 +#endif | |
214 + | |
215 extern __inline float __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
216 _cvtsh_ss (unsigned short __S) | |
217 { | |
218 @@ -95,4 +99,8 @@ _mm256_cvtps_ph (__m256 __A, const int __I) | |
219 #pragma GCC pop_options | |
220 #endif /* __DISABLE_F16C__ */ | |
221 | |
222 +#ifdef __cplusplus | |
223 +} | |
224 +#endif | |
225 + | |
226 #endif /* _F16CINTRIN_H_INCLUDED */ | |
227 diff --git a/gcc/config/i386/fma4intrin.h b/gcc/config/i386/fma4intrin.h | |
228 index e1bdef7..0ee2bf8 100644 | |
229 --- a/gcc/config/i386/fma4intrin.h | |
230 +++ b/gcc/config/i386/fma4intrin.h | |
231 @@ -37,6 +37,10 @@ | |
232 #define __DISABLE_FMA4__ | |
233 #endif /* __FMA4__ */ | |
234 | |
235 +#ifdef __cplusplus | |
236 +extern "C" { | |
237 +#endif | |
238 + | |
239 /* 128b Floating point multiply/add type instructions. */ | |
240 extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
241 _mm_macc_ps (__m128 __A, __m128 __B, __m128 __C) | |
242 @@ -233,6 +237,10 @@ _mm256_msubadd_pd (__m256d __A, __m256d __B, __m256d __C) | |
243 return (__m256d) __builtin_ia32_vfmaddsubpd256 ((__v4df)__A, (__v4df)__B, -(__v4df)__C); | |
244 } | |
245 | |
246 +#ifdef __cplusplus | |
247 +} | |
248 +#endif | |
249 + | |
250 #ifdef __DISABLE_FMA4__ | |
251 #undef __DISABLE_FMA4__ | |
252 #pragma GCC pop_options | |
253 diff --git a/gcc/config/i386/fmaintrin.h b/gcc/config/i386/fmaintrin.h | |
254 index bfbb75d..806ff8e 100644 | |
255 --- a/gcc/config/i386/fmaintrin.h | |
256 +++ b/gcc/config/i386/fmaintrin.h | |
257 @@ -34,6 +34,10 @@ | |
258 #define __DISABLE_FMA__ | |
259 #endif /* __FMA__ */ | |
260 | |
261 +#ifdef __cplusplus | |
262 +extern "C" { | |
263 +#endif | |
264 + | |
265 extern __inline __m128d | |
266 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
267 _mm_fmadd_pd (__m128d __A, __m128d __B, __m128d __C) | |
268 @@ -294,6 +298,10 @@ _mm256_fmsubadd_ps (__m256 __A, __m256 __B, __m256 __C) | |
269 -(__v8sf)__C); | |
270 } | |
271 | |
272 +#ifdef __cplusplus | |
273 +} | |
274 +#endif | |
275 + | |
276 #ifdef __DISABLE_FMA__ | |
277 #undef __DISABLE_FMA__ | |
278 #pragma GCC pop_options | |
279 diff --git a/gcc/config/i386/fxsrintrin.h b/gcc/config/i386/fxsrintrin.h | |
280 index 98e73ee..34cc3cb 100644 | |
281 --- a/gcc/config/i386/fxsrintrin.h | |
282 +++ b/gcc/config/i386/fxsrintrin.h | |
283 @@ -34,6 +34,10 @@ | |
284 #define __DISABLE_FXSR__ | |
285 #endif /* __FXSR__ */ | |
286 | |
287 +#ifdef __cplusplus | |
288 +extern "C" { | |
289 +#endif | |
290 + | |
291 extern __inline void | |
292 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
293 _fxsave (void *__P) | |
294 @@ -70,4 +74,8 @@ _fxrstor64 (void *__P) | |
295 #endif /* __DISABLE_FXSR__ */ | |
296 | |
297 | |
298 +#ifdef __cplusplus | |
299 +} | |
300 +#endif | |
301 + | |
302 #endif /* _FXSRINTRIN_H_INCLUDED */ | |
303 diff --git a/gcc/config/i386/gmm_malloc.h b/gcc/config/i386/gmm_malloc.h | |
304 index 516b13b..c55db44 100644 | |
305 --- a/gcc/config/i386/gmm_malloc.h | |
306 +++ b/gcc/config/i386/gmm_malloc.h | |
307 @@ -27,6 +27,10 @@ | |
308 #include <stdlib.h> | |
309 #include <errno.h> | |
310 | |
311 +#ifdef __cplusplus | |
312 +extern "C" { | |
313 +#endif | |
314 + | |
315 static __inline__ void* | |
316 _mm_malloc (size_t size, size_t align) | |
317 { | |
318 @@ -71,4 +75,8 @@ _mm_free (void * aligned_ptr) | |
319 free (((void **) aligned_ptr) [-1]); | |
320 } | |
321 | |
322 +#ifdef __cplusplus | |
323 +} | |
324 +#endif | |
325 + | |
326 #endif /* _MM_MALLOC_H_INCLUDED */ | |
327 diff --git a/gcc/config/i386/ia32intrin.h b/gcc/config/i386/ia32intrin.h | |
3735
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
328 index 614b0fa..d8e474e 100644 |
3590 | 329 --- a/gcc/config/i386/ia32intrin.h |
330 +++ b/gcc/config/i386/ia32intrin.h | |
331 @@ -25,6 +25,10 @@ | |
332 # error "Never use <ia32intrin.h> directly; include <x86intrin.h> instead." | |
333 #endif | |
334 | |
335 +#ifdef __cplusplus | |
336 +extern "C" { | |
337 +#endif | |
338 + | |
339 /* 32bit bsf */ | |
340 extern __inline int | |
341 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
3735
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
342 @@ -297,3 +301,7 @@ __writeeflags (unsigned int X) |
3590 | 343 #define _rotwr(a,b) __rorw((a), (b)) |
344 #define _rotl(a,b) __rold((a), (b)) | |
345 #define _rotr(a,b) __rord((a), (b)) | |
346 + | |
347 +#ifdef __cplusplus | |
348 +} | |
349 +#endif | |
350 diff --git a/gcc/config/i386/immintrin.h b/gcc/config/i386/immintrin.h | |
351 index 73b4859..49a03e4 100644 | |
352 --- a/gcc/config/i386/immintrin.h | |
353 +++ b/gcc/config/i386/immintrin.h | |
354 @@ -78,6 +78,10 @@ _rdrand16_step (unsigned short *__P) | |
355 return __builtin_ia32_rdrand16_step (__P); | |
356 } | |
357 | |
358 +#ifdef __cplusplus | |
359 +extern "C" { | |
360 +#endif | |
361 + | |
362 extern __inline int | |
363 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
364 _rdrand32_step (unsigned int *__P) | |
365 @@ -174,4 +178,8 @@ _rdrand64_step (unsigned long long *__P) | |
366 | |
367 #endif /* __x86_64__ */ | |
368 | |
369 +#ifdef __cplusplus | |
370 +} | |
371 +#endif | |
372 + | |
373 #endif /* _IMMINTRIN_H_INCLUDED */ | |
374 diff --git a/gcc/config/i386/lwpintrin.h b/gcc/config/i386/lwpintrin.h | |
375 index 1cd046a..26d65f1 100644 | |
376 --- a/gcc/config/i386/lwpintrin.h | |
377 +++ b/gcc/config/i386/lwpintrin.h | |
378 @@ -34,6 +34,10 @@ | |
379 #define __DISABLE_LWP__ | |
380 #endif /* __LWP__ */ | |
381 | |
382 +#ifdef __cplusplus | |
383 +extern "C" { | |
384 +#endif | |
385 + | |
386 extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
387 __llwpcb (void *pcbAddress) | |
388 { | |
389 @@ -71,6 +75,9 @@ __lwpval64 (unsigned long long data2, unsigned int data1, unsigned int flags) | |
390 #endif | |
391 #endif | |
392 | |
393 +#ifdef __cplusplus | |
394 +} | |
395 +#endif | |
396 | |
397 #ifdef __OPTIMIZE__ | |
398 extern __inline unsigned char __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
399 diff --git a/gcc/config/i386/lzcntintrin.h b/gcc/config/i386/lzcntintrin.h | |
400 index b680a35..d292f24 100644 | |
401 --- a/gcc/config/i386/lzcntintrin.h | |
402 +++ b/gcc/config/i386/lzcntintrin.h | |
403 @@ -35,6 +35,10 @@ | |
404 #define __DISABLE_LZCNT__ | |
405 #endif /* __LZCNT__ */ | |
406 | |
407 +#ifdef __cplusplus | |
408 +extern "C" { | |
409 +#endif | |
410 + | |
411 extern __inline unsigned short __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
412 __lzcnt16 (unsigned short __X) | |
413 { | |
414 @@ -72,4 +76,8 @@ _lzcnt_u64 (unsigned long long __X) | |
415 #pragma GCC pop_options | |
416 #endif /* __DISABLE_LZCNT__ */ | |
417 | |
418 +#ifdef __cplusplus | |
419 +} | |
420 +#endif | |
421 + | |
422 #endif /* _LZCNTINTRIN_H_INCLUDED */ | |
423 diff --git a/gcc/config/i386/mm3dnow.h b/gcc/config/i386/mm3dnow.h | |
424 index bf847f9..464e98f 100644 | |
425 --- a/gcc/config/i386/mm3dnow.h | |
426 +++ b/gcc/config/i386/mm3dnow.h | |
427 @@ -36,6 +36,10 @@ | |
428 #define __DISABLE_3dNOW__ | |
429 #endif /* __3dNOW__ */ | |
430 | |
431 +#ifdef __cplusplus | |
432 +extern "C" { | |
433 +#endif | |
434 + | |
435 extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
436 _m_femms (void) | |
437 { | |
438 @@ -210,6 +214,10 @@ _m_pswapd (__m64 __A) | |
439 | |
440 #endif /* __3dNOW_A__ */ | |
441 | |
442 +#ifdef __cplusplus | |
443 +} | |
444 +#endif | |
445 + | |
446 #ifdef __DISABLE_3dNOW__ | |
447 #undef __DISABLE_3dNOW__ | |
448 #pragma GCC pop_options | |
449 diff --git a/gcc/config/i386/mmintrin.h b/gcc/config/i386/mmintrin.h | |
450 index b351200..eaee690 100644 | |
451 --- a/gcc/config/i386/mmintrin.h | |
452 +++ b/gcc/config/i386/mmintrin.h | |
453 @@ -33,6 +33,10 @@ | |
454 #define __DISABLE_MMX__ | |
455 #endif /* __MMX__ */ | |
456 | |
457 +#ifdef __cplusplus | |
458 +extern "C" { | |
459 +#endif | |
460 + | |
461 /* The Intel API is flexible enough that we must allow aliasing with other | |
462 vector types, and their scalar components. */ | |
463 typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__)); | |
464 @@ -939,4 +943,8 @@ _mm_set1_pi8 (char __b) | |
465 #pragma GCC pop_options | |
466 #endif /* __DISABLE_MMX__ */ | |
467 | |
468 +#ifdef __cplusplus | |
469 +} | |
470 +#endif | |
471 + | |
472 #endif /* _MMINTRIN_H_INCLUDED */ | |
473 diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h | |
474 index 3be2f35..f8c99c7 100644 | |
475 --- a/gcc/config/i386/pmm_malloc.h | |
476 +++ b/gcc/config/i386/pmm_malloc.h | |
477 @@ -34,6 +34,10 @@ extern int posix_memalign (void **, size_t, size_t); | |
478 extern "C" int posix_memalign (void **, size_t, size_t) throw (); | |
479 #endif | |
480 | |
481 +#ifdef __cplusplus | |
482 +extern "C" { | |
483 +#endif | |
484 + | |
485 static __inline void * | |
486 _mm_malloc (size_t size, size_t alignment) | |
487 { | |
488 @@ -54,4 +58,8 @@ _mm_free (void * ptr) | |
489 free (ptr); | |
490 } | |
491 | |
492 +#ifdef __cplusplus | |
493 +} | |
494 +#endif | |
495 + | |
496 #endif /* _MM_MALLOC_H_INCLUDED */ | |
497 diff --git a/gcc/config/i386/pmmintrin.h b/gcc/config/i386/pmmintrin.h | |
498 index 6a79500..2c98a85 100644 | |
499 --- a/gcc/config/i386/pmmintrin.h | |
500 +++ b/gcc/config/i386/pmmintrin.h | |
501 @@ -36,6 +36,10 @@ | |
502 #define __DISABLE_SSE3__ | |
503 #endif /* __SSE3__ */ | |
504 | |
505 +#ifdef __cplusplus | |
506 +extern "C" { | |
507 +#endif | |
508 + | |
509 /* Additional bits in the MXCSR. */ | |
510 #define _MM_DENORMALS_ZERO_MASK 0x0040 | |
511 #define _MM_DENORMALS_ZERO_ON 0x0040 | |
512 @@ -124,6 +128,10 @@ _mm_mwait (unsigned int __E, unsigned int __H) | |
513 __builtin_ia32_mwait (__E, __H); | |
514 } | |
515 | |
516 +#ifdef __cplusplus | |
517 +} | |
518 +#endif | |
519 + | |
520 #ifdef __DISABLE_SSE3__ | |
521 #undef __DISABLE_SSE3__ | |
522 #pragma GCC pop_options | |
523 diff --git a/gcc/config/i386/popcntintrin.h b/gcc/config/i386/popcntintrin.h | |
524 index 41845d8..285e96a 100644 | |
525 --- a/gcc/config/i386/popcntintrin.h | |
526 +++ b/gcc/config/i386/popcntintrin.h | |
527 @@ -30,6 +30,10 @@ | |
528 #define __DISABLE_POPCNT__ | |
529 #endif /* __POPCNT__ */ | |
530 | |
531 +#ifdef __cplusplus | |
532 +extern "C" { | |
533 +#endif | |
534 + | |
535 /* Calculate a number of bits set to 1. */ | |
536 extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
537 _mm_popcnt_u32 (unsigned int __X) | |
538 @@ -50,4 +54,8 @@ _mm_popcnt_u64 (unsigned long long __X) | |
539 #pragma GCC pop_options | |
540 #endif /* __DISABLE_POPCNT__ */ | |
541 | |
542 +#ifdef __cplusplus | |
543 +} | |
544 +#endif | |
545 + | |
546 #endif /* _POPCNTINTRIN_H_INCLUDED */ | |
547 diff --git a/gcc/config/i386/prfchwintrin.h b/gcc/config/i386/prfchwintrin.h | |
548 index b2f5772..f779a28 100644 | |
549 --- a/gcc/config/i386/prfchwintrin.h | |
550 +++ b/gcc/config/i386/prfchwintrin.h | |
551 @@ -28,10 +28,18 @@ | |
552 #ifndef _PRFCHWINTRIN_H_INCLUDED | |
553 #define _PRFCHWINTRIN_H_INCLUDED | |
554 | |
555 +#ifdef __cplusplus | |
556 +extern "C" { | |
557 +#endif | |
558 + | |
559 extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
560 _m_prefetchw (void *__P) | |
561 { | |
562 __builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */); | |
563 } | |
564 | |
565 +#ifdef __cplusplus | |
566 +} | |
567 +#endif | |
568 + | |
569 #endif /* _PRFCHWINTRIN_H_INCLUDED */ | |
570 diff --git a/gcc/config/i386/rdseedintrin.h b/gcc/config/i386/rdseedintrin.h | |
571 index 0ab18e5..98eb318 100644 | |
572 --- a/gcc/config/i386/rdseedintrin.h | |
573 +++ b/gcc/config/i386/rdseedintrin.h | |
574 @@ -35,6 +35,10 @@ | |
575 #endif /* __RDSEED__ */ | |
576 | |
577 | |
578 +#ifdef __cplusplus | |
579 +extern "C" { | |
580 +#endif | |
581 + | |
582 extern __inline int | |
583 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
584 _rdseed16_step (unsigned short *p) | |
585 @@ -63,4 +67,8 @@ _rdseed64_step (unsigned long long *p) | |
586 #pragma GCC pop_options | |
587 #endif /* __DISABLE_RDSEED__ */ | |
588 | |
589 +#ifdef __cplusplus | |
590 +} | |
591 +#endif | |
592 + | |
593 #endif /* _RDSEEDINTRIN_H_INCLUDED */ | |
594 diff --git a/gcc/config/i386/rtmintrin.h b/gcc/config/i386/rtmintrin.h | |
595 index ac40d22..3aa8246 100644 | |
596 --- a/gcc/config/i386/rtmintrin.h | |
597 +++ b/gcc/config/i386/rtmintrin.h | |
598 @@ -34,6 +34,10 @@ | |
599 #define __DISABLE_RTM__ | |
600 #endif /* __RTM__ */ | |
601 | |
602 +#ifdef __cplusplus | |
603 +extern "C" { | |
604 +#endif | |
605 + | |
606 #define _XBEGIN_STARTED (~0u) | |
607 #define _XABORT_EXPLICIT (1 << 0) | |
608 #define _XABORT_RETRY (1 << 1) | |
609 @@ -81,4 +85,8 @@ _xabort (const unsigned int imm) | |
610 #pragma GCC pop_options | |
611 #endif /* __DISABLE_RTM__ */ | |
612 | |
613 +#ifdef __cplusplus | |
614 +} | |
615 +#endif | |
616 + | |
617 #endif /* _RTMINTRIN_H_INCLUDED */ | |
618 diff --git a/gcc/config/i386/smmintrin.h b/gcc/config/i386/smmintrin.h | |
3735
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
619 index 886ace4..0922b45 100644 |
3590 | 620 --- a/gcc/config/i386/smmintrin.h |
621 +++ b/gcc/config/i386/smmintrin.h | |
622 @@ -37,6 +37,10 @@ | |
623 #define __DISABLE_SSE4_1__ | |
624 #endif /* __SSE4_1__ */ | |
625 | |
626 +#ifdef __cplusplus | |
627 +extern "C" { | |
628 +#endif | |
629 + | |
630 /* Rounding mode macros. */ | |
631 #define _MM_FROUND_TO_NEAREST_INT 0x00 | |
632 #define _MM_FROUND_TO_NEG_INF 0x01 | |
3735
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
633 @@ -822,6 +826,10 @@ _mm_cmpgt_epi64 (__m128i __X, __m128i __Y) |
3590 | 634 #define __DISABLE_SSE4_2__ |
3735
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
635 #endif /* __SSE4_1__ */ |
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
636 |
3590 | 637 +#ifdef __cplusplus |
638 +} | |
639 +#endif | |
640 + | |
641 /* Accumulate CRC32 (polynomial 0x11EDC6F41) value. */ | |
3735
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
642 extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) |
eba1c6e9cbb8
build-gcc, native-gcc: update to version 4.9.2 (from mxe (devel))
John Donoghue
parents:
3590
diff
changeset
|
643 _mm_crc32_u8 (unsigned int __C, unsigned char __V) |
3590 | 644 diff --git a/gcc/config/i386/tbmintrin.h b/gcc/config/i386/tbmintrin.h |
645 index 871f532..744b9ca 100644 | |
646 --- a/gcc/config/i386/tbmintrin.h | |
647 +++ b/gcc/config/i386/tbmintrin.h | |
648 @@ -34,6 +34,10 @@ | |
649 #define __DISABLE_TBM__ | |
650 #endif /* __TBM__ */ | |
651 | |
652 +#ifdef __cplusplus | |
653 +extern "C" { | |
654 +#endif | |
655 + | |
656 #ifdef __OPTIMIZE__ | |
657 extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
658 __bextri_u32 (unsigned int __X, const unsigned int __I) | |
659 @@ -177,4 +181,8 @@ __tzmsk_u64 (unsigned long long __X) | |
660 #pragma GCC pop_options | |
661 #endif /* __DISABLE_TBM__ */ | |
662 | |
663 +#ifdef __cplusplus | |
664 +} | |
665 +#endif | |
666 + | |
667 #endif /* _TBMINTRIN_H_INCLUDED */ | |
668 diff --git a/gcc/config/i386/tmmintrin.h b/gcc/config/i386/tmmintrin.h | |
669 index 89556d2..f89e33c 100644 | |
670 --- a/gcc/config/i386/tmmintrin.h | |
671 +++ b/gcc/config/i386/tmmintrin.h | |
672 @@ -36,6 +36,10 @@ | |
673 #define __DISABLE_SSSE3__ | |
674 #endif /* __SSSE3__ */ | |
675 | |
676 +#ifdef __cplusplus | |
677 +extern "C" { | |
678 +#endif | |
679 + | |
680 extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
681 _mm_hadd_epi16 (__m128i __X, __m128i __Y) | |
682 { | |
683 @@ -241,6 +245,10 @@ _mm_abs_pi32 (__m64 __X) | |
684 return (__m64) __builtin_ia32_pabsd ((__v2si)__X); | |
685 } | |
686 | |
687 +#ifdef __cplusplus | |
688 +} | |
689 +#endif | |
690 + | |
691 #ifdef __DISABLE_SSSE3__ | |
692 #undef __DISABLE_SSSE3__ | |
693 #pragma GCC pop_options | |
694 diff --git a/gcc/config/i386/wmmintrin.h b/gcc/config/i386/wmmintrin.h | |
695 index 2002375..a22bb07 100644 | |
696 --- a/gcc/config/i386/wmmintrin.h | |
697 +++ b/gcc/config/i386/wmmintrin.h | |
698 @@ -30,6 +30,10 @@ | |
699 /* We need definitions from the SSE2 header file. */ | |
700 #include <emmintrin.h> | |
701 | |
702 +#ifdef __cplusplus | |
703 +extern "C" { | |
704 +#endif | |
705 + | |
706 /* AES */ | |
707 | |
708 #ifndef __AES__ | |
709 @@ -124,6 +128,10 @@ _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I) | |
710 (__v2di)(__m128i)(Y), (int)(I))) | |
711 #endif | |
712 | |
713 +#ifdef __cplusplus | |
714 +} | |
715 +#endif | |
716 + | |
717 #ifdef __DISABLE_PCLMUL__ | |
718 #undef __DISABLE_PCLMUL__ | |
719 #pragma GCC pop_options | |
720 diff --git a/gcc/config/i386/xmmintrin.h b/gcc/config/i386/xmmintrin.h | |
721 index a3824e7..ee1a1fc 100644 | |
722 --- a/gcc/config/i386/xmmintrin.h | |
723 +++ b/gcc/config/i386/xmmintrin.h | |
724 @@ -64,6 +64,10 @@ _mm_prefetch (const void *__P, enum _mm_hint __I) | |
725 #define __DISABLE_SSE__ | |
726 #endif /* __SSE__ */ | |
727 | |
728 +#ifdef __cplusplus | |
729 +extern "C" { | |
730 +#endif | |
731 + | |
732 /* The Intel API is flexible enough that we must allow aliasing with other | |
733 vector types, and their scalar components. */ | |
734 typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); | |
735 @@ -1254,6 +1258,10 @@ do { \ | |
736 (row3) = __builtin_ia32_movhlps (__t3, __t2); \ | |
737 } while (0) | |
738 | |
739 +#ifdef __cplusplus | |
740 +} | |
741 +#endif | |
742 + | |
743 /* For backward source compatibility. */ | |
744 # include <emmintrin.h> | |
745 | |
746 diff --git a/gcc/config/i386/xopintrin.h b/gcc/config/i386/xopintrin.h | |
747 index cc82bc5..d567a98 100644 | |
748 --- a/gcc/config/i386/xopintrin.h | |
749 +++ b/gcc/config/i386/xopintrin.h | |
750 @@ -36,6 +36,10 @@ | |
751 #define __DISABLE_XOP__ | |
752 #endif /* __XOP__ */ | |
753 | |
754 +#ifdef __cplusplus | |
755 +extern "C" { | |
756 +#endif | |
757 + | |
758 /* Integer multiply/add intructions. */ | |
759 extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
760 _mm_maccs_epi16(__m128i __A, __m128i __B, __m128i __C) | |
761 @@ -836,6 +840,10 @@ _mm256_permute2_ps (__m256 __X, __m256 __Y, __m256i __C, const int __I) | |
762 (int)(I))) | |
763 #endif /* __OPTIMIZE__ */ | |
764 | |
765 +#ifdef __cplusplus | |
766 +} | |
767 +#endif | |
768 + | |
769 #ifdef __DISABLE_XOP__ | |
770 #undef __DISABLE_XOP__ | |
771 #pragma GCC pop_options | |
772 diff --git a/gcc/config/i386/xsaveintrin.h b/gcc/config/i386/xsaveintrin.h | |
773 index 47be25f..be2caea 100644 | |
774 --- a/gcc/config/i386/xsaveintrin.h | |
775 +++ b/gcc/config/i386/xsaveintrin.h | |
776 @@ -34,6 +34,10 @@ | |
777 #define __DISABLE_XSAVE__ | |
778 #endif /* __XSAVE__ */ | |
779 | |
780 +#ifdef __cplusplus | |
781 +extern "C" { | |
782 +#endif | |
783 + | |
784 extern __inline void | |
785 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
786 _xsave (void *__P, long long __M) | |
787 @@ -69,4 +73,8 @@ _xrstor64 (void *__P, long long __M) | |
788 #pragma GCC pop_options | |
789 #endif /* __DISABLE_XSAVE__ */ | |
790 | |
791 +#ifdef __cplusplus | |
792 +} | |
793 +#endif | |
794 + | |
795 #endif /* _XSAVEINTRIN_H_INCLUDED */ | |
796 diff --git a/gcc/config/i386/xsaveoptintrin.h b/gcc/config/i386/xsaveoptintrin.h | |
797 index d7534b4..90eeb45 100644 | |
798 --- a/gcc/config/i386/xsaveoptintrin.h | |
799 +++ b/gcc/config/i386/xsaveoptintrin.h | |
800 @@ -34,6 +34,10 @@ | |
801 #define __DISABLE_XSAVEOPT__ | |
802 #endif /* __XSAVEOPT__ */ | |
803 | |
804 +#ifdef __cplusplus | |
805 +extern "C" { | |
806 +#endif | |
807 + | |
808 extern __inline void | |
809 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
810 _xsaveopt (void *__P, long long __M) | |
811 @@ -55,4 +59,8 @@ _xsaveopt64 (void *__P, long long __M) | |
812 #pragma GCC pop_options | |
813 #endif /* __DISABLE_XSAVEOPT__ */ | |
814 | |
815 +#ifdef __cplusplus | |
816 +} | |
817 +#endif | |
818 + | |
819 #endif /* _XSAVEOPTINTRIN_H_INCLUDED */ | |
820 diff --git a/gcc/config/i386/xtestintrin.h b/gcc/config/i386/xtestintrin.h | |
821 index ba79e5c..864b727 100644 | |
822 --- a/gcc/config/i386/xtestintrin.h | |
823 +++ b/gcc/config/i386/xtestintrin.h | |
824 @@ -34,6 +34,10 @@ | |
825 #define __DISABLE_RTM__ | |
826 #endif /* __RTM__ */ | |
827 | |
828 +#ifdef __cplusplus | |
829 +extern "C" { | |
830 +#endif | |
831 + | |
832 /* Return non-zero if the instruction executes inside an RTM or HLE code | |
833 region. Return zero otherwise. */ | |
834 extern __inline int | |
835 @@ -48,4 +52,8 @@ _xtest (void) | |
836 #pragma GCC pop_options | |
837 #endif /* __DISABLE_RTM__ */ | |
838 | |
839 +#ifdef __cplusplus | |
840 +} | |
841 +#endif | |
842 + | |
843 #endif /* _XTESTINTRIN_H_INCLUDED */ | |
844 -- | |
845 1.8.4.5 | |
846 |