Skip to content

Commit

Permalink
Re-add deleted stack manipulation after call
Browse files Browse the repository at this point in the history
  • Loading branch information
Yey007 committed May 16, 2024
1 parent d91417f commit 78b77d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
![CI Status](https://github.com/ethanuppal/cs3110_compiler/actions/workflows/ci.yaml/badge.svg)

> "x86 is simple trust me bro"
> Last updated: 2024-05-16 12:40:21.101479
> Last updated: 2024-05-16 13:25:30.792439
```
$ ./main -h
Expand Down
2 changes: 2 additions & 0 deletions lib/backend/asm_emit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ let emit_call text_section data_section regalloc name args return_loc_opt =
| Some return_loc ->
Asm.Section.add text_section (Mov (return_loc, Register RAX))
| None -> ());
Asm.Section.add text_section
(Add (Register RSP, Intermediate (offset + spill_size)));
emit_restore_registers text_section save_registers

let emit_get_param text regalloc param_ctx var =
Expand Down

0 comments on commit 78b77d9

Please sign in to comment.