[LLVMdev] [PATCH v2] LangRef: clarify that va_arg doesn't work on x86_64 (original) (raw)
Ramkumar Ramachandra artagnon at gmail.com
Wed Oct 29 12:21:33 PDT 2014
- Previous message: [LLVMdev] Mips's MicroMips ??
- Next message: [LLVMdev] Emit a jump instruction to a place inside basicblock
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Since x86_64 is easily the most popular platform, it deserves special mention. varargs on x86_64 probably requires a separate page.
Cc: Tim Northover <t.p.northover at gmail.com> Cc: Reid Kleckner <rnk at google.com> Signed-off-by: Ramkumar Ramachandra <artagnon at gmail.com>
docs/LangRef.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/docs/LangRef.rst b/docs/LangRef.rst
index ddef803..b288f9b 100644
--- a/docs/LangRef.rst
+++ b/docs/LangRef.rst
@@ -6695,7 +6695,8 @@ Overview:
The 'va_arg
' instruction is used to access arguments passed through
the "variable argument" area of a function call. It is used to implement
-the va_arg
macro in C.
+the va_arg
macro in C. Note that va_arg
does not work on
+platforms that have a non-builtin va_list
type, like x86_64.
Arguments:
""""""""""
@@ -6879,8 +6880,10 @@ value type "va_list
". The LLVM assembly language reference manual
does not define what this type is, so all transformations should be
prepared to handle these functions regardless of the type used.
-This example shows how the :ref:va_arg <i_va_arg>
instruction and the
-variable argument handling intrinsic functions are used.
+This example shows how the :ref:va_arg <i_va_arg>
instruction and
+the variable argument handling intrinsic functions are used. Note that
+this is for platforms where va_list
is an i8**
, most notably
+not x86_64.
.. code-block:: llvm
1.9.3 (Apple Git-50)
- Previous message: [LLVMdev] Mips's MicroMips ??
- Next message: [LLVMdev] Emit a jump instruction to a place inside basicblock
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]