1
0
forked from 0ad/0ad
0ad/source
wraitii abb124a36f Fix cpuid call with -fPIC on i386 architectures.
GCC < 5 used to reserve the ebx register for PIC (position-independent
code) metadata. This meant that we needed to save the state of ebx
before calling cpuid (fixed in #2675)
However, the original patch from 03eaf9b461 did not force a particular
register to store this value in. Following the GCC 5 upgrade, GCC
stopped reserving ebx, and that register silently got used instead. The
code became non-sensical, and our ASM __cpuidex started returning random
garbage in edx.

Since we now only support GCC7 and above, the PIC-specific branch is no
longer necessary and is removed.

Fixes #6028. The assertion was a result of random data in ebx.
Refs #2675 / reverts 6334ee3f8b and reverts 03eaf9b461.

Patch by: nwtour
Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3575
This was SVN commit r25405.
2021-05-09 12:41:45 +00:00
..
collada Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
graphics Fix mistake in 100159548c 2021-05-06 07:42:49 +00:00
gui Fix 8b08f4ae7a - CGUIColor setting 2021-05-07 11:34:20 +00:00
i18n Split ScriptRequest in its own header. 2021-05-03 16:07:26 +00:00
lib Fix cpuid call with -fPIC on i386 architectures. 2021-05-09 12:41:45 +00:00
lobby Fix some warnings. 2021-05-02 15:45:40 +00:00
maths Further reduce usage of TERRAIN_TILE_SIZE in non-terrain components 2021-05-02 17:40:00 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Split ScriptRequest in its own header. 2021-05-03 16:07:26 +00:00
pch Split ScriptRequest in its own header. 2021-05-03 16:07:26 +00:00
ps Fix Profiler1 "time per turn". 2021-05-06 16:49:34 +00:00
renderer Split ScriptRequest in its own header. 2021-05-03 16:07:26 +00:00
rlinterface ParamNode: switch to utf8, ToXML -> ToXMLString, test tweak, PCH tweak 2021-04-11 09:23:10 +00:00
scriptinterface Change GUI settings to explicitly be member variables. 2021-05-06 08:22:37 +00:00
simulation2 Fix Profiler1 "time per turn". 2021-05-06 16:49:34 +00:00
soundmanager XMB Improvements, parse JS into XMB, make strings more efficient. 2021-05-04 13:02:34 +00:00
third_party Optimization for include resolving in PreprocessorWrapper. 2021-01-20 23:05:15 +00:00
tools Fix enabling / disabling shadows in the actor viewer. 2021-04-28 11:09:16 +00:00
main.cpp Make real directory paths on the VFS predictable (retry) 2021-03-23 12:46:59 +00:00
test_setup.cpp Introduce C++ templates replacements for DEFINE_INTERFACE_X and RegisterFunction macros 2021-03-01 20:52:24 +00:00