aboutsummaryrefslogtreecommitdiff
path: root/mips.c
diff options
context:
space:
mode:
Diffstat (limited to 'mips.c')
-rw-r--r--mips.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mips.c b/mips.c
index a34f463..da6ab05 100644
--- a/mips.c
+++ b/mips.c
@@ -156,7 +156,9 @@ int mips_to_reg(COpr_t opr, int reg0) {
}
else if (opr->kind == IMMF)
{
- printf("\tla $%d, _func_%s\n", reg0, opr->info.str);
+ printf("\tla $%d, %s%s\n", reg0,
+ strcmp(opr->info.str, "main") ? "_func_" : "",
+ opr->info.str);
return reg0;
}
if (opr->reg != -1)