qt5base-lts/config.tests/x86_simd
Thiago Macieira c062fed427 qsimd_p.h: add a hack to allow AVX to work with MinGW
GCC is unable to emit the SEH metadata about the stack aligning that is
required to execute AVX aligned instructions (VMOVDQA, VMOVAPS, etc.),
so it just doesn't align the stack. That causes crashes on a 50/50
chance every time the compiler attempts to address a stack-aligned
variable. In a debug-mode build, because it always loads & saves
everything on the stack, the chance of a crash happening is a near
certainty.

So we hack around it by going behind the compiler's back and instructing
the assembler to emit the unaligned counterparts of the instructions
every time the compiler wished to emit the aligned one. There's no
performance penalty: if the variable is actually aligned, the unaligned
instruction executes in the exact same time.

Change-Id: Ib42b3adc93bf4d43bd55fffd16c29cac0da18972
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-01-20 20:48:23 -03:00
..
CMakeLists.txt CMake: Bump almost all cmake_minimum_required calls to 3.16 2021-09-22 19:36:49 +02:00
main.cpp qsimd_p.h: add a hack to allow AVX to work with MinGW 2022-01-20 20:48:23 -03:00