Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/asmjit/asmjit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkobalicek <kobalicek.petr@gmail.com>2021-06-25 00:51:48 +0300
committerkobalicek <kobalicek.petr@gmail.com>2021-06-25 00:51:48 +0300
commitc329fa7ce0f210ab650ed4c930d3da7e1f8ae33f (patch)
treeb9b42632835c81462a26814a73d87c43f6e5ec20
parent78de7d9c81a6ad1b0f732b52666960d9be1c6461 (diff)
[Bug] Don't emit useless 'sub esp, 0' after calling a void function (Compiler)
-rw-r--r--src/asmjit/x86/x86rapass.cpp2
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()) {