/[svn]/linuxsampler/trunk/src/common/Features.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/Features.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1824 by schoenebeck, Sun Apr 20 08:53:39 2008 UTC revision 1825 by persson, Fri Jan 16 19:09:10 2009 UTC
# Line 29  bool Features::bSSE(false); Line 29  bool Features::bSSE(false);
29  bool Features::bSSE2(false);  bool Features::bSSE2(false);
30    
31  void Features::detect() {  void Features::detect() {
32    #ifdef __x86_64__
33        int64_t edx;
34        __asm__ __volatile__ (
35            "mov %%rbx,%%rdi\n\t" /*save PIC register*/
36            "movl $1,%%eax\n\t"
37            "cpuid\n\t"
38            "mov %%rdi,%%rbx\n\t" /*restore PIC register*/
39            : "=d" (edx)
40            : : "%rax", "%rcx", "%rdi"
41        );
42    #else
43      int edx;      int edx;
44      __asm__ __volatile__ (      __asm__ __volatile__ (
45          "movl %%ebx,%%edi\n\t" /*save PIC register*/          "movl %%ebx,%%edi\n\t" /*save PIC register*/
# Line 38  void Features::detect() { Line 49  void Features::detect() {
49          : "=d" (edx)          : "=d" (edx)
50          : : "%eax", "%ecx", "%edi"          : : "%eax", "%ecx", "%edi"
51      );      );
52    #endif
53      bMMX = (edx & 0x00800000);      bMMX = (edx & 0x00800000);
54      bSSE = (edx & 0x02000000);      bSSE = (edx & 0x02000000);
55      bSSE2 = (edx & 0x04000000);      bSSE2 = (edx & 0x04000000);

Legend:
Removed from v.1824  
changed lines
  Added in v.1825

  ViewVC Help
Powered by ViewVC