Skip to content

Commit

Permalink
fixed i386 gen
Browse files Browse the repository at this point in the history
  • Loading branch information
realchonk committed Jul 10, 2021
1 parent cb2c746 commit 97edc3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/i386/gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ static ir_node_t* emit_ir(const ir_node_t* n) {
if (variadic) emit_clear(reg_ax);
if (is_defined(n->ifcall.name)) emit("call %s", n->ifcall.name);
else {
add_unresolved(n->ifcall.name);
emit("call [rel %s wrt ..got]", n->ifcall.name);
}
size_t add_rsp = padding;
Expand All @@ -317,6 +316,8 @@ static ir_node_t* emit_ir(const ir_node_t* n) {
emit("call %s", n->ifcall.name);
emit("add %s, %u", reg_sp, padding + REGSIZE * np);
#endif
if (!is_defined(n->ifcall.name))
add_unresolved(n->ifcall.name);
if (n->ifcall.dest != 0 && n->type != IR_FCALL) {
emit("mov %s, %s", mreg(n->ifcall.dest), reg_ax);
}
Expand Down

0 comments on commit 97edc3c

Please sign in to comment.