diff options
author | Jack Lloyd <[email protected]> | 2016-10-14 12:03:22 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-10-14 12:03:22 -0400 |
commit | 8b3bda479efecef760f052cc055d3d6d98bf0637 (patch) | |
tree | 77cd13fe2e62085c2f04bf437c1e845a20bf6a01 /src/build-data | |
parent | 60fc0ebf44e746b17d46a9d53054064808476495 (diff) |
Add ISA annotations to functions using SIMD, AES, etc
Also emit `#pragma GCC target` in the ISA specific amalgamation files.
This allows compiling without any special compiler flags, at least
with GCC 6.2 and Clang 3.8. The ISA annotations are ignored in MSVC,
which just emits whatever instruction the intrinsic requires.
Diffstat (limited to 'src/build-data')
-rw-r--r-- | src/build-data/buildh.in | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index e943973a0..c84698804 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -199,8 +199,15 @@ Each read generates 32 bits of output %{target_compiler_defines} + +#if defined(__GNUG__) || defined(__clang__) + #define BOTAN_FUNC_ISA(isa) __attribute__ ((target(isa))) +#else + #define BOTAN_FUNC_ISA(isa) +#endif + /* -* Compile-time deprecatation warnings +* Compile-time deprecation warnings */ #if !defined(BOTAN_NO_DEPRECATED_WARNINGS) |