Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/include Modified Files: evas_mmx.h Log Message: build with amd64 asm (needs to be manually enabled though right now) minor list cleanups :) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/include/evas_mmx.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- evas_mmx.h 27 Jan 2005 10:05:41 -0000 1.3 +++ evas_mmx.h 9 Apr 2005 00:09:34 -0000 1.4 @@ -528,6 +528,46 @@ #define CPUID_SSE (1 << 25) /* flags: xmm */ #define CPUID_SSE2 (1 << 26) /* flags: ? */ +#ifdef __amd64 +#define have_cpuid(cpuid_ret) \ + __asm__ __volatile__ ( \ + ".align 32 \n" \ + " pushq %%rbx \n" \ + " pushfq \n" \ + " popq %%rax \n" \ + " movq %%rax, %%rbx \n" \ + " xorq $0x200000, %%rax \n" \ + " pushq %%rax \n" \ + " popfq \n" \ + " pushfq \n" \ + " popq %%rax \n" \ + " cmpq %%rax, %%rbx \n" \ + " je 1f \n" \ + " movl $1, %0 \n" \ + " jmp 2f \n" \ + "1: \n" \ + " movl $0, %0 \n" \ + "2: \n" \ + " popq %%rbx \n" \ + : "=m" (cpuid_ret) \ + ); + +#define get_cpuid(cpuid_ret) \ + __asm__ __volatile__ ( \ + ".align 32 \n" \ + " pushq %%rax \n" \ + " movl $1, %%eax \n" \ + " cpuid \n" \ + " test $0x00800000, %%edx\n" \ + "1: \n" \ + " movl %%edx, %0 \n" \ + " jmp 2f \n" \ + "2: \n" \ + " movl $0, %0 \n" \ + " popq %%rax \n" \ + : "=m" (cpuid_ret) \ + ); +#else #define have_cpuid(cpuid_ret) \ __asm__ __volatile__ ( \ ".align 32 \n" \ @@ -566,6 +606,8 @@ " popl %%eax \n" \ : "=m" (cpuid_ret) \ ); +#endif + /* P3 instructions - need to figure how to detect? */ #define prefetch(var) \ __asm__ __volatile__ ( \ ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs