Skip to content

Commit

Permalink
rewriter: add comment explaining that emit_epilogue undoes param re…
Browse files Browse the repository at this point in the history
…g `pushq`s from `emit_prologue`
  • Loading branch information
kkysen committed Dec 18, 2024
1 parent 693603f commit a13b2b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/rewriter/GenCallAsm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,8 @@ std::string emit_asm_wrapper(AbiSignature &sig,
add_asm_line(aw, ".type "s + wrapper_name + ", @function");
add_asm_line(aw, wrapper_name + ":");

// Note that when there's a post condition call,
// the prologue needs to undo the `pushq`s added in `emit_prologue` to save the register params.
emit_prologue(aw, caller_pkey, target_pkey, arch, target_post_condition_name.has_value());

if (arch == Arch::X86) {
Expand Down

0 comments on commit a13b2b2

Please sign in to comment.