mirror of
https://github.com/herumi/xbyak
synced 2024-11-21 16:09:11 -07:00
add detection of rdrand to Xbyak::util::Cpu
This commit is contained in:
parent
73da31f5c8
commit
38d3d7074f
6 changed files with 9 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
|
||||
Xbyak 4.51 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
|
||||
Xbyak 4.52 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
|
||||
=============
|
||||
|
||||
Abstract
|
||||
|
@ -269,6 +269,7 @@ The header files under xbyak/ are independent of cybozulib.
|
|||
|
||||
History
|
||||
-------------
|
||||
* 2014/Apr/11 ver 4.52 add detection of rdrand
|
||||
* 2014/Mar/25 ver 4.51 remove state information of unreferenced labels
|
||||
* 2014/Mar/16 ver 4.50 support new Label
|
||||
* 2014/Mar/05 ver 4.40 fix wrong detection of BMI/enhanced rep on VirtualBox
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 4.51
|
||||
C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 4.52
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
◎概要
|
||||
|
@ -285,6 +285,7 @@ cybozulibは単体テストでのみ利用されていて、xbyak/ディレク
|
|||
-----------------------------------------------------------------------------
|
||||
◎履歴
|
||||
|
||||
2014/04/11 ver 4.52 rdrandの判定追加
|
||||
2014/03/25 ver 4.51 参照されなくなったラベルの状態を削除する
|
||||
2014/03/16 ver 4.50 新しいラベルクラスのサポート
|
||||
2014/03/05 ver 4.40 VirtualBox上でBMI/enhanced repのサポート判定を間違うことがあるのを修正
|
||||
|
|
|
@ -48,6 +48,7 @@ void putCPUinfo()
|
|||
{ Cpu::tBMI2, "bmi2" },
|
||||
{ Cpu::tLZCNT, "lzcnt" },
|
||||
{ Cpu::tENHANCED_REP, "enh_rep" },
|
||||
{ Cpu::tRDRAND, "rdrand" },
|
||||
};
|
||||
for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
|
||||
if (cpu.has(tbl[i].type)) printf(" %s", tbl[i].str);
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace Xbyak {
|
|||
|
||||
enum {
|
||||
DEFAULT_MAX_CODE_SIZE = 4096,
|
||||
VERSION = 0x4510 /* 0xABCD = A.BC(D) */
|
||||
VERSION = 0x4520 /* 0xABCD = A.BC(D) */
|
||||
};
|
||||
|
||||
#ifndef MIE_INTEGER_TYPE_DEFINED
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const char *getVersionString() const { return "4.51"; }
|
||||
const char *getVersionString() const { return "4.52"; }
|
||||
void packssdw(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x6B); }
|
||||
void packsswb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x63); }
|
||||
void packuswb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x67); }
|
||||
|
|
|
@ -154,6 +154,7 @@ public:
|
|||
tGPR2 = tBMI2, // backward compatibility
|
||||
tLZCNT = 1 << 23,
|
||||
tENHANCED_REP = 1 << 26, // enhanced rep movsb/stosb
|
||||
tRDRAND = 1 << 27,
|
||||
|
||||
tINTEL = 1 << 24,
|
||||
tAMD = 1 << 25
|
||||
|
@ -190,6 +191,7 @@ public:
|
|||
if (data[2] & (1U << 25)) type_ |= tAESNI;
|
||||
if (data[2] & (1U << 1)) type_ |= tPCLMULQDQ;
|
||||
if (data[2] & (1U << 27)) type_ |= tOSXSAVE;
|
||||
if (data[2] & (1U << 30)) type_ |= tRDRAND;
|
||||
|
||||
if (data[3] & (1U << 15)) type_ |= tCMOV;
|
||||
if (data[3] & (1U << 23)) type_ |= tMMX;
|
||||
|
|
Loading…
Reference in a new issue