mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 20:44:37 +03:00
Fixed a bug in Compiler when used with CodeInfo that doesn't specify any alignment
This commit is contained in:
@@ -129,9 +129,9 @@ CCFunc* CodeCompiler::newFunc(const FuncSignature& sign) noexcept {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Override the natural stack alignment of the calling convention to what's
|
||||
// specified by CodeInfo.
|
||||
func->_funcDetail._callConv.setNaturalStackAlignment(_codeInfo.getStackAlignment());
|
||||
// If the CodeInfo guarantees higher alignment honor it.
|
||||
if (_codeInfo.getStackAlignment() > func->_funcDetail._callConv.getNaturalStackAlignment())
|
||||
func->_funcDetail._callConv.setNaturalStackAlignment(_codeInfo.getStackAlignment());
|
||||
|
||||
// Allocate space for function arguments.
|
||||
func->_args = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user