diff options
| author | Mustafa Quraish <[email protected]> | 2022-02-05 22:34:44 -0500 |
|---|---|---|
| committer | Mustafa Quraish <[email protected]> | 2022-02-05 22:34:44 -0500 |
| commit | 7b0bfa91b400e89f32f19ef2987200562bbe3f8f (patch) | |
| tree | d44f6cb1525ebbe6cc0c958191dd4ab1d76eb4f6 /compiler/codegen.cup | |
| parent | [cup] Fix error in codegen for `if` (diff) | |
| download | cup-7b0bfa91b400e89f32f19ef2987200562bbe3f8f.tar.xz cup-7b0bfa91b400e89f32f19ef2987200562bbe3f8f.zip | |
[cup] Add support for builtin functions, add `print()`
Diffstat (limited to 'compiler/codegen.cup')
| -rw-r--r-- | compiler/codegen.cup | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/codegen.cup b/compiler/codegen.cup index d35f901..8c8ec95 100644 --- a/compiler/codegen.cup +++ b/compiler/codegen.cup @@ -1,3 +1,4 @@ +import "compiler/builtins.cup" import "compiler/ast.cup" import "std/file.cup" @@ -381,4 +382,6 @@ fn generate_program(ast: Node*, file: File*) { emit_asm(" call func_main\n"); emit_asm(" mov rdi, rax\n"); generate_syscall(SYS_exit); + + generate_builtins(); }
\ No newline at end of file |