support variable argument lists

This change is backward compatible, calls to
"variadic" functions (like printf) must now be
annotated (with ...).
This commit is contained in:
Quentin Carbonneaux 2017-02-07 23:01:24 -05:00
parent 8799dc30ac
commit b99a8b0d07
8 changed files with 256 additions and 47 deletions

View file

@ -20,7 +20,7 @@ function w $main(w %argc, l %argv) {
@loop2
%sep =w phi @last 10, @nolast 32
%arg =l loadl %av
%r =w call $printf(l %fmt, l %arg, w %sep)
%r =w call $printf(l %fmt, l %arg, w %sep, ...)
%av1 =l add %av, 8
%ac1 =w sub %ac, 1
jmp @loop