recover Xbyak::CastTo
diff --git a/readme.md b/readme.md
index 38297fb..3e3de20 100644
--- a/readme.md
+++ b/readme.md
@@ -1,5 +1,5 @@
-# Xbyak 5.75 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
+# Xbyak 5.751 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
## Abstract
@@ -392,6 +392,7 @@
http://opensource.org/licenses/BSD-3-Clause
## History
+* 2018/Oct/31 ver 5.751 recover Xbyak::CastTo for compatibility
* 2018/Oct/29 ver 5.75 unlink LabelManager from Label when msg is destroyed
* 2018/Oct/21 ver 5.74 support RegRip +/- int. Xbyak::CastTo is removed
* 2018/Oct/15 util::AddressFrame uses push/pop instead of mov
diff --git a/readme.txt b/readme.txt
index ee0a578..b096a12 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,5 +1,5 @@
- C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 5.75
+ C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 5.751
-----------------------------------------------------------------------------
◎概要
@@ -373,8 +373,9 @@
-----------------------------------------------------------------------------
◎履歴
-2018/10/29 LabelManagerのデストラクタでLabelから参照を切り離す
-2018/10/21 RegRip +/intの形をサポート Xbyak::CastToを削除
+2018/10/31 ver 5.751 互換性のためにXbyak::CastToの復元
+2018/10/29 ver 5.75 LabelManagerのデストラクタでLabelから参照を切り離す
+2018/10/21 ver 5.74 RegRip +/intの形をサポート Xbyak::CastToを削除
2018/10/15 util::StackFrameでmovの代わりにpush/popを使う
2018/09/19 ver 5.73 vpslld, vpslldq, vpsllwなどの(reg, mem, imm8)に対するevexエンコーディング修整
2018/09/19 ver 5.72 fix the encoding of vinsertps for disp8N(Thanks to petercaday)
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index 03a2419..bcfeb34 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -113,7 +113,7 @@
enum {
DEFAULT_MAX_CODE_SIZE = 4096,
- VERSION = 0x5750 /* 0xABCD = A.BC(D) */
+ VERSION = 0x5751 /* 0xABCD = A.BC(D) */
};
#ifndef MIE_INTEGER_TYPE_DEFINED
@@ -283,6 +283,11 @@
#endif
}
+template<class To, class From>
+inline const To CastTo(From p) throw()
+{
+ return (const To)(size_t)(p);
+}
namespace inner {
static const size_t ALIGN_PAGE_SIZE = 4096;
diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h
index 4f81090..766f2f6 100644
--- a/xbyak/xbyak_mnemonic.h
+++ b/xbyak/xbyak_mnemonic.h
@@ -1,4 +1,4 @@
-const char *getVersionString() const { return "5.75"; }
+const char *getVersionString() const { return "5.751"; }
void adc(const Operand& op, uint32 imm) { opRM_I(op, imm, 0x10, 2); }
void adc(const Operand& op1, const Operand& op2) { opRM_RM(op1, op2, 0x10); }
void adcx(const Reg32e& reg, const Operand& op) { opGen(reg, op, 0xF6, 0x66, isREG32_REG32orMEM, NONE, 0x38); }