From: Melzzzzz@nospicedham.zzzzz.com   
      
   On 2019-09-27, Bonita Montero wrote:   
   >   
   > bool hasTSX()   
   > {   
   > #if defined(_MSC_VER)   
   > int regs[4];   
   > __cpuidex( regs, 7, 0 );   
   > return regs[1] & (1 << 11);   
   > #else   
   > return true;   
   > #endif   
   > }   
   >   
   void cpuid(int CPUInfo[4],int InfoType){   
    __asm__ __volatile__ (   
    "cpuid":   
    "=a" (CPUInfo[0]),   
    "=b" (CPUInfo[1]),   
    "=c" (CPUInfo[2]),   
    "=d" (CPUInfo[3]) :   
    "a" (InfoType), "c" (0)   
    );   
   }   
   bool rtmSupported()   
   {   
    int info[4];   
    cpuid(info, 0);   
    int nIds = info[0];   
    if (nIds >= 0x00000001){   
    cpuid(info,0x00000007);   
      
    return (info[2] & ((int)1 << 11)) != 0;   
    }   
    return false;   
   }   
   Someone should correct me if I am wrong...   
      
   --   
   press any key to continue or any other to quit...   
   U niÄ   
   emu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec   
   Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi   
   bili naoruzani. -- Mladen Gogala   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|