Displaying 20 results from an estimated 70 matches for "vaargs".
Did you mean:
varargs
2015 Sep 28
4
varargs, the x86, and clang
When I use clang on an x86-64 to spit out the LLVM, like this
clang -O -S -emit-llvm varargstest.c
where varargstest.c looks like this
int add_em_up(int count, ...) {
va_list ap;
int i, sum;
va_start(ap, count);
sum = 0;
for (i = 0; i < count; i++)
sum += va_arg(ap, int);
va_end(ap);
return sum;
}
I see LLVM that looks like it's been customized for the x86-64,
versus
2012 Mar 23
2
[LLVMdev] Fixing VAARG on PPC64
The PowerPC backend on PPC64 for non-Darwin (SVR4 ABI) systems
currently has a problem handling integer types smaller than 64 bits.
This is because the ABI specifies that these types are zero-extended to
64 bits on the stack and the default logic provided in LegalizeDAG does
not use that convention. Specifically, for these targets we have:
setOperationAction(ISD::VAARG, MVT::Other, Expand);
2012 Mar 23
2
[LLVMdev] Fixing VAARG on PPC64
On Fri, 23 Mar 2012 09:50:12 +0100
Ivan Llopard <ivanllopard at gmail.com> wrote:
> Hi Finkel,
>
> Le 23/03/2012 05:50, Hal Finkel a écrit :
> > The PowerPC backend on PPC64 for non-Darwin (SVR4 ABI) systems
> > currently has a problem handling integer types smaller than 64 bits.
> > This is because the ABI specifies that these types are
> > zero-extended
2012 Mar 23
0
[LLVMdev] Fixing VAARG on PPC64
Le 23/03/2012 17:02, Hal Finkel a écrit :
> On Fri, 23 Mar 2012 09:50:12 +0100
> Ivan Llopard<ivanllopard at gmail.com> wrote:
>
>> Hi Finkel,
>>
>> Le 23/03/2012 05:50, Hal Finkel a écrit :
>>> The PowerPC backend on PPC64 for non-Darwin (SVR4 ABI) systems
>>> currently has a problem handling integer types smaller than 64 bits.
>>> This
2012 Mar 23
0
[LLVMdev] Fixing VAARG on PPC64
Hi Finkel,
Le 23/03/2012 05:50, Hal Finkel a écrit :
> The PowerPC backend on PPC64 for non-Darwin (SVR4 ABI) systems
> currently has a problem handling integer types smaller than 64 bits.
> This is because the ABI specifies that these types are zero-extended to
> 64 bits on the stack and the default logic provided in LegalizeDAG does
> not use that convention. Specifically, for
2007 Apr 03
3
[LLVMdev] Implementing a complicated VAARG
Hi everyone,
I'm implementing varags handling for PPC32 with the ELF ABI. It is
largely more
complicated than the Macho ABI or x86 because it manipulates a struct
instead of a direct pointer in the stack. You can find the layout of the
va_list struct
at the end of this mail.
A VAARG call requires a lot of computation. Typically the C code for
va_arg(ap, int)
is:
int va_arg_gpr(ap_list
2007 Apr 03
0
[LLVMdev] Implementing a complicated VAARG
On Tue, 3 Apr 2007, Nicolas Geoffray wrote:
> A VAARG call requires a lot of computation. Typically the C code for
> va_arg(ap, int)
If you use va_arg in C, are you seeing llvm.vaarg in the output .ll file?
-Chris
> is:
>
> int va_arg_gpr(ap_list ap) {
> int idx = ap->gpr;
> if (idx < 8) {
> ap->gpr = idx + 1;
> return
2007 Apr 03
1
[LLVMdev] Implementing a complicated VAARG
Hi Chris,
Chris Lattner wrote:
> On Tue, 3 Apr 2007, Nicolas Geoffray wrote:
>
>> A VAARG call requires a lot of computation. Typically the C code for
>> va_arg(ap, int)
>>
>
> If you use va_arg in C, are you seeing llvm.vaarg in the output .ll file?
>
I'm guessing that if you're asking, then no llvm.vaarg is generated. I
can not
test it on my
2020 Nov 11
1
[RFC] A value-tracking LiveDebugValues implementation
Hi Xiang,
On Wed, Nov 11, 2020 at 1:59 AM Zhang, Xiang1 <xiang1.zhang at intel.com> wrote:
> Jeremy wrote:
> > ... The value %0 is live up to and including the ADD64ri but not past it, meaning LLVM today will drop the DBG_VALUE ...
>
> Just a little puzzle about the " drop the DBG_VALUE ", maybe I didn't get your key point,
>
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 =
2009 Sep 27
0
[LLVMdev] Implementing stack frames/vaargs
Hi,
After several months of procrastination I'm at the point where I'd like
to implement vaargs in all the code generators that do not support it yet.
As a little background, I'm putting together a version of newlib,
startup code, linker command files, soft-flt (if needed), and
compiler-rt that I'm building for the llvm targets supported by qemu. I
build programs and run them in q...
2005 Mar 29
2
[LLVMdev] vaargs and backwards compatibility
So Alpha and some other potential targets (amd64?) use structs for
va_list. This is very much at odds with the current instructions and
intrinsics.
So the question for the community is how much backwards compatibility
should be maintained for vaargs? Essentially the behavior needs to be
reverted to LLVM 1.0 semantics for vaarg instructions. Currently there
is conversion code to convert the old behavior to the new behavior.
However, converting from the current behavior to the old behavior is
very non-trivial.
Is bytecode compatibility for t...
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}
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
2005 Apr 03
0
[LLVMdev] vaargs and backwards compatibility
...Assuming people have 1.1 (and removing the code for
dealing with 1.0) or later should be no problem for the LLVM 1.5 release.
If you make this change, please add a note to the release notes.
> So the question for the community is how much backwards compatibility
> should be maintained for vaargs? Essentially the behavior needs to be
> reverted to LLVM 1.0 semantics for vaarg instructions. Currently there
> is conversion code to convert the old behavior to the new behavior.
> However, converting from the current behavior to the old behavior is
> very non-trivial.
>
> Is...
2008 Oct 12
4
[LLVMdev] Genlibdeps.pl, CMake and MSYS
Hello, Everyone
> On this specific case, IIRC, MinGW chokes if asmprinter is not on the
> list of components. This may be another consequence of the malfunctoning
> of llvm-config/GenLibDeps.pl on MinGW/MSYS.
This works for me without any problems on mingw32. What are the problems you're seeing?
--
WBR, Anton Korobeynikov
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
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
2011 Aug 17
2
[LLVMdev] Is va_arg deprecated?
FWIW, attached is a similar patch that adds a -falways-use-llvm-vaarg
flag to Clang.
Applies against mainline.
(As discussed, va_arg isn't really supported well so this probably
doesn't work well on anything other than simple code, YMMV, etc)
~Will
On Thu, May 12, 2011 at 12:29 PM, Arushi Aggarwal <arushi987 at gmail.com> wrote:
> Have these changes made it to mainline? Is
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