aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--readme.md3
-rw-r--r--readme.txt3
-rw-r--r--test/Makefile2
-rw-r--r--xbyak/xbyak.h18
-rw-r--r--xbyak/xbyak_mnemonic.h2
5 files changed, 21 insertions, 7 deletions
diff --git a/readme.md b/readme.md
index 38046ef..3efe104 100644
--- a/readme.md
+++ b/readme.md
@@ -1,5 +1,5 @@
-Xbyak 3.72 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
+Xbyak 3.73 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
=============
Abstract
@@ -223,6 +223,7 @@ http://opensource.org/licenses/BSD-3-Clause
History
-------------
+* 2013/Jan/06 ver 3.73 use unordered_map if possible
* 2012/Dec/04 ver 3.72 eax, ebx, ... are member variables of CodeGenerator(revert), Xbyak::util::eax, ... are static const.
* 2012/Nov/17 ver 3.71 and_(), or_(), xor_(), not_() are available if XBYAK_NO_OP_NAMES is not defined.
* 2012/Nov/17 change eax, ebx, ptr and so on in CodeGenerator as static member and alias of them are defined in Xbyak::util.
diff --git a/readme.txt b/readme.txt
index a0f42fc..34ab961 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,5 +1,5 @@
- C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak version 3.72
+ C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak version 3.73
-----------------------------------------------------------------------------
◎概要
@@ -244,6 +244,7 @@ sample/{echo,hello}.bfは http://www.kmonos.net/alang/etc/brainfuck.php から
-----------------------------------------------------------------------------
◎履歴
+2013/01/06 ver 3.73 可能ならunordered_mapを使う
2012/12/04 ver 3.72 eaxなどをCodeGeneratorのメンバ変数に戻す. Xbyak::util::eaxはstatic const変数
2012/11/17 ver 3.71 and_(), or_(), xor_(), not_()をXBYAK_NO_OP_NAMESが定義されていないときでも使えるようにした
2012/11/17 CodeGeneratorのeax, ecx, ptrなどのメンバ変数をstaticにし,const参照をXbyak::utilにも定義
diff --git a/test/Makefile b/test/Makefile
index 7fe9cd8..8789314 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -14,7 +14,7 @@ all: $(TARGET)
CFLAGS_WARN=-Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith
-CFLAGS=-O2 -fomit-frame-pointer -Wall -fno-operator-names -I../ $(CFLAGS_WARN)
+CFLAGS=-O2 -fomit-frame-pointer -Wall -fno-operator-names -I../ $(CFLAGS_WARN) #-std=c++0x
make_nm:
$(CXX) $(CFLAGS) make_nm.cpp -o $@
normalize_prefix: normalize_prefix.cpp ../xbyak/xbyak.h
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index 0125977..c35bf92 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -14,10 +14,17 @@
#error "use -fno-operator-names option if you want to use and(), or(), xor(), not() as function names, Or define XBYAK_NO_OP_NAMES and use and_(), or_(), xor_(), not_()."
#endif
#endif
+#if (__cplusplus >= 201103) || (_MSC_VER >= 1500) || defined(__GXX_EXPERIMENTAL_CXX0X__)
+ #define XBYAK_USE_UNORDERED_MAP
+#endif
#include <stdio.h> // for debug print
#include <assert.h>
+#ifdef XBYAK_USE_UNORDERED_MAP
+#include <unordered_map>
+#else
#include <map>
+#endif
#include <list>
#include <string>
#include <algorithm>
@@ -57,7 +64,7 @@ namespace Xbyak {
enum {
DEFAULT_MAX_CODE_SIZE = 4096,
- VERSION = 0x3720 /* 0xABCD = A.BC(D) */
+ VERSION = 0x3730 /* 0xABCD = A.BC(D) */
};
#ifndef MIE_INTEGER_TYPE_DEFINED
@@ -743,8 +750,13 @@ class Label {
int stackPos_;
int usedCount_;
int localCount_; // for .***
- typedef std::map<const std::string, size_t> DefinedList;
- typedef std::multimap<const std::string, const JmpLabel> UndefinedList;
+#ifdef XBYAK_USE_UNORDERED_MAP
+ typedef std::unordered_map<std::string, size_t> DefinedList;
+ typedef std::unordered_multimap<std::string, const JmpLabel> UndefinedList;
+#else
+ typedef std::map<std::string, size_t> DefinedList;
+ typedef std::multimap<std::string, const JmpLabel> UndefinedList;
+#endif
DefinedList definedList_;
UndefinedList undefinedList_;
diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h
index 6fc7083..20c1a84 100644
--- a/xbyak/xbyak_mnemonic.h
+++ b/xbyak/xbyak_mnemonic.h
@@ -1,4 +1,4 @@
-const char *getVersionString() const { return "3.72"; }
+const char *getVersionString() const { return "3.73"; }
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); }