qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 84bb28c0422c2d0dea555aeec946e73cf2b818a8
parent 1258bb75d2941df4b2d56c38d14a97c57722e2e0
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Wed, 20 Apr 2016 12:53:42 -0400

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!

Diffstat:
Mdoc/il.txt | 2+-
Mparse.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/il.txt b/doc/il.txt @@ -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 ), ')' diff --git a/parse.c b/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;