Merge branch 'dev'

This commit is contained in:
MITSUNARI Shigeo 2025-02-07 08:24:41 +09:00
commit 0d67fd1530
10 changed files with 21 additions and 39 deletions

View file

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5)
project(xbyak LANGUAGES CXX VERSION 7.23)
project(xbyak LANGUAGES CXX VERSION 7.23.1)
file(GLOB headers xbyak/*.h)

View file

@ -1,5 +1,6 @@
# History
* 2025/Feb/07 ver 7.23.1 revert the behavior of StackFrame::close().
* 2025/Feb/03 ver 7.23 stricter checking of register size, improve handling of 16-bit immediates, change spec of StackFrame::close(), fix push/pop to support APX.
* 2024/Nov/11 ver 7.22 add Reg::cvt{128,256,512}(). tested by xed 2024.11.04
* 2024/Oct/31 ver 7.21 Enhance XMM register validation in SSE instructions

View file

@ -5,7 +5,7 @@
project(
'xbyak',
'cpp',
version: '7.23',
version: '7.23.1',
license: 'BSD-3-Clause',
default_options: 'b_ndebug=if-release'
)

View file

@ -1,5 +1,5 @@
# Xbyak 7.23 [![Badge Build]][Build Status]
# Xbyak 7.23.1 [![Badge Build]][Build Status]
*A JIT assembler for x86/x64 architectures supporting advanced instruction sets up to AVX10.2*

View file

@ -1,5 +1,5 @@
C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 7.23
C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 7.23.1
-----------------------------------------------------------------------------
◎概要
@ -404,7 +404,8 @@ sample/{echo,hello}.bfは http://www.kmonos.net/alang/etc/brainfuck.php から
-----------------------------------------------------------------------------
◎履歴
2025/02/23 ver 7.23 レジスタサイズのチェック厳密化・16ビット側値の範囲改善・StackFrame::close()の仕様変更。push/pop with APX修正。
2025/02/07 ver 7.23.1 StackFrame::close()の挙動を元に戻す
2025/02/07 ver 7.23 レジスタサイズのチェック厳密化・16ビット側値の範囲改善・StackFrame::close()の仕様変更。push/pop with APX修正。
2024/11/11 ver 7.22 Reg::cvt{128,256,512}(). xed 2024.11.04でテスト
2024/10/31 ver 7.21 SSE命令のXMMレジスタのチェックを厳密化
2024/10/17 ver 7.20.1 AVX10.2 rev 2.0仕様書の変更に追従

View file

@ -32,6 +32,7 @@ public:
};
int main()
try
{
// the size of Operand exceeds 32 bit.
CYBOZU_TEST_EQUAL(sizeof(Xbyak::Operand), 8u);
@ -39,4 +40,7 @@ int main()
s.gen();
ErrorSample es;
es.gen();
} catch (std::exception& e) {
fprintf(stderr, "ERR=%s\n", e.what());
return 1;
}

View file

@ -402,35 +402,18 @@ struct CloseCode : Xbyak::CodeGenerator {
case 1:
{
StackFrame sf(this, 0);
StackFrame sf(this, 0, 0, 0, false);
sf.close(); // Explicitly call close().
setProtectModeRE(); // Ensure that no writes occur in destructor by setting read-exec
sf.close();
}
break;
case 2:
{
StackFrame sf(this, 0);
sf.close();
sf.close(); // The second call is ignored.
}
break;
case 3:
{
StackFrame sf(this, 0);
sf.makeEpilog(); // Explicitly call makeEpilog.
// close() is automatically called.
}
break;
case 4:
{
StackFrame sf(this, 0);
sf.makeEpilog(); // Explicitly call makeEpilog.
sf.makeEpilog(); // The second call is also valid.
// close() is automatically called.
StackFrame sf(this, 0, 0, 0, false);
sf.close(); // Explicitly call close().
sf.close(); // Explicitly call close().
setProtectModeRE(); // Ensure that no writes occur in destructor by setting read-exec
}
break;
default:
@ -442,7 +425,7 @@ struct CloseCode : Xbyak::CodeGenerator {
CYBOZU_TEST_AUTO(close)
{
const size_t expectedTbl[] = {
1, 1, 1, 2, 3,
1, 1, 2,
};
for (size_t i = 0; i < sizeof(expectedTbl)/sizeof(expectedTbl[0]); i++) {
CloseCode c(i);

View file

@ -155,7 +155,7 @@ namespace Xbyak {
enum {
DEFAULT_MAX_CODE_SIZE = 4096,
VERSION = 0x7230 /* 0xABCD = A.BC(.D) */
VERSION = 0x7231 /* 0xABCD = A.BC(.D) */
};
#ifndef MIE_INTEGER_TYPE_DEFINED

View file

@ -1,4 +1,4 @@
const char *getVersionString() const { return "7.23"; }
const char *getVersionString() const { return "7.23.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); }

View file

@ -966,7 +966,7 @@ public:
make epilog manually
@param callRet [in] call ret() if true
*/
void makeEpilog(bool callRet = true)
void close(bool callRet = true)
{
using namespace Xbyak;
const Reg64& _rsp = code_->rsp;
@ -978,16 +978,9 @@ public:
if (callRet) code_->ret();
}
// close() is automatically called in a destructor.
// It is not called if close() is explicitly called before.
void close(bool callRet = true)
{
if (!makeEpilog_) return;
makeEpilog(callRet);
makeEpilog_ = false;
}
~StackFrame()
{
if (!makeEpilog_) return;
close();
}
private: