From 1d75fb35c35573839a66182f0fa232f7b376d08f Mon Sep 17 00:00:00 2001 From: nivas-x86 Date: Mon, 29 Jan 2024 17:43:37 -0800 Subject: support align for auto_grow --- xbyak/xbyak.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h index 0e96ff5..66948ad 100644 --- a/xbyak/xbyak.h +++ b/xbyak/xbyak.h @@ -3215,7 +3215,7 @@ public: { if (x == 1) return; if (x < 1 || (x & (x - 1))) XBYAK_THROW(ERR_BAD_ALIGN) - if (isAutoGrow()) XBYAK_THROW(ERR_BAD_ALIGN) + if (isAutoGrow() && inner::getPageSize() % x != 0) XBYAK_THROW(ERR_BAD_ALIGN) size_t remain = size_t(getCurr()) % x; if (remain) { nop(x - remain, useMultiByteNop); -- cgit v1.2.3