support align for auto_grow

This commit is contained in:
nivas-x86 2024-01-29 17:43:37 -08:00 committed by GitHub
parent 086530ed13
commit 1d75fb35c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);