mirror of
https://github.com/herumi/xbyak
synced 2024-11-21 16:09:11 -07:00
add to detect enhanced rep movsb/stosb
This commit is contained in:
parent
c2fde4e2a6
commit
bed8fae6e7
5 changed files with 5 additions and 2 deletions
|
@ -47,6 +47,7 @@ void putCPUinfo()
|
|||
{ Cpu::tBMI1, "bmi1" },
|
||||
{ Cpu::tBMI2, "bmi2" },
|
||||
{ Cpu::tLZCNT, "lzcnt" },
|
||||
{ Cpu::tENHANCED_REP, "enh_rep" },
|
||||
};
|
||||
for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
|
||||
if (cpu.has(tbl[i].type)) printf(" %s", tbl[i].str);
|
||||
|
|
0
test/test_address.sh
Executable file → Normal file
0
test/test_address.sh
Executable file → Normal file
0
test/test_avx.sh
Executable file → Normal file
0
test/test_avx.sh
Executable file → Normal file
0
test/test_nm.sh
Executable file → Normal file
0
test/test_nm.sh
Executable file → Normal file
|
@ -153,6 +153,7 @@ public:
|
|||
tGPR1 = tBMI1, // backward compatibility
|
||||
tGPR2 = tBMI2, // backward compatibility
|
||||
tLZCNT = 1 << 23,
|
||||
tENHANCED_REP = 1 << 26, // enhanced rep movsb/stosb
|
||||
|
||||
tINTEL = 1 << 24,
|
||||
tAMD = 1 << 25
|
||||
|
@ -204,8 +205,9 @@ public:
|
|||
}
|
||||
getCpuidEx(7, 0, data);
|
||||
if (type_ & tAVX && data[1] & 0x20) type_ |= tAVX2;
|
||||
if (data[1] & (1U << 3)) type_ |= tGPR1;
|
||||
if (data[1] & (1U << 8)) type_ |= tGPR2;
|
||||
if (data[1] & (1U << 3)) type_ |= tBMI1;
|
||||
if (data[1] & (1U << 8)) type_ |= tBMI2;
|
||||
if (data[1] & (1U << 9)) type_ |= tENHANCED_REP;
|
||||
setFamily();
|
||||
}
|
||||
void putFamily()
|
||||
|
|
Loading…
Reference in a new issue