[PATCH] D13015: [X86] Make f16c intrinsics accessible through emmintrin.h, per Intel docs

Michael Kuperstein via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 21 05:57:30 PDT 2015


mkuper created this revision.
mkuper added a reviewer: AsafBadouh.
mkuper added a subscriber: cfe-commits.

http://reviews.llvm.org/D13015

Files:
  lib/Headers/emmintrin.h
  lib/Headers/f16cintrin.h

Index: lib/Headers/emmintrin.h
===================================================================
--- lib/Headers/emmintrin.h
+++ lib/Headers/emmintrin.h
@@ -35,6 +35,8 @@
 typedef short __v8hi __attribute__((__vector_size__(16)));
 typedef char __v16qi __attribute__((__vector_size__(16)));
 
+#include <f16cintrin.h>
+
 /* Define the default attributes for the functions in this file. */
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sse2")))
 
Index: lib/Headers/f16cintrin.h
===================================================================
--- lib/Headers/f16cintrin.h
+++ lib/Headers/f16cintrin.h
@@ -21,8 +21,8 @@
  *===-----------------------------------------------------------------------===
  */
 
-#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
-#error "Never use <f16cintrin.h> directly; include <x86intrin.h> instead."
+#if !defined __X86INTRIN_H && !defined __EMMINTRIN_H && !defined __IMMINTRIN_H
+#error "Never use <f16cintrin.h> directly; include <emmintrin.h> instead."
 #endif
 
 #ifndef __F16CINTRIN_H


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13015.35237.patch
Type: text/x-patch
Size: 1091 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150921/ff55faec/attachment.bin>


More information about the cfe-commits mailing list