x86emitter: add BMI1 & BMI2 instruction detection

This commit is contained in:
Gregory Hainaut 2016-01-09 22:31:49 +01:00
parent d57466608e
commit 29b0b17f50
2 changed files with 5 additions and 0 deletions

View File

@ -90,6 +90,8 @@ public:
u32 hasStreamingSIMD4Extensions2 :1;
u32 hasAVX :1;
u32 hasAVX2 :1;
u32 hasBMI1 :1;
u32 hasBMI2 :1;
u32 hasFMA :1;
// AMD-specific CPU Features

View File

@ -278,6 +278,9 @@ void x86capabilities::Identify()
}
}
hasBMI1 = ( SEFlag >> 3 ) & 1;
hasBMI2 = ( SEFlag >> 8 ) & 1;
// Ones only for AMDs:
hasMultimediaExtensionsExt = ( EFlags >> 22 ) & 1; //mmx2
hasAMD64BitArchitecture = ( EFlags >> 29 ) & 1; //64bit cpu