mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
[qfcc] Set the return of Ruamoko calls
Of course, I had the width of opc wrong :P. But with this, it seems that unoptimized calls should work once I get the stack frame working.
This commit is contained in:
parent
33a3f92503
commit
c53127707b
2 changed files with 9 additions and 2 deletions
|
@ -114,7 +114,7 @@ call_formats = {
|
||||||
"mnemonic": "call",
|
"mnemonic": "call",
|
||||||
"opname": "call",
|
"opname": "call",
|
||||||
"format": "{call_fmt[mm]}",
|
"format": "{call_fmt[mm]}",
|
||||||
"widths": "{call_widths[mm]}, 0",
|
"widths": "{call_widths[mm]}, -1",
|
||||||
"types": "{call_types[mm]}, ev_void",
|
"types": "{call_types[mm]}, ev_void",
|
||||||
"args": {
|
"args": {
|
||||||
"op_mode": ".BCD",
|
"op_mode": ".BCD",
|
||||||
|
|
|
@ -1115,7 +1115,14 @@ expr_call (sblock_t *sblock, expr_t *call, operand_t **op)
|
||||||
}
|
}
|
||||||
statement_t *s = new_statement (st_func, "call", call);
|
statement_t *s = new_statement (st_func, "call", call);
|
||||||
sblock = statement_subexpr (sblock, func, &s->opa);
|
sblock = statement_subexpr (sblock, func, &s->opa);
|
||||||
|
if (!op) {
|
||||||
s->opc = short_operand (0, call);
|
s->opc = short_operand (0, call);
|
||||||
|
} else {
|
||||||
|
if (!*op) {
|
||||||
|
*op = temp_operand (call->e.branch.ret_type, call);
|
||||||
|
}
|
||||||
|
s->opc = *op;
|
||||||
|
}
|
||||||
sblock_add_statement (sblock, s);
|
sblock_add_statement (sblock, s);
|
||||||
sblock->next = new_sblock ();
|
sblock->next = new_sblock ();
|
||||||
return sblock->next;
|
return sblock->next;
|
||||||
|
|
Loading…
Reference in a new issue