Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
herumi committed Aug 29, 2024
2 parents aabb091 + fd77bc7 commit ccdf684
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
1 change: 1 addition & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 5 additions & 10 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
project(
'xbyak',
'cpp',
version: '7.07',
version: '7.07.1',
license: 'BSD-3-Clause',
default_options: 'b_ndebug=if-release'
)
Expand All @@ -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()
Expand All @@ -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
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -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)*

Expand Down
3 changes: 2 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -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

-----------------------------------------------------------------------------
◎概要
Expand Down Expand Up @@ -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()の修正
Expand Down
16 changes: 8 additions & 8 deletions sample/bf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Brainfuck : public Xbyak::CodeGenerator {
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);
Expand All @@ -42,7 +42,7 @@ class Brainfuck : public Xbyak::CodeGenerator {
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);
Expand All @@ -53,7 +53,7 @@ class Brainfuck : public Xbyak::CodeGenerator {
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);
Expand All @@ -80,7 +80,7 @@ class Brainfuck : public Xbyak::CodeGenerator {
case '<':
{
int count = getContinuousChar(is, c);
add(stack, 4 * (c == '>' ? count : -count));
add(stack, (c == '>' ? count : -count));
}
break;
case '.':
Expand All @@ -89,12 +89,12 @@ class Brainfuck : public Xbyak::CodeGenerator {
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;
Expand All @@ -106,13 +106,13 @@ class Brainfuck : public Xbyak::CodeGenerator {
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);
Expand Down
3 changes: 2 additions & 1 deletion xbyak/xbyak.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -2999,6 +2999,7 @@ class CodeGenerator : public CodeArray {
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())));
}

Expand Down
2 changes: 1 addition & 1 deletion xbyak/xbyak_mnemonic.h
Original file line number Diff line number Diff line change
@@ -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); }
Expand Down

0 comments on commit ccdf684

Please sign in to comment.