From 78b4407869f2d89c72cf7139c2df9a438993307d Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Wed, 21 Aug 2024 11:18:12 +0900 Subject: [sample] resize stack element --- sample/bf.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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); -- cgit v1.2.3 From 9dabf91d285efb25e80894671a5c811b218ccb68 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Wed, 21 Aug 2024 17:03:04 +0900 Subject: adapt to NASM 2.16.03 behavior to pass tests though xchg X,Y == xchg Y,X --- xbyak/xbyak.h | 1 + 1 file changed, 1 insertion(+) diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h index e7459d3..dd54e71 100644 --- a/xbyak/xbyak.h +++ b/xbyak/xbyak.h @@ -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(*p1), *p2, 0, 0x86 | (p1->isBit(8) ? 0 : 1), (p1->isREG() && (p1->getBit() == p2->getBit()))); } -- cgit v1.2.3 From 38e5e7b93197de8a73f053cd4bb7acb865e5040b Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Wed, 28 Aug 2024 16:35:38 +0200 Subject: Revert move of .pc and .cmake files to arch-independent dirs This reverts commit 6c593b9a10e450f342efc1cf871dbcf7bb3612fe, 9f535729159baf467c3bd8dc7ec017a40289a12c, and c7c1eac070851068d7adc3a67ad2efd196145687 Closes: #189 --- meson.build | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/meson.build b/meson.build index 6a04b92..11458fd 100644 --- a/meson.build +++ b/meson.build @@ -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 -- cgit v1.2.3 From fd77bc7e00d2af3ad119c98f4d7829632dd9a894 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Thu, 29 Aug 2024 09:52:41 +0900 Subject: v7.07.1 --- CMakeLists.txt | 2 +- doc/changelog.md | 1 + meson.build | 2 +- readme.md | 2 +- readme.txt | 3 ++- xbyak/xbyak.h | 2 +- xbyak/xbyak_mnemonic.h | 2 +- 7 files changed, 8 insertions(+), 6 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 11458fd..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' ) 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/xbyak/xbyak.h b/xbyak/xbyak.h index dd54e71..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 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 ®) { opMR(addr, reg, T_0F38, 0x0FC, T_APX); } void aand(const Address& addr, const Reg32e ®) { 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); } -- cgit v1.2.3