mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 21:06:49 +00:00
abb124a36f
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 from03eaf9b461did 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 / reverts6334ee3f8band reverts03eaf9b461. Patch by: nwtour Comments by: vladislavbelov Differential Revision: https://code.wildfiregames.com/D3575 This was SVN commit r25405.