aboutsummaryrefslogtreecommitdiffhomepage
path: root/readme.md
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2019-12-18 19:15:34 +0900
committerMITSUNARI Shigeo <[email protected]>2019-12-19 11:08:32 +0900
commit4da8fd4e6db8827b9cd66763a04e1cb26bcbc57c (patch)
treea17ca1bd0d2d692f2b9810d8907f81e2be45db84 /readme.md
parentda7f731707d7ab19364089c2d4e8073cf639f09f (diff)
downloadxbyak-4da8fd4e6db8827b9cd66763a04e1cb26bcbc57c.tar.gz
xbyak-4da8fd4e6db8827b9cd66763a04e1cb26bcbc57c.zip
add setDefaultJmpNEARv5.87
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md29
1 files changed, 28 insertions, 1 deletions
diff --git a/readme.md b/readme.md
index fecf4f3..5f5820d 100644
--- a/readme.md
+++ b/readme.md
@@ -1,5 +1,5 @@
-# Xbyak 5.86 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
+# Xbyak 5.87 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
## Abstract
@@ -216,6 +216,32 @@ void func1()
}
```
+### short and long jump
+Xbyak deals with jump mnemonics of an undefined label as short jump if no type is specified.
+So if the size between jmp and label is larger than 127 byte, then xbyak will cause an error.
+
+```
+jmp("short-jmp"); // short jmp
+// small code
+L("short-jmp");
+
+jmp("long-jmp");
+// long code
+L("long-jmp"); // throw exception
+```
+Then specify T_NEAR for jmp.
+```
+jmp("long-jmp", T_NEAR); // long jmp
+// long code
+L("long-jmp");
+```
+Or call `setDefaultJmpNEAR(true);` once, then the default type is set to T_NEAR.
+```
+jmp("long-jmp"); // long jmp
+// long code
+L("long-jmp");
+```
+
### Label class
`L()` and `jxx()` support Label class.
@@ -396,6 +422,7 @@ modified new BSD License
http://opensource.org/licenses/BSD-3-Clause
## History
+* 2019/Dec/19 ver 5.87 add setDefaultJmpNEAR(), which deals with `jmp` of an undefined label as T_NEAR if no type is specified.
* 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