revert to the behavior before v5.84 if -fno-operator-names is defined
diff --git a/readme.md b/readme.md
index 89e3144..fecf4f3 100644
--- a/readme.md
+++ b/readme.md
@@ -1,5 +1,5 @@
-# Xbyak 5.85 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
+# Xbyak 5.86 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
## Abstract
@@ -11,9 +11,8 @@
* fully support AVX-512
**Note**:
-The default setting has changed: `XBYAK_NO_OP_NAMES` is defined unless `XBYAK_USE_OP_NAMES` is defined.
-Use `and_()`, `or_(), ... instead of `and()`, `or()`.
-If you want to use `and()`, `or()`,... then specify `-DXBYAK_USE_OP_NAMES -fno-operator-names` option to gcc/clang.
+Use `and_()`, `or_()`, ... instead of `and()`, `or()`.
+If you want to use them, then specify `-fno-operator-names` option to gcc/clang.
### Supported OS
@@ -397,6 +396,7 @@
http://opensource.org/licenses/BSD-3-Clause
## History
+* 2019/Dec/13 ver 5.86 [changed] revert to the behavior before v5.84 if -fno-operator-names is defined (and() is available)
* 2019/Dec/07 ver 5.85 append MAP_JIT flag to mmap for macOS mojave or later
* 2019/Nov/29 ver 5.84 [changed] XBYAK_NO_OP_NAMES is defined unless XBYAK_USE_OP_NAMES is defined
* 2019/Oct/12 ver 5.83 exit(1) was removed
diff --git a/readme.txt b/readme.txt
index 48d1206..2bcc735 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,5 +1,5 @@
- C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 5.85
+ C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 5.86
-----------------------------------------------------------------------------
◎概要
@@ -22,10 +22,8 @@
Intel Mac
などで動作確認をしています。
-※ Xbyakはデフォルトでand(), or(), xor(), not()関数を使います。
-gccではそれらを演算子として解釈してしまうため、-fno-operator-namesオプションを追加してコンパイルしてください。
-あるいはXBYAK_NO_OP_NAMESを定義してand_(), or_(), xor_(), not_()を使ってください。
-and_(), or_(), xor_(), not_()はXBYAK_NO_OP_NAMESされていないときでも使えます。
+※ and, orなどの代わりにand_, or_を使用してください。
+and, orなどを使いたい場合は-fno-operator-namesをgcc/clangに指定してください。
-----------------------------------------------------------------------------
◎準備
@@ -373,6 +371,7 @@
-----------------------------------------------------------------------------
◎履歴
+2019/12/13 ver 5.86 [変更] -fno-operator-namesが指定されたときは5.84以前の挙動に戻す
2019/12/07 ver 5.85 mmapにMAP_JITフラグを追加(macOS mojave以上)
2019/11/29 ver 5.84 [変更] XBYAK_USE_OP_NAMESが定義されていない限りXBYAK_NO_OP_NAMESが定義されるように変更
2019/10/12 ver 5.83 exit(1)の除去
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index 939ffee..5c29899 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -9,14 +9,9 @@
@note modified new BSD license
http://opensource.org/licenses/BSD-3-Clause
*/
-#if !defined(XBYAK_USE_OP_NAMES) && !defined(XBYAK_NO_OP_NAMES)
+#if (not +0) && !defined(XBYAK_NO_OP_NAMES) // trick to detect whether 'not' is operator or not
#define XBYAK_NO_OP_NAMES
#endif
-#ifndef XBYAK_NO_OP_NAMES
- #if not +0 // trick to detect whether 'not' is operator or not
- #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
#include <stdio.h> // for debug print
#include <assert.h>
@@ -120,7 +115,7 @@
enum {
DEFAULT_MAX_CODE_SIZE = 4096,
- VERSION = 0x5850 /* 0xABCD = A.BC(D) */
+ VERSION = 0x5860 /* 0xABCD = A.BC(D) */
};
#ifndef MIE_INTEGER_TYPE_DEFINED
diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h
index 457a641..c398db2 100644
--- a/xbyak/xbyak_mnemonic.h
+++ b/xbyak/xbyak_mnemonic.h
@@ -1,4 +1,4 @@
-const char *getVersionString() const { return "5.85"; }
+const char *getVersionString() const { return "5.86"; }
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); }