aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--doc/changelog.md1
-rw-r--r--meson.build15
-rw-r--r--readme.md2
-rw-r--r--readme.txt3
-rw-r--r--sample/bf.cpp16
-rw-r--r--xbyak/xbyak.h3
-rw-r--r--xbyak/xbyak_mnemonic.h2
8 files changed, 21 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 598836a..70c4314 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5)
-project(xbyak LANGUAGES CXX VERSION 7.07)
+project(xbyak LANGUAGES CXX VERSION 7.07.1)
file(GLOB headers xbyak/*.h)
diff --git a/doc/changelog.md b/doc/changelog.md
index b67be4f..7b390a8 100644
--- a/doc/changelog.md
+++ b/doc/changelog.md
@@ -1,5 +1,6 @@
# History
+* 2024/Aug/29 ver 7.07.1 adapt to NASM 2.16.03 output of xchg (The functionality stays the same.)
* 2024/Jun/11 ver 7.07 support xresldtrk/xsusldtrk
* 2024/Mar/07 ver 7.06 Xbyak::util::Cpu supports AMD processor
* 2024/Feb/11 ver 7.05.1 fix extractBit() in util::Cpu and align() for autoGrow mode
diff --git a/meson.build b/meson.build
index 6a04b92..f53bea2 100644
--- a/meson.build
+++ b/meson.build
@@ -5,7 +5,7 @@
project(
'xbyak',
'cpp',
- version: '7.07',
+ version: '7.07.1',
license: 'BSD-3-Clause',
default_options: 'b_ndebug=if-release'
)
@@ -22,19 +22,15 @@ import('pkgconfig').generate(
name: meson.project_name(),
description: 'JIT assembler for x86(IA32), x64(AMD64, x86-64)',
version: meson.project_version(),
- url: 'https://github.com/herumi/xbyak',
- install_dir: get_option('datadir')/'pkgconfig'
+ url: 'https://github.com/herumi/xbyak'
)
-if meson.version().version_compare('>=0.62.0')
+if meson.version().version_compare('>=0.50.0')
cmake = import('cmake')
- shared_cmake_dir = get_option('datadir')/'cmake'/meson.project_name()
cmake.write_basic_package_version_file(
name: meson.project_name(),
- version: meson.project_version(),
- install_dir: shared_cmake_dir,
- arch_independent: true
+ version: meson.project_version()
)
cmake_conf = configuration_data()
@@ -44,7 +40,6 @@ if meson.version().version_compare('>=0.62.0')
cmake.configure_package_config_file(
name: meson.project_name(),
input: 'cmake'/'meson-config.cmake.in',
- configuration: cmake_conf,
- install_dir: shared_cmake_dir,
+ configuration: cmake_conf
)
endif
diff --git a/readme.md b/readme.md
index c93dc07..cede3ea 100644
--- a/readme.md
+++ b/readme.md
@@ -1,5 +1,5 @@
-# Xbyak 7.07 [![Badge Build]][Build Status]
+# Xbyak 7.07.1 [![Badge Build]][Build Status]
*A C++ JIT assembler for x86 (IA32), x64 (AMD64, x86-64)*
diff --git a/readme.txt b/readme.txt
index bcc96aa..1acca54 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,5 +1,5 @@
- C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 7.07
+ C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 7.07.1
-----------------------------------------------------------------------------
◎概要
@@ -404,6 +404,7 @@ sample/{echo,hello}.bfは http://www.kmonos.net/alang/etc/brainfuck.php から
-----------------------------------------------------------------------------
◎履歴
+2024/08/29 ver 7.07.1 xchgの仕様をnasm 2.16.03の挙動に合わせる。
2024/06/11 ver 7.07 xresldtrk/xsusldtrkサポート
2024/03/07 ver 7.06 util::Cpuのキャッシュ判定周りがAMD CPU対応
2024/02/11 ver 7.05.1 util::CpuのextractBit()とautoGrowモードでのalign()の修正
diff --git a/sample/bf.cpp b/sample/bf.cpp
index 2abb8a5..657c87c 100644
--- a/sample/bf.cpp
+++ b/sample/bf.cpp
@@ -30,7 +30,7 @@ public:
const Reg32& pPutchar(esi);
const Reg32& pGetchar(edi);
const Reg32& stack(ebp);
- const Address cur = dword [stack];
+ const Address cur = byte [stack];
push(ebp); // stack
push(esi);
push(edi);
@@ -42,7 +42,7 @@ public:
const Reg64& pPutchar(rsi);
const Reg64& pGetchar(rdi);
const Reg64& stack(rbp); // stack
- const Address cur = dword [stack];
+ const Address cur = byte [stack];
push(rsi);
push(rdi);
push(rbp);
@@ -53,7 +53,7 @@ public:
const Reg64& pPutchar(rbx);
const Reg64& pGetchar(rbp);
const Reg64& stack(r12); // stack
- const Address cur = dword [stack];
+ const Address cur = byte [stack];
push(rbx);
push(rbp);
push(r12);
@@ -80,7 +80,7 @@ public:
case '<':
{
int count = getContinuousChar(is, c);
- add(stack, 4 * (c == '>' ? count : -count));
+ add(stack, (c == '>' ? count : -count));
}
break;
case '.':
@@ -89,12 +89,12 @@ public:
call(pPutchar);
pop(eax);
#elif defined(XBYAK64_WIN)
- mov(ecx, cur);
+ movzx(ecx, cur);
sub(rsp, 32);
call(pPutchar);
add(rsp, 32);
#else
- mov(edi, cur);
+ movzx(edi, cur);
call(pPutchar);
#endif
break;
@@ -106,13 +106,13 @@ public:
call(pGetchar);
add(rsp, 32);
#endif
- mov(cur, eax);
+ mov(cur, al);
break;
case '[':
{
Label B = L();
labelB.push(B);
- mov(eax, cur);
+ movzx(eax, cur);
test(eax, eax);
Label F;
jz(F, T_NEAR);
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index e7459d3..e67de82 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -155,7 +155,7 @@ namespace Xbyak {
enum {
DEFAULT_MAX_CODE_SIZE = 4096,
- VERSION = 0x7070 /* 0xABCD = A.BC(.D) */
+ VERSION = 0x7071 /* 0xABCD = A.BC(.D) */
};
#ifndef MIE_INTEGER_TYPE_DEFINED
@@ -2999,6 +2999,7 @@ public:
rex(*p2, *p1); db(0x90 | (p2->getIdx() & 7));
return;
}
+ if (p1->isREG() && p2->isREG()) std::swap(p1, p2); // adapt to NASM 2.16.03 behavior to pass tests
opRO(static_cast<const Reg&>(*p1), *p2, 0, 0x86 | (p1->isBit(8) ? 0 : 1), (p1->isREG() && (p1->getBit() == p2->getBit())));
}
diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h
index 1b57173..6eb3d63 100644
--- a/xbyak/xbyak_mnemonic.h
+++ b/xbyak/xbyak_mnemonic.h
@@ -1,4 +1,4 @@
-const char *getVersionString() const { return "7.07"; }
+const char *getVersionString() const { return "7.07.1"; }
void aadd(const Address& addr, const Reg32e &reg) { opMR(addr, reg, T_0F38, 0x0FC, T_APX); }
void aand(const Address& addr, const Reg32e &reg) { opMR(addr, reg, T_0F38|T_66, 0x0FC, T_APX|T_66); }
void adc(const Operand& op, uint32_t imm) { opOI(op, imm, 0x10, 2); }