mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-12 20:47:06 +00:00
Lots of little cosmetic cleanups
This commit is contained in:
1 parent
16289ce9a4
commit
d163c6338e
110 files changed
+7259
-762
No files matched your search
@@ -75,7 +75,6 @@ static __inline__ int flag_is_changeable_p(uint32_t flag)
|
||||
" popfl\n"
|
||||
: "=&r" (f1), "=&r" (f2)
|
||||
: "ir" (flag));
|
||||
|
||||
return ((f1^f2) & flag) != 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
@@ -96,21 +95,21 @@ int has_MMX(void)
|
||||
/*endif*/
|
||||
__asm__ __volatile__(
|
||||
" push %%ebx;\n"
|
||||
" mov $1,%%eax;\n"
|
||||
" cpuid;\n"
|
||||
" xor %%eax,%%eax;\n"
|
||||
" test $0x800000,%%edx;\n"
|
||||
" jz 1f;\n" /* no MMX support */
|
||||
" inc %%eax;\n" /* MMX support */
|
||||
" mov $1,%%eax;\n"
|
||||
" cpuid;\n"
|
||||
" xor %%eax,%%eax;\n"
|
||||
" test $0x800000,%%edx;\n"
|
||||
" jz 1f;\n" /* no MMX support */
|
||||
" inc %%eax;\n" /* MMX support */
|
||||
"1:\n"
|
||||
" pop %%ebx;\n"
|
||||
: "=a" (result)
|
||||
:
|
||||
: "=a" (result)
|
||||
:
|
||||
: "ecx", "edx");
|
||||
return result;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
|
||||
int has_SIMD(void)
|
||||
{
|
||||
int result;
|
||||
@@ -120,16 +119,16 @@ int has_SIMD(void)
|
||||
/*endif*/
|
||||
__asm__ __volatile__(
|
||||
" push %%ebx;\n"
|
||||
" mov $1,%%eax;\n"
|
||||
" cpuid;\n"
|
||||
" xor %%eax,%%eax;\n"
|
||||
" test $0x02000000,%%edx;\n"
|
||||
" jz 1f;\n" /* no SIMD support */
|
||||
" inc %%eax;\n" /* SIMD support */
|
||||
" mov $1,%%eax;\n"
|
||||
" cpuid;\n"
|
||||
" xor %%eax,%%eax;\n"
|
||||
" test $0x02000000,%%edx;\n"
|
||||
" jz 1f;\n" /* no SIMD support */
|
||||
" inc %%eax;\n" /* SIMD support */
|
||||
"1:\n"
|
||||
" pop %%ebx;\n"
|
||||
: "=a" (result)
|
||||
:
|
||||
: "=a" (result)
|
||||
:
|
||||
: "ecx", "edx");
|
||||
return result;
|
||||
}
|
||||
@@ -144,21 +143,21 @@ int has_SIMD2(void)
|
||||
/*endif*/
|
||||
__asm__ __volatile__(
|
||||
" push %%ebx;\n"
|
||||
" mov $1,%%eax;\n"
|
||||
" cpuid;\n"
|
||||
" xor %%eax,%%eax;\n"
|
||||
" test $0x04000000,%%edx;\n"
|
||||
" jz 1f;\n" /* no SIMD2 support */
|
||||
" inc %%eax;\n" /* SIMD2 support */
|
||||
" mov $1,%%eax;\n"
|
||||
" cpuid;\n"
|
||||
" xor %%eax,%%eax;\n"
|
||||
" test $0x04000000,%%edx;\n"
|
||||
" jz 1f;\n" /* no SIMD2 support */
|
||||
" inc %%eax;\n" /* SIMD2 support */
|
||||
"1:\n"
|
||||
" pop %%ebx;\n"
|
||||
: "=a" (result)
|
||||
:
|
||||
: "=a" (result)
|
||||
:
|
||||
: "ecx", "edx");
|
||||
return result;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
|
||||
int has_3DNow(void)
|
||||
{
|
||||
int result;
|
||||
@@ -168,21 +167,21 @@ int has_3DNow(void)
|
||||
/*endif*/
|
||||
__asm__ __volatile__(
|
||||
" push %%ebx;\n"
|
||||
" mov $0x80000000,%%eax;\n"
|
||||
" cpuid;\n"
|
||||
" mov $0x80000000,%%eax;\n"
|
||||
" cpuid;\n"
|
||||
" xor %%ecx,%%ecx;\n"
|
||||
" cmp $0x80000000,%%eax;\n"
|
||||
" jbe 1f;\n" /* no extended MSR(1), so no 3DNow! */
|
||||
" mov $0x80000001,%%eax;\n"
|
||||
" cpuid;\n"
|
||||
" cmp $0x80000000,%%eax;\n"
|
||||
" jbe 1f;\n" /* no extended MSR(1), so no 3DNow! */
|
||||
" mov $0x80000001,%%eax;\n"
|
||||
" cpuid;\n"
|
||||
" xor %%ecx,%%ecx;\n"
|
||||
" test $0x80000000,%%edx;\n"
|
||||
" jz 1f;\n" /* no 3DNow! support */
|
||||
" inc %%ecx;\n" /* 3DNow! support */
|
||||
" test $0x80000000,%%edx;\n"
|
||||
" jz 1f;\n" /* no 3DNow! support */
|
||||
" inc %%ecx;\n" /* 3DNow! support */
|
||||
"1:\n"
|
||||
" pop %%ebx;\n"
|
||||
: "=c" (result)
|
||||
:
|
||||
: "=c" (result)
|
||||
:
|
||||
: "eax", "edx");
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user