mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
[gamesource] Work around a windows gcc bug
The bug (alignment issues with AVX on windows) seems to have in gcc from the 4.x days, and is still present in 11.2: it does not ensure stack parameters that need 32 byte alignment are aligned. Telling gcc to use the sysv abi (safe on a static function) lets gcc do what it does for linux (usually pass the parameters in registers, which it seems to have done).
This commit is contained in:
parent
c3317f8e5e
commit
0d9294d541
1 changed files with 5 additions and 0 deletions
|
@ -2261,6 +2261,11 @@ negate:
|
|||
}
|
||||
|
||||
static pr_lvec4_t
|
||||
#ifdef _WIN64
|
||||
//force gcc to use registers for the parameters to avoid alignment issues
|
||||
//on the stack (gcc bug as of 11.2)
|
||||
__attribute__((sysv_abi))
|
||||
#endif
|
||||
pr_swizzle_d (pr_lvec4_t vec, pr_ushort_t swiz)
|
||||
{
|
||||
goto do_swizzle;
|
||||
|
|
Loading…
Reference in a new issue