diff options
author | kobalicek <kobalicek.petr@gmail.com> | 2021-06-25 00:51:48 +0300 |
---|---|---|
committer | kobalicek <kobalicek.petr@gmail.com> | 2021-06-25 00:51:48 +0300 |
commit | c329fa7ce0f210ab650ed4c930d3da7e1f8ae33f (patch) | |
tree | b9b42632835c81462a26814a73d87c43f6e5ec20 | |
parent | 78de7d9c81a6ad1b0f732b52666960d9be1c6461 (diff) |
[Bug] Don't emit useless 'sub esp, 0' after calling a void function (Compiler)
-rw-r--r-- | src/asmjit/x86/x86rapass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/asmjit/x86/x86rapass.cpp b/src/asmjit/x86/x86rapass.cpp index 23cfd65..8fa1c6c 100644 --- a/src/asmjit/x86/x86rapass.cpp +++ b/src/asmjit/x86/x86rapass.cpp @@ -516,7 +516,7 @@ Error RACFGBuilder::onBeforeInvoke(InvokeNode* invokeNode) noexcept { } cc()->_setCursor(invokeNode); - if (fd.hasFlag(CallConv::kFlagCalleePopsStack)) + if (fd.hasFlag(CallConv::kFlagCalleePopsStack) && fd.argStackSize() != 0) ASMJIT_PROPAGATE(cc()->sub(cc()->zsp(), fd.argStackSize())); if (fd.hasRet()) { |