Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27310
Modified Files: Tag: devel_0_39 m_simd_sse_gcc.c Log Message: push/pop seems more secure
Index: m_simd_sse_gcc.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/m_simd_sse_gcc.c,v retrieving revision 1.1.4.13.2.3 retrieving revision 1.1.4.13.2.4 diff -C2 -d -r1.1.4.13.2.3 -r1.1.4.13.2.4 *** m_simd_sse_gcc.c 23 Dec 2005 11:32:49 -0000 1.1.4.13.2.3 --- m_simd_sse_gcc.c 10 Jan 2006 20:28:13 -0000 1.1.4.13.2.4 *************** *** 950,961 **** int simd_runtime_check() { ! unsigned int eax, edx; ! __asm__("mov %%bx, %%si \n" ! "cpuid \n" ! "xchg %%bx, %%si \n" ! : "=a"(eax),"=d"(edx) ! : "a" (1) ! : "cx", "si"); ! return (0x2000000 & edx); }
--- 950,960 ---- int simd_runtime_check() { ! unsigned int eax, edx, ret; ! __asm__("push %%ebx \n" /* ebx might be used as PIC register :-( */ ! "cpuid \n" ! "pop %%ebx \n" ! : "=a"(eax),"=d"(edx) : "a" (1): "cx"); ! ret = 0x2000000 & edx; ! return (ret); }