diff options
author | El Mostafa Idrassi <el-mostafa.idrassi@prestalab.net> | 2019-10-04 13:07:10 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-10-04 14:07:10 +0200 |
commit | 9a895bedde8ded1edbb814edb22a7197931a0d5b (patch) | |
tree | 8cf1a0dbcfd18273877c76ade4a2ed0ddb4c2c22 /doc/html/Twofish.html | |
parent | 1fb81d1a43196fa3fc1f0fd10d019e1e884ed2a3 (diff) | |
download | VeraCrypt-9a895bedde8ded1edbb814edb22a7197931a0d5b.tar.gz VeraCrypt-9a895bedde8ded1edbb814edb22a7197931a0d5b.zip |
Fix "error "SSSE3 instruction set not enabled" when compiling using GCC version < 4.9 without -mssse3 option (SSSE3=1 when using make). (#507)
Compiling with -mxxx defines the corresponding macro of the intrinsics.
For example, -mssse3 defines __SSSE3__ macro to 1.
In GCC versions < 4.9, it is not possible to use and call x86 intrinsics only at runtime without
compiling the entire file with the -mxxx option.
For example, if we want to call SSSE3 intrinsics without compiling with -mssse3, the macro __SSSE3__ is not defined.
Therefore, when including <tmmintrin.h>, this results in "error "SSSE3 instruction set not enabled"" because of :
#ifndef __SSSE3__
# error "SSSE3 instruction set not enabled"
Since GCC 4.9, this has been fixed and it is possible to call x86 intrinsics from select functions in a file
that are tagged with the corresponding target attribute without having to compile the entire file with the -mxxx option.
This can be seen in <tmmintrin.h> which in recent versions (>= 4.9) contains :
#ifndef __SSSE3__
#pragma GCC push_options
#pragma GCC target("ssse3")
#define __DISABLE_SSSE3__
Since SSSE3 is only used under Windows for ChaCha256, this can be fixed by preceding '#include <tmmintrin.h>' with
#if defined (_MSC_VER) && !defined (TC_WINDOWS_BOOT).
See https://gcc.gnu.org/gcc-4.9/changes.html
Diffstat (limited to 'doc/html/Twofish.html')
0 files changed, 0 insertions, 0 deletions