Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] New support for variable argument functions & intrinsic functions"
2014 Oct 29
2
[LLVMdev] [PATCH] LangRef: va_arg doesn't work on X86_64; update example
Provide a full-fledged example of working variable arguments on X86_64,
since it's easily the most popular platform.
Cc: Reid Kleckner <rnk at google.com>
Signed-off-by: Ramkumar Ramachandra <artagnon at gmail.com>
---
docs/LangRef.rst | 44 ++++++++++++++++++++++++++++++--------------
1 file changed, 30 insertions(+), 14 deletions(-)
diff --git a/docs/LangRef.rst
2010 Jan 31
3
[LLVMdev] llvm-gcc 4.0 question
Thanks for responding, Duncan, and clarifying that y'all need more info
to help.
I'm trying to compile binaries on os x 10.5.8 intel hardware that are
compatible on ppc os x 10.4.
When I include various flags to llvm-gcc, including: -m32 -arch ppc
-isysroot /Developer/SDKs/MacOS10.4u.sdk -mmacosx-version-min=10.4
I am seeing errors when compiling using llvm-gcc 4.2.
If I leave out
2017 Aug 09
4
[RFC] The future of the va_arg instruction
# The future of the va_arg instruction
## Summary
LLVM IR currently defines a va_arg instruction, which can be used to access
a vararg. Few Clang targets make use of it, and it has a number of
limitations. This RFC hopes to promote discussion on its future - how 'smart'
should va_arg be? Should we be aiming to transition all targets and LLVM
frontends to using it?
## Background on va_arg
2007 Apr 02
2
[LLVMdev] Declaration of a va_list should be an intrinsic?
Hi everyone,
Currently, when declaring a va_list in llvm, one only needs to do:
%ap = alloca i8 * (Reference : llvm/docs/LangRef.html#int_varargs)
This is OK for x86 and PPC/Darwin ABI because a va_list in these architectures is
just a pointer to the stack. The va_start intrinsic just initializes where
the pointer points at in the stack. I do not know how the other backends operate,
but I
2007 Apr 02
0
[LLVMdev] Declaration of a va_list should be an intrinsic?
On 4/2/07, Nicolas Geoffray <nicolas.geoffray at lip6.fr> wrote:
> Hi everyone,
>
> Currently, when declaring a va_list in llvm, one only needs to do:
>
> %ap = alloca i8 * (Reference : llvm/docs/LangRef.html#int_varargs)
This example is x86 specific. alpha allocas an {sbyte*, int} (and
does so in llvm-gcc). What the type of the alloca to use is requires
the frontend to
2014 Aug 26
2
[LLVMdev] [BUG] Varargs example in LangRef segfaults
Hi,
So the Variable Argument Handling Intrinsics section of the LangRef
(http://llvm.org/docs/LangRef.html#variable-argument-handling-intrinsics)
lists an example that segfaults. Try the following on x86_64:
-- 8< --
define i32 @test(i32 %X, ...) {
; Initialize variable argument processing
%ap = alloca i8*
%ap2 = bitcast i8** %ap to i8*
call void @llvm.va_start(i8* %ap2)
; Read a
2007 Apr 03
2
[LLVMdev] Declaration of a va_list should be an intrinsic?
Hi Andrew,
Andrew Lenharth wrote:
> On 4/2/07, Nicolas Geoffray <nicolas.geoffray at lip6.fr> wrote:
>
>> Hi everyone,
>>
>> Currently, when declaring a va_list in llvm, one only needs to do:
>>
>> %ap = alloca i8 * (Reference : llvm/docs/LangRef.html#int_varargs)
>>
>
> This example is x86 specific. alpha allocas an {sbyte*, int}
2008 Oct 12
0
[LLVMdev] A question about LegalizeDAG.cpp and VAARG
I'm generating code for a target that only supports i32 natively.
My front end is generating VAARG for accessing varargs parameters.
The problem is that I get an assert when I compile this:
#include <stdarg.h>
int main(va_list ap)
{
typedef double type;
type tmp;
tmp = va_arg(ap, type);
}
Bitcode:
; ModuleID = 't0056.bc'
target datalayout =
2010 Apr 01
1
[LLVMdev] Ho to generate VAARG?
Hello, LLVMers!
How can I force a front end to generate VAARG for accessing varargs
parameters?
I compile a simple C-code:
#include <stdarg.h>
int FnVarArgs(int a, ...)
{
int i,tmp=0;
va_list ptArgument;
va_start(ptArgument,a);
for(i=0;i<9;i++)
tmp+= va_arg(ptArgument,int);
return tmp;
}
And then have this bytecode:
; ModuleID = 'main.bc'
target
2010 Feb 01
0
[LLVMdev] llvm interpreter cannot execute llvm-gcc generated bitcode
On 02/01/2010 01:13 PM, Kristaps Straupe wrote:
> Hello again!
>
> We have fetched the latest llvm sources from repository and the
> original problem has went away. Though now we are facing a new problem
> with interpreter on the following c code:
>
> --------------
> #include <stdarg.h>
> #include <stdio.h>
>
> void doTheThing(int dummy, ...)
> {
2011 Jul 29
1
[LLVMdev] alignment checking in isSafeToEliminateVarargsCast
I have a question about a problem I came across while I was adding support
for aggregate va_arg expression in clang.
The following is the example program I will use in this email. I compile the
program with clang targeting mips. Note that I have not pushed all the
changes I have made yet, so you will not be able to see the same results.
$ clang -ccc-host-triple mipsel-unknown-linux
2007 Sep 04
0
5 commits - doc/Makefile.am doc/swfdec-sections.txt libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_native_function.h
doc/Makefile.am | 1
doc/swfdec-sections.txt | 3
libswfdec/swfdec_as_array.c | 1
libswfdec/swfdec_as_boolean.c | 2
libswfdec/swfdec_as_internal.h | 4
libswfdec/swfdec_as_native_function.c | 156 ++++++++++++++++++++++++++++++++++
libswfdec/swfdec_as_native_function.h | 21 ++++
libswfdec/swfdec_as_number.c
2016 Jan 10
2
[cfe-dev] Is it a va_arg bug in clang?
Hi Richard,
I tried latest 3.7.1 release, the clang has same build failure and don’t know __builtin_ms_va_list at all. I compared the llvm trunk with 3.7.1 and find the trunk has a VA commit from Davis which is not included in the 3.7.1 release. So, I guess I need to directly build the latest trunk instead of the 3.7.1 release. (why 3.7.1 release doesn’t include this patch?)
commit
2014 May 04
12
[LLVMdev] [RFC] Benchmarking subset of the test suite
At the LLVM Developers' Meeting in November, I promised to work on isolating a subset of the current test suite that is useful for benchmarking. Having looked at this in more detail, most of the applications and benchmarks in the test suite are useful for benchmarking, and so I think that a better way of phrasing it is that we should construct a list of programs in the test suite that are not
2009 Aug 28
1
[LLVMdev] va_arg
I would like to be able to instrument va_arg, but when I generate a bc
file for a test case using:
llvm-gcc -O3 -emit-llvm vararg.c -c -o vararg.bc
I do not see va_arg. Instead, it seems the args are accessed through
%struct.__va_list_tag, which makes things a bit trickier to
instrument. Is there a way to force llvm-gcc to use va_arg?
Perhaps there is some documentation about va_list_tag or
2009 Nov 27
0
[LLVMdev] Emit va_arg intrinsic in llvm-gcc?
Dear all,
Is there a way to have llvm-gcc output the llvm va_arg intrinsic? As
far as I understand, llvm-gcc directly lowers va_arg in the frontend
using the TARGET_GIMPLIFY_VA_ARG target hook.
I am aware that va_arg segfaults on x86-64
(http://llvm.org/bugs/show_bug.cgi?id=1740) and that llvm-gcc avoids
this issue by always lowering calls to va_arg
2020 Apr 15
0
[PATCH nbdkit 6/9] common/utils: Add a copy_environ utility function.
This allows you to copy an environ, while optionally adding extra
(key, value) pairs to it.
---
common/utils/Makefile.am | 2 +
common/utils/utils.h | 1 +
common/utils/environ.c | 116 +++++++++++++++++++++++++++++++++++++++
3 files changed, 119 insertions(+)
diff --git a/common/utils/Makefile.am b/common/utils/Makefile.am
index 9a78339d..41761c79 100644
--- a/common/utils/Makefile.am
2008 Feb 03
0
[LLVMdev] 2.2 Prerelease available for testing
Target: FreeBSD 6.2-STABLE on i386
autoconf says:
configure:2122: checking build system type
configure:2140: result: i386-unknown-freebsd6.2
[...]
configure:2721: gcc -v >&5
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.6 [FreeBSD] 20060305
[...]
objdir != srcdir, for both llvm and gcc.
Release build.
llvm-gcc 4.2 from source.
2016 Jan 09
2
[cfe-dev] Is it a va_arg bug in clang?
Hi Richard,
Thank you for the info. I build my code in Ubuntu-64bits with simply commands: “clang X64.c”, then run “./a.out” to see the output. If I replace my va_list, va_start, va_arg va_end with __builtin_ms_va_list, __builtin_ms_va_start, __builtin_ms_va_arg, __builtin_ms_va_end, my code will build fail in Ubuntu with below message. Do you suggest I should build it in windows and not in
2007 Sep 18
0
[LLVMdev] 2.1 Pre-Release Available (testers needed)
Hi,
LLVM 2.1-pre1 test results:
Linux (SUSE) on x86 (P4)
Release mode, but with assertions enabled
LLVM srcdir == objdir
# of expected passes 2250
# of expected failures 5
I ran the llvm-test suite on my desktop while I was also working on that PC,
so don't put too much trust in the timing info. Especially during the "spiff"
test the machine was swapping