On 09/18/13 14:50, Jacek Caban wrote:
> On 09/18/13 12:26, Erik van Pienbroek wrote:
>> Jacek Caban schreef op wo 18-09-2013 om 11:52 [+0200]:
>>> Hi,
>>>
>>> Please review the attached patch. It fixes trunk GCC compilation, which
>>> is something I think should be done before v3 release. We already talked
>>> about this on IRC and the comment has short explanation, let me know if
>>> more info is needed.
>> This one looks related to
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56038
>> Do you have any idea whether this commit should also fix that gcc bug?
> No, it probably won't be fixed. However it's related to the same
> workarounds, so we should be able to fix it in mingw-w64-headers.
I attached a fix for that. It's probably too late in the release process
for v3, through...
Jacek
commit ff86bde1f9e0d2f5d044b16493a357de43b0ab91
Author: Jacek Caban <[email protected]>
Date: Fri Sep 20 13:24:26 2013 +0200
intrin.h: Fixed conflicts with xmmintrin.h.
diff --git a/mingw-w64-headers/crt/intrin.h b/mingw-w64-headers/crt/intrin.h
index 4397c43..6287610 100644
--- a/mingw-w64-headers/crt/intrin.h
+++ b/mingw-w64-headers/crt/intrin.h
@@ -106,6 +106,16 @@ extern "C" {
#endif
/* NOTE: it's not included by MS version, but we do it to try work around
C++/C linkage differences */
+#if defined(__SSE__) || defined(__MINGW_FORCE_SYS_INTRINS)
+#if defined(__cplusplus)
+extern "C" {
+#endif
+#include <xmmintrin.h>
+#if defined(__cplusplus)
+}
+#endif
+#endif
+
#if defined(__SSE2__) || defined(__MINGW_FORCE_SYS_INTRINS)
#if defined(__cplusplus)
extern "C" {
@@ -612,6 +622,7 @@ extern "C" {
__MACHINEX86X_NOX64(__m64 _mm_setr_pi16(short,short,short,short))
__MACHINEX86X_NOX64(__m64
_mm_setr_pi8(char,char,char,char,char,char,char,char))
#endif
+#if !defined(__GNUC__) || (!defined(__SSE__) &&
!defined(__MINGW_FORCE_SYS_INTRINS))
#pragma push_macro ("_m_pextrw")
#undef _m_pextrw
__MACHINEX86X_NOX64(int _m_pextrw(__m64,int))
@@ -621,19 +632,16 @@ extern "C" {
#undef _m_pinsrw
__MACHINEX86X_NOX64(__m64 _m_pinsrw(__m64,int,int))
#pragma pop_macro ("_m_pinsrw")
-#if !defined(__GNUC__) || (!defined(__SSE2__) &&
!defined(__MINGW_FORCE_SYS_INTRINS))
__MACHINEX86X_NOX64(__m64 _m_pmaxsw(__m64,__m64))
__MACHINEX86X_NOX64(__m64 _m_pmaxub(__m64,__m64))
__MACHINEX86X_NOX64(__m64 _m_pminsw(__m64,__m64))
__MACHINEX86X_NOX64(__m64 _m_pminub(__m64,__m64))
__MACHINEX86X_NOX64(int _m_pmovmskb(__m64))
__MACHINEX86X_NOX64(__m64 _m_pmulhuw(__m64,__m64))
-#endif
#pragma push_macro ("_m_pshufw")
#undef _m_pshufw
__MACHINEX86X_NOX64(__m64 _m_pshufw(__m64,int))
#pragma pop_macro ("_m_pshufw")
-#if !defined(__GNUC__) || (!defined(__SSE2__) &&
!defined(__MINGW_FORCE_SYS_INTRINS))
__MACHINEX86X_NOX64(void _m_maskmovq(__m64,__m64,char*))
__MACHINEX86X_NOX64(__m64 _m_pavgb(__m64,__m64))
__MACHINEX86X_NOX64(__m64 _m_pavgw(__m64,__m64))
@@ -641,7 +649,7 @@ extern "C" {
#endif
__MACHINEX86X_NOWIN64(__m64 _m_from_float(float))
__MACHINEX86X_NOWIN64(float _m_to_float(__m64))
-#if !defined(__GNUC__) || (!defined(__SSE2__) &&
!defined(__MINGW_FORCE_SYS_INTRINS))
+#if !defined(__GNUC__) || (!defined(__SSE__) &&
!defined(__MINGW_FORCE_SYS_INTRINS))
__MACHINEX86X_NOIA64(__m128 _mm_add_ss(__m128,__m128))
__MACHINEX86X_NOIA64(__m128 _mm_add_ps(__m128,__m128))
__MACHINEX86X_NOIA64(__m128 _mm_sub_ss(__m128,__m128))
@@ -706,12 +714,10 @@ extern "C" {
__MACHINEX86X_NOWIN64(__m64 _mm_cvtt_ps2pi(__m128))
__MACHINEX86X_NOIA64(__m128 _mm_cvt_si2ss(__m128,int))
__MACHINEX86X_NOWIN64(__m128 _mm_cvt_pi2ps(__m128,__m64))
-#endif
#pragma push_macro ("_mm_shuffle_ps")
#undef _mm_shuffle_ps
__MACHINEX86X_NOIA64(__m128 _mm_shuffle_ps(__m128,__m128,int const))
#pragma pop_macro ("_mm_shuffle_ps")
-#if !defined(__GNUC__) || (!defined(__SSE2__) &&
!defined(__MINGW_FORCE_SYS_INTRINS))
__MACHINEX86X_NOIA64(__m128 _mm_unpackhi_ps(__m128,__m128))
__MACHINEX86X_NOIA64(__m128 _mm_unpacklo_ps(__m128,__m128))
__MACHINEX86X_NOIA64(__m128 _mm_loadh_pi(__m128,__m64 const*))
@@ -987,6 +993,8 @@ extern "C" {
__MACHINEX86X(void _mm_lfence(void))
__MACHINEX86X(void _mm_mfence(void))
__MACHINEX86X(void _mm_stream_si32(int*,int))
+#endif
+#if !defined(__GNUC__) || (!defined(__SSE__) &&
!defined(__MINGW_FORCE_SYS_INTRINS))
__MACHINEX86X(void _mm_pause(void))
#endif
#if !defined(__GNUC__) || (!defined(__SSE3__) &&
!defined(__MINGW_FORCE_SYS_INTRINS))
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public