diff --git a/clang/lib/Headers/cpuid.h b/clang/lib/Headers/cpuid.h index 05c293f6bd96..33df7c2d19f0 100644 --- a/clang/lib/Headers/cpuid.h +++ b/clang/lib/Headers/cpuid.h @@ -28,6 +28,6 @@ static inline int __get_cpuid (unsigned int level, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) { - asm("cpuid" : "=a"(*eax), "=b" (*ebx), "=c"(*ecx), "=d"(*edx) : "0"(level)); + __asm("cpuid" : "=a"(*eax), "=b" (*ebx), "=c"(*ecx), "=d"(*edx) : "0"(level)); return 1; } diff --git a/clang/lib/Headers/module.map b/clang/lib/Headers/module.map index 418ba5009094..bcdd8e85e6fb 100644 --- a/clang/lib/Headers/module.map +++ b/clang/lib/Headers/module.map @@ -25,6 +25,11 @@ module _Builtin_intrinsics [system] { header "mmintrin.h" } + explicit module f16c { + requires f16c + header "f16cintrin.h" + } + explicit module sse { requires sse export mmx @@ -62,6 +67,12 @@ module _Builtin_intrinsics [system] { header "nmmintrin.h" } + explicit module sse4a { + requires sse4a + export sse3 + header "nmmintrin.h" + } + explicit module avx { requires avx export sse4_2 @@ -84,6 +95,11 @@ module _Builtin_intrinsics [system] { header "bmi2intrin.h" } + explicit module fma { + requires fma + header "fmaintrin.h" + } + explicit module fma4 { requires fma4 export sse3 @@ -104,5 +120,11 @@ module _Builtin_intrinsics [system] { requires mm3dnow header "mm3dnow.h" } + + explicit module xop { + requires xop + export fma4 + header "xopintrin.h" + } } } diff --git a/clang/test/Modules/compiler_builtins.m b/clang/test/Modules/compiler_builtins.m index d974dae52e03..dfa46c8a34f5 100644 --- a/clang/test/Modules/compiler_builtins.m +++ b/clang/test/Modules/compiler_builtins.m @@ -1,5 +1,6 @@ // RUN: rm -rf %t // RUN: %clang -fsyntax-only -fmodules -fmodule-cache-path %t -D__need_wint_t %s -Xclang -verify +// RUN: %clang -fsyntax-only -std=c99 -fmodules -fmodule-cache-path %t -D__need_wint_t %s -Xclang -verify // expected-no-diagnostics #ifdef __SSE__