diff options
author | MITSUNARI Shigeo <[email protected]> | 2014-04-11 06:30:46 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2014-04-11 06:30:46 +0900 |
commit | 38d3d7074feda2cd6a0e71b5fb2b46adeb9a7829 (patch) | |
tree | 843e5044ee9984cfab0526b973da13e6b985c057 | |
parent | 73da31f5c8b464000f86c3b5dd8950b617a7f39c (diff) | |
download | xbyak-38d3d7074feda2cd6a0e71b5fb2b46adeb9a7829.tar.gz xbyak-38d3d7074feda2cd6a0e71b5fb2b46adeb9a7829.zip |
add detection of rdrand to Xbyak::util::Cpu
-rw-r--r-- | readme.md | 3 | ||||
-rw-r--r-- | readme.txt | 3 | ||||
-rw-r--r-- | sample/test_util.cpp | 1 | ||||
-rw-r--r-- | xbyak/xbyak.h | 2 | ||||
-rw-r--r-- | xbyak/xbyak_mnemonic.h | 2 | ||||
-rw-r--r-- | xbyak/xbyak_util.h | 2 |
6 files changed, 9 insertions, 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のサポート判定を間違うことがあるのを修正
diff --git a/sample/test_util.cpp b/sample/test_util.cpp index 6146731..9dec376 100644 --- a/sample/test_util.cpp +++ b/sample/test_util.cpp @@ -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); diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h index c21d2a6..f8157d2 100644 --- a/xbyak/xbyak.h +++ b/xbyak/xbyak.h @@ -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 diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h index 08785b7..8d053d9 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -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); } diff --git a/xbyak/xbyak_util.h b/xbyak/xbyak_util.h index 5cd9418..51337a6 100644 --- a/xbyak/xbyak_util.h +++ b/xbyak/xbyak_util.h @@ -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; |