support calls with no return
I thought it would be harder (and maybe it is). My fear was that a call must be always followed by a parallel move from machine registers (this is an assumption in both spill and rega). This however remains true, because the ABI code generates a dummy "copy RAX" by accident!
This commit is contained in:
parent
1258bb75d2
commit
84bb28c042
2 changed files with 2 additions and 2 deletions
|
@ -709,7 +709,7 @@ single-precision floating point number `%f` into `%rs`.
|
|||
~~~~~~
|
||||
|
||||
`bnf
|
||||
CALL := %IDENT '=' ( BASETY | :IDENT ) 'call' VAL PARAMS
|
||||
CALL := [ %IDENT '=' ( BASETY | :IDENT ) ] 'call' VAL PARAMS
|
||||
|
||||
PARAMS := '(' ( (BASETY | :IDENT) %IDENT ), ')'
|
||||
|
||||
|
|
2
parse.c
2
parse.c
|
@ -508,7 +508,7 @@ parseline(PState ps)
|
|||
err("label or } expected");
|
||||
switch (t) {
|
||||
default:
|
||||
if (isstore(t)) {
|
||||
if (isstore(t) || t == Tcall) {
|
||||
/* operations without result */
|
||||
r = R;
|
||||
k = Kw;
|
||||
|
|
Loading…
Add table
Reference in a new issue