cpu detection: avoid a signed overflow
1<<31 overflows because 1 is signed, so force it to unsigned.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 5938e02185
)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:

committed by
Reinhard Tartler

parent
2b74db8d27
commit
1cf3ba8971
@@ -113,7 +113,7 @@ int ff_get_cpu_flags_x86(void)
|
|||||||
|
|
||||||
if(max_ext_level >= 0x80000001){
|
if(max_ext_level >= 0x80000001){
|
||||||
cpuid(0x80000001, eax, ebx, ecx, ext_caps);
|
cpuid(0x80000001, eax, ebx, ecx, ext_caps);
|
||||||
if (ext_caps & (1<<31))
|
if (ext_caps & (1U<<31))
|
||||||
rval |= AV_CPU_FLAG_3DNOW;
|
rval |= AV_CPU_FLAG_3DNOW;
|
||||||
if (ext_caps & (1<<30))
|
if (ext_caps & (1<<30))
|
||||||
rval |= AV_CPU_FLAG_3DNOWEXT;
|
rval |= AV_CPU_FLAG_3DNOWEXT;
|
||||||
|
Reference in New Issue
Block a user