aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--readme.md3
-rw-r--r--readme.txt3
-rw-r--r--test/make_nm.cpp28
-rw-r--r--xbyak/xbyak.h6
-rw-r--r--xbyak/xbyak_mnemonic.h2
5 files changed, 36 insertions, 6 deletions
diff --git a/readme.md b/readme.md
index dec8fec..02261af 100644
--- a/readme.md
+++ b/readme.md
@@ -1,6 +1,6 @@
[![Build Status](https://travis-ci.org/herumi/xbyak.png)](https://travis-ci.org/herumi/xbyak)
-# Xbyak 5.941 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
+# Xbyak 5.95 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
## Abstract
@@ -16,6 +16,7 @@ Use `and_()`, `or_()`, ... instead of `and()`, `or()`.
If you want to use them, then specify `-fno-operator-names` option to gcc/clang.
### News
+- (break backward compatibility) `push(byte, imm)` (resp. `push(word, imm)`) forces to cast `imm` to 8(resp. 16) bit.
- (Windows) `#include <winsock2.h>` has been removed from xbyak.h, so add it explicitly if you need it.
- support exception-less mode see. [Exception-less mode](#exception-less-mode)
- `XBYAK_USE_MMAP_ALLOCATOR` will be defined on Linux/macOS unless `XBYAK_DONT_USE_MMAP_ALLOCATOR` is defined.
diff --git a/readme.txt b/readme.txt
index ab0b119..bd815a4 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,5 +1,5 @@
- C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 5.941
+ C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 5.95
-----------------------------------------------------------------------------
◎概要
@@ -34,6 +34,7 @@ xbyak_bin2hex.h
Linuxではmake installで/usr/local/include/xbyakにコピーされます。
-----------------------------------------------------------------------------
◎下位互換性の破れ
+* push byte, immまたはpush word, immが下位8bit, 16bitにキャストした値を使うように変更。
* (Windows) `<winsock2.h>`をincludeしなくなったので必要なら明示的にincludeしてください。
* XBYAK_USE_MMAP_ALLOCATORがデフォルトで有効になりました。従来の方式にする場合はXBYAK_DONT_USE_MMAP_ALLOCATORを定義してください。
* Xbyak::Errorの型をenumからclassに変更
diff --git a/test/make_nm.cpp b/test/make_nm.cpp
index fc46eb6..e3acf94 100644
--- a/test/make_nm.cpp
+++ b/test/make_nm.cpp
@@ -1145,6 +1145,33 @@ class Test {
put("pop", REG32|MEM32);
#endif
}
+ void putPushPop8_16() const
+ {
+ const struct {
+ int b;
+ uint32_t v;
+ } tbl[] = {
+ { 8, 0x7f },
+ { 8, 0x80 },
+ { 8, 0xff },
+ { 8, 0x100 },
+ { 8, 0x12345 },
+ { 16, 0x7fff },
+ { 16, 0x8000 },
+ { 16, 0xffff },
+ { 16, 0x10000 },
+ { 16, 0x12345 },
+ };
+ for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
+ const char *b = tbl[i].b == 8 ? "byte" : "word";
+ uint32_t v = tbl[i].v;
+ if (isXbyak_) {
+ printf("push(%s, 0x%x);dump();\n", b, v);
+ } else {
+ printf("push %s 0x%x\n", b, v);
+ }
+ }
+ }
void putTest() const
{
const char *p = "test";
@@ -2496,6 +2523,7 @@ public:
separateFunc();
putSSE4_2();
putSeg(); // same behavior as yasm for mov rax, cx
+ putPushPop8_16();
#else
putSIMPLE();
putReg1();
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index 6896264..035ea85 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -126,7 +126,7 @@ namespace Xbyak {
enum {
DEFAULT_MAX_CODE_SIZE = 4096,
- VERSION = 0x5941 /* 0xABCD = A.BC(D) */
+ VERSION = 0x5950 /* 0xABCD = A.BC(D) */
};
#ifndef MIE_INTEGER_TYPE_DEFINED
@@ -2433,9 +2433,9 @@ public:
void pop(const Operand& op) { opPushPop(op, 0x8F, 0, 0x58); }
void push(const AddressFrame& af, uint32 imm)
{
- if (af.bit_ == 8 && inner::IsInDisp8(imm)) {
+ if (af.bit_ == 8) {
db(0x6A); db(imm);
- } else if (af.bit_ == 16 && isInDisp16(imm)) {
+ } else if (af.bit_ == 16) {
db(0x66); db(0x68); dw(imm);
} else {
db(0x68); dd(imm);
diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h
index 393a8dc..73f16ab 100644
--- a/xbyak/xbyak_mnemonic.h
+++ b/xbyak/xbyak_mnemonic.h
@@ -1,4 +1,4 @@
-const char *getVersionString() const { return "5.941"; }
+const char *getVersionString() const { return "5.95"; }
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); }