|
|
@ -88,19 +88,19 @@ public:
|
|
|
|
__asm__ __volatile__(
|
|
|
|
__asm__ __volatile__(
|
|
|
|
"pushl $100 \n"
|
|
|
|
"pushl $100 \n"
|
|
|
|
"fildl (%%esp) \n"
|
|
|
|
"fildl (%%esp) \n"
|
|
|
|
#if defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
|
|
|
|
#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
|
|
|
|
"addl $4, %%esp \n"
|
|
|
|
"addl $4, %%esp \n"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
"fildl %5 \n"
|
|
|
|
"fildl %5 \n"
|
|
|
|
"fdivp \n" // percent / 100.0
|
|
|
|
"fdivp \n" // percent / 100.0
|
|
|
|
#if defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
|
|
|
|
#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
|
|
|
|
"pushl $100 \n"
|
|
|
|
"pushl $100 \n"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
"fstps (%%esp) \n"
|
|
|
|
"fstps (%%esp) \n"
|
|
|
|
"movss (%%esp), %%xmm1 \n"
|
|
|
|
"movss (%%esp), %%xmm1 \n"
|
|
|
|
"shufps $0x00, %%xmm1, %%xmm1 \n" // percentage in all of xmm1
|
|
|
|
"shufps $0x00, %%xmm1, %%xmm1 \n" // percentage in all of xmm1
|
|
|
|
"addl $4, %%esp \n"
|
|
|
|
"addl $4, %%esp \n"
|
|
|
|
#if defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
|
|
|
|
#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
|
|
|
|
"subl $4, %4 \n"
|
|
|
|
"subl $4, %4 \n"
|
|
|
|
"jl .l2 \n" // samples < 4
|
|
|
|
"jl .l2 \n" // samples < 4
|
|
|
|
#else
|
|
|
|
#else
|
|
|
@ -124,7 +124,7 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
"incl %%ecx \n"
|
|
|
|
"incl %%ecx \n"
|
|
|
|
"incl %%ecx \n"
|
|
|
|
"incl %%ecx \n"
|
|
|
|
#if defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
|
|
|
|
#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
|
|
|
|
"subl $4, %4 \n"
|
|
|
|
"subl $4, %4 \n"
|
|
|
|
"jge .l1 \n"
|
|
|
|
"jge .l1 \n"
|
|
|
|
".l2: \n"
|
|
|
|
".l2: \n"
|
|
|
|