mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-12 11:23:33 +00:00

This involved removing the conditional inclusion and replacing them with target attributes matching the original conditional inclusion and checks. The testcase update removes the macro checks for each file and replaces them with usage of the __target__ attribute, e.g.: int __attribute__((__target__(("sse3")))) foo(int a) { _mm_mwait(0, 0); return 4; } This usage does require the enclosing function have the requisite __target__ attribute for inlining and code generation - also for any macro intrinsic uses in the enclosing function. There's no change for existing uses of the intrinsic headers. llvm-svn: 239883
12 lines
380 B
C
12 lines
380 B
C
// RUN: %clang_cc1 -fsyntax-only -ffreestanding %s -verify
|
|
// RUN: %clang_cc1 -fsyntax-only -ffreestanding -fno-lax-vector-conversions %s -verify
|
|
// RUN: %clang_cc1 -fsyntax-only -ffreestanding -x c++ %s -verify
|
|
// expected-no-diagnostics
|
|
|
|
#if defined(i386) || defined(__x86_64__)
|
|
|
|
// Include the metaheader that includes all x86 intrinsic headers.
|
|
#include <x86intrin.h>
|
|
|
|
#endif
|