From fcdef10dae54d7124aca9ccbefe53baa8e67267d Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Mon, 18 Oct 2021 21:04:10 +0200 Subject: make variadic args explicit Some abis, like the riscv one, treat arguments differently depending on whether they are variadic or not. To prepare for the upcomming riscv target, we change the variadic call syntax and give meaning to the location of the '...' marker. # new syntax %ret =w call $f(w %regular, ..., w %variadic) By nature of their abis, the change is backwards compatible for existing targets. --- doc/il.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/il.txt') diff --git a/doc/il.txt b/doc/il.txt index d1ed755..87a4d9f 100644 --- a/doc/il.txt +++ b/doc/il.txt @@ -751,7 +751,7 @@ single-precision floating point number `%f` into `%rs`. ARG := ABITY VAL # Regular argument | 'env' VAL # Environment argument (first) - | '...' # Variadic marker (last) + | '...' # Variadic marker ABITY := BASETY | :IDENT @@ -778,8 +778,8 @@ integer. If the called function does not expect an environment parameter, it will be safely discarded. See the <@ Functions > section for more information about environment parameters. -When the called function is variadic, the last argument -must be `...`. +When the called function is variadic, there must be a `...` +marker separating the named and variadic arguments. ~ Variadic ~~~~~~~~~~ -- cgit 1.4.1