Merge pull request #2677 from brada4/develop

address vs2019 C4293 warning
This commit is contained in:
Martin Kroeker 2020-06-25 08:31:17 +02:00 committed by GitHub
commit 4369e52555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -332,7 +332,7 @@ int support_avx512(){
if((ebx & (1<<7)) == 0){ if((ebx & (1<<7)) == 0){
ret=0; //OS does not even support AVX2 ret=0; //OS does not even support AVX2
} }
if((ebx & (1<<31)) != 0){ if((ebx & (1u<<31)) != 0){
xgetbv(0, &eax, &edx); xgetbv(0, &eax, &edx);
if((eax & 0xe0) == 0xe0) if((eax & 0xe0) == 0xe0)
ret=1; //OS supports AVX512VL ret=1; //OS supports AVX512VL
@ -632,7 +632,7 @@ static gotoblas_t *get_coretype(void){
cpuid(0x80000000, &eax, &ebx, &ecx, &edx); cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
if ( (eax & 0xffff) >= 0x01) { if ( (eax & 0xffff) >= 0x01) {
cpuid(0x80000001, &eax, &ebx, &ecx, &edx); cpuid(0x80000001, &eax, &ebx, &ecx, &edx);
if ((edx & (1 << 30)) == 0 || (edx & (1 << 31)) == 0) if ((edx & (1 << 30)) == 0 || (edx & (1u << 31)) == 0)
return NULL; return NULL;
} }
else else