diff options
author | dim <dim@FreeBSD.org> | 2015-06-21 14:00:56 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-06-21 14:00:56 +0000 |
commit | 9dd834653b811ad20382e98a87dff824980c9916 (patch) | |
tree | a764184c2fc9486979b074250b013a0937ee64e5 /lib/Headers/f16cintrin.h | |
parent | bb9760db9b86e93a638ed430d0a14785f7ff9064 (diff) | |
download | FreeBSD-src-9dd834653b811ad20382e98a87dff824980c9916.zip FreeBSD-src-9dd834653b811ad20382e98a87dff824980c9916.tar.gz |
Vendor import of clang trunk r240225:
https://llvm.org/svn/llvm-project/cfe/trunk@240225
Diffstat (limited to 'lib/Headers/f16cintrin.h')
-rw-r--r-- | lib/Headers/f16cintrin.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Headers/f16cintrin.h b/lib/Headers/f16cintrin.h index f3614c0..c56960c 100644 --- a/lib/Headers/f16cintrin.h +++ b/lib/Headers/f16cintrin.h @@ -25,16 +25,15 @@ #error "Never use <f16cintrin.h> directly; include <x86intrin.h> instead." #endif -#ifndef __F16C__ -# error "F16C instruction is not enabled" -#endif /* __F16C__ */ - #ifndef __F16CINTRIN_H #define __F16CINTRIN_H typedef float __v8sf __attribute__ ((__vector_size__ (32))); typedef float __m256 __attribute__ ((__vector_size__ (32))); +/* Define the default attributes for the functions in this file. */ +#define DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("f16c"))) + #define _mm_cvtps_ph(a, imm) __extension__ ({ \ __m128 __a = (a); \ (__m128i)__builtin_ia32_vcvtps2ph((__v4sf)__a, (imm)); }) @@ -43,16 +42,18 @@ typedef float __m256 __attribute__ ((__vector_size__ (32))); __m256 __a = (a); \ (__m128i)__builtin_ia32_vcvtps2ph256((__v8sf)__a, (imm)); }) -static __inline __m128 __attribute__((__always_inline__, __nodebug__)) +static __inline __m128 DEFAULT_FN_ATTRS _mm_cvtph_ps(__m128i __a) { return (__m128)__builtin_ia32_vcvtph2ps((__v8hi)__a); } -static __inline __m256 __attribute__((__always_inline__, __nodebug__)) +static __inline __m256 DEFAULT_FN_ATTRS _mm256_cvtph_ps(__m128i __a) { return (__m256)__builtin_ia32_vcvtph2ps256((__v8hi)__a); } +#undef DEFAULT_FN_ATTRS + #endif /* __F16CINTRIN_H */ |