summaryrefslogtreecommitdiff
path: root/src/pal/inc
diff options
context:
space:
mode:
authorSinan Kaya <sinan.kaya@microsoft.com>2019-03-24 23:45:43 +0000
committerSinan Kaya <sinan.kaya@microsoft.com>2019-03-29 14:09:04 +0000
commit446393da44258d60aaa9c660602fb826c79fe6b3 (patch)
treee4a5be4b3c6613856d881fd2f05458e5a4c99ceb /src/pal/inc
parent9f2b33e9e124c1a6be86fa83c21a1a8134a9ca10 (diff)
downloadcoreclr-446393da44258d60aaa9c660602fb826c79fe6b3.tar.gz
coreclr-446393da44258d60aaa9c660602fb826c79fe6b3.tar.bz2
coreclr-446393da44258d60aaa9c660602fb826c79fe6b3.zip
Unify clang with GNUC
Enable SSE for GCC
Diffstat (limited to 'src/pal/inc')
-rw-r--r--src/pal/inc/pal.h10
-rw-r--r--src/pal/inc/rt/xmmintrin.h6
2 files changed, 12 insertions, 4 deletions
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
index 38ef778d53..66d83f1c42 100644
--- a/src/pal/inc/pal.h
+++ b/src/pal/inc/pal.h
@@ -192,11 +192,19 @@ typedef PVOID NATIVE_LIBRARY_HANDLE;
#ifndef NOOPT_ATTRIBUTE
#if defined(__llvm__)
#define NOOPT_ATTRIBUTE optnone
-#else
+#elif defined(__GNUC__)
#define NOOPT_ATTRIBUTE optimize("O0")
#endif
#endif
+#ifndef NODEBUG_ATTRIBUTE
+#if defined(__llvm__)
+#define NODEBUG_ATTRIBUTE __nodebug__
+#elif defined(__GNUC__)
+#define NODEBUG_ATTRIBUTE __artificial__
+#endif
+#endif
+
#ifndef PAL_STDCPP_COMPAT
#if __GNUC__
diff --git a/src/pal/inc/rt/xmmintrin.h b/src/pal/inc/rt/xmmintrin.h
index 1a670bd75a..33bc8b4b92 100644
--- a/src/pal/inc/rt/xmmintrin.h
+++ b/src/pal/inc/rt/xmmintrin.h
@@ -27,12 +27,12 @@
*===-----------------------------------------------------------------------===
*/
-#ifdef __clang__
+#ifdef __GNUC__
typedef float __m128 __attribute__((__vector_size__(16)));
/* Define the default attributes for the functions in this file. */
-#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
+#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, NODEBUG_ATTRIBUTE))
/// \brief Loads a 128-bit floating-point vector of [4 x float] from an aligned
/// memory location.
@@ -113,4 +113,4 @@ _mm_store_ps(float *__p, __m128 __a)
*(__m128*)__p = __a;
}
-#endif // __clang__
+#endif // __GNUC__