diff options
Diffstat (limited to 'src/generator.c')
-rw-r--r-- | src/generator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/generator.c b/src/generator.c index 37581e0..b8a0b8f 100644 --- a/src/generator.c +++ b/src/generator.c | |||
@@ -90,13 +90,13 @@ void gen_const_declaration() { | |||
90 | fun_display_table(); | 90 | fun_display_table(); |
91 | } | 91 | } |
92 | 92 | ||
93 | Type gen_function_declaration(const char name[], int return_type, int nb_param) { | 93 | Type gen_function_declaration(const char name[], int return_type) { |
94 | fun_add(name, return_type, nb_param); | ||
95 | fprintf(output, "\n%s:\npush rbp\nmov rbp,rsp\n", name); | 94 | fprintf(output, "\n%s:\npush rbp\nmov rbp,rsp\n", name); |
96 | return return_type; | 95 | return return_type; |
97 | } | 96 | } |
98 | 97 | ||
99 | void gen_function_end_declaration() { | 98 | void gen_function_end_declaration(const char name[], int return_type, int nb_param) { |
99 | fun_add(name, return_type, nb_param); | ||
100 | fprintf(output, "mov rax,-1\nmov rsp, rbp\npop rbp\nret\n"); | 100 | fprintf(output, "mov rax,-1\nmov rsp, rbp\npop rbp\nret\n"); |
101 | } | 101 | } |
102 | 102 | ||