Skip to content

Commit d6166bd

Browse files
committed
SAVEPOINT
1 parent 480e470 commit d6166bd

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

examples/test.asm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ FUN#2:
3737
push qword 2
3838
push qword 9
3939
call [add#2]
40+
add rsp, 16
4041
push qword rax
4142

4243
; exit t3

src/codegen/emitters/x86_64_linux_nasm.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ impl CodeGenerator {
174174

175175
self.text_section
176176
.push_str(&format!(" call {callee_asm}\n"));
177+
self.text_section
178+
.push_str(&format!(" add rsp, {}\n", args.len() * 8));
177179
self.text_section.push_str(&format!(" push qword rax\n"));
178180
} else {
179181
unreachable!()

0 commit comments

Comments
 (0)