mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-15 07:18:29 -04:00
lib/x86/cpu_features: add missing earlyclobber constraint for cpuid on i386
In cpuid() in the '__i386__ && __PIC__' case, the second output operand is written to before the input operands are used. So the second output operand needs the earlyclobber constraint.
This commit is contained in:
parent
9702f9fa86
commit
82037908c7
@ -34,7 +34,7 @@ volatile u32 _cpu_features = 0;
|
|||||||
/* With old GCC versions we have to manually save and restore the x86_32 PIC
|
/* With old GCC versions we have to manually save and restore the x86_32 PIC
|
||||||
* register (ebx). See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47602 */
|
* register (ebx). See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47602 */
|
||||||
#if defined(__i386__) && defined(__PIC__)
|
#if defined(__i386__) && defined(__PIC__)
|
||||||
# define EBX_CONSTRAINT "=r"
|
# define EBX_CONSTRAINT "=&r"
|
||||||
#else
|
#else
|
||||||
# define EBX_CONSTRAINT "=b"
|
# define EBX_CONSTRAINT "=b"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user