Skip to content
Snippets Groups Projects
Commit 36aabe59 authored by Clemens Paumgarten's avatar Clemens Paumgarten
Browse files

Merge branch 'asm' of git.uibk.ac.at:csaw2672/compiler-construction into asm

parents 97d05adc f3b7533e
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,7 @@ int main(int argc, char *argv[]) {
mcc_asm_gen_creator(out, tac, symbol_table);
fclose(as_file);
mcc_invoke_gcc(TMP_FILE_NAME".s", out);
mcc_invoke_gcc(TMP_FILE_NAME".s", "a.out");
// mcc_asm_gen_creator(stdout, tac, symbol_table);
......
......@@ -255,6 +255,9 @@ void asm_gen_param_pop_array(FILE *out, struct mcc_tac_entry *te, struct mcc_asm
void mcc_asm_gen(FILE *out, struct mcc_tac *tac, struct mcc_asm_gen_container *asm_container) {
fprintf(out, ".text\n");
fprintf(out, ".globl main\n");
fprintf(out, ".type main, @function\n");
for(int i = 0; i < tac->tac_entries->size; i++) {
struct mcc_tac_entry *entry = tac->tac_entries->arr[i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment