Re: [Mingw-w64-public] [PATCH] Enable __MINGW_FORCE_SYS_INTRINS for Clang

2021-04-05 Thread Martin Storsjö

On Sat, 3 Apr 2021, Mateusz Mikuła wrote:


Sorry for the late reply.

Your description sounds good for me.
Since I don't have write access can I ask you to commit it with your
description?


Sure, pushed now.

// Martin

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Enable __MINGW_FORCE_SYS_INTRINS for Clang

2021-04-03 Thread Mateusz Mikuła
Sorry for the late reply.

Your description sounds good for me.
Since I don't have write access can I ask you to commit it with your
description?

Thanks
Mateusz

śr., 31 mar 2021 o 13:53 Martin Storsjö  napisał(a):

> On Mon, 29 Mar 2021, Mateusz Mikuła wrote:
>
> > See https://github.com/msys2/CLANG-packages/issues/6 for the details
> > ---
> > mingw-w64-headers/crt/intrin.h | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/mingw-w64-headers/crt/intrin.h
> b/mingw-w64-headers/crt/intrin.h
> > index 4e840fab..250c25b2 100644
> > --- a/mingw-w64-headers/crt/intrin.h
> > +++ b/mingw-w64-headers/crt/intrin.h
> > @@ -47,10 +47,10 @@
> >  * C++ linkage (when GCC headers are explicitly included before
> intrin.h),
> > but at least their
> >  * guards will prevent duplicated declarations and avoid conflicts.
> >  *
> > - * On GCC 4.9 we may always include those headers. On older GCCs, we may
> > do it only if CPU
> > + * On GCC 4.9 and Clang we may always include those headers. On older
> > GCCs, we may do it only if CPU
> >  * features used by them are enabled, so we need to check macros like
> > __SSE__ or __MMX__ first.
> >  */
> > -#if __MINGW_GNUC_PREREQ(4, 9)
> > +#if __MINGW_GNUC_PREREQ(4, 9) || defined(__clang__)
> > #define __MINGW_FORCE_SYS_INTRINS
> > #endif
> >
> > --
> > 2.30.2.windows.1
>
> Thanks, this patch looks good to me, but it'd be nice to include a bit
> more details in the commit message, i.e. indicating that our definition of
> e.g. __m64 (which we include if __MMX__ isn't defined) conflicts with the
> one from mmintrin.h, which is included implicitly via x86intrin.h. With
> clang, it seems to be ok to include the *mmintrin.h headers even for
> instruction sets not currently enabled, e.g. if building with -march=i686
> which disables MMX and SSE, which otherwise normally are enabled.
>
>
> // Martin
>
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Enable __MINGW_FORCE_SYS_INTRINS for Clang

2021-03-31 Thread Martin Storsjö

On Mon, 29 Mar 2021, Mateusz Mikuła wrote:


See https://github.com/msys2/CLANG-packages/issues/6 for the details
---
mingw-w64-headers/crt/intrin.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-headers/crt/intrin.h b/mingw-w64-headers/crt/intrin.h
index 4e840fab..250c25b2 100644
--- a/mingw-w64-headers/crt/intrin.h
+++ b/mingw-w64-headers/crt/intrin.h
@@ -47,10 +47,10 @@
 * C++ linkage (when GCC headers are explicitly included before intrin.h),
but at least their
 * guards will prevent duplicated declarations and avoid conflicts.
 *
- * On GCC 4.9 we may always include those headers. On older GCCs, we may
do it only if CPU
+ * On GCC 4.9 and Clang we may always include those headers. On older
GCCs, we may do it only if CPU
 * features used by them are enabled, so we need to check macros like
__SSE__ or __MMX__ first.
 */
-#if __MINGW_GNUC_PREREQ(4, 9)
+#if __MINGW_GNUC_PREREQ(4, 9) || defined(__clang__)
#define __MINGW_FORCE_SYS_INTRINS
#endif

--
2.30.2.windows.1


Thanks, this patch looks good to me, but it'd be nice to include a bit 
more details in the commit message, i.e. indicating that our definition of 
e.g. __m64 (which we include if __MMX__ isn't defined) conflicts with the 
one from mmintrin.h, which is included implicitly via x86intrin.h. With 
clang, it seems to be ok to include the *mmintrin.h headers even for 
instruction sets not currently enabled, e.g. if building with -march=i686 
which disables MMX and SSE, which otherwise normally are enabled.



// Martin

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [PATCH] Enable __MINGW_FORCE_SYS_INTRINS for Clang

2021-03-29 Thread Mateusz Mikuła
 See https://github.com/msys2/CLANG-packages/issues/6 for the details
---
 mingw-w64-headers/crt/intrin.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-headers/crt/intrin.h b/mingw-w64-headers/crt/intrin.h
index 4e840fab..250c25b2 100644
--- a/mingw-w64-headers/crt/intrin.h
+++ b/mingw-w64-headers/crt/intrin.h
@@ -47,10 +47,10 @@
  * C++ linkage (when GCC headers are explicitly included before intrin.h),
but at least their
  * guards will prevent duplicated declarations and avoid conflicts.
  *
- * On GCC 4.9 we may always include those headers. On older GCCs, we may
do it only if CPU
+ * On GCC 4.9 and Clang we may always include those headers. On older
GCCs, we may do it only if CPU
  * features used by them are enabled, so we need to check macros like
__SSE__ or __MMX__ first.
  */
-#if __MINGW_GNUC_PREREQ(4, 9)
+#if __MINGW_GNUC_PREREQ(4, 9) || defined(__clang__)
 #define __MINGW_FORCE_SYS_INTRINS
 #endif

--
2.30.2.windows.1

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [PATCH] Enable __MINGW_FORCE_SYS_INTRINS for Clang

2021-03-29 Thread Mateusz Mikuła
See https://github.com/msys2/CLANG-packages/issues/6 for the details
---
 mingw-w64-headers/crt/intrin.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-headers/crt/intrin.h b/mingw-w64-headers/crt/intrin.h
index 4e840fab..250c25b2 100644
--- a/mingw-w64-headers/crt/intrin.h
+++ b/mingw-w64-headers/crt/intrin.h
@@ -47,10 +47,10 @@
  * C++ linkage (when GCC headers are explicitly included before intrin.h),
but at least their
  * guards will prevent duplicated declarations and avoid conflicts.
  *
- * On GCC 4.9 we may always include those headers. On older GCCs, we may
do it only if CPU
+ * On GCC 4.9 and Clang we may always include those headers. On older
GCCs, we may do it only if CPU
  * features used by them are enabled, so we need to check macros like
__SSE__ or __MMX__ first.
  */
-#if __MINGW_GNUC_PREREQ(4, 9)
+#if __MINGW_GNUC_PREREQ(4, 9) || defined(__clang__)
 #define __MINGW_FORCE_SYS_INTRINS
 #endif

--
2.30.2.windows.1

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public