Displaying 20 results from an estimated 1000 matches similar to: "va_arg on Windows 64"
2016 May 31
0
va_arg on Windows 64 bits
Hi everyone,
I'm interested in variadic functions and how llvm handles them. I
discovered that the Clang frontend is doing a great job at lowering the
va_arg (precisely __builtin_va_arg) function into target dependent
code. I have also seen the va_arg function that exist at IR level.
I found some information about va_arg (IR one) that currently does not
support all platform. But since 2009,
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
2007 Oct 24
0
[LLVMdev] va_arg on x86-64
Hi everybody.
I'm developing a D compiler using LLVM as backend (LLVMC [1]). Tonight
I had a look at variadic functions, the thing is though, that I'm on
x86-64, and the va_arg instruction is not working.
I've posted a bug report: http://llvm.org/bugs/show_bug.cgi?id=1740
In there I posted the .ll test case:
define i32 @test(i32 %X, ...) {
%ap = alloca i8*, i32 1024
%ap2 =
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
2010 Jun 22
1
[LLVMdev] Var Args on X86-64
Hello all,
I wish to get the va_arg instruction working on X86-64 Linux. This requires
implementing VAARG lowering for X86-64.
I am fine with implementing it, but I am unsure of what approach I should
take. The straightforward option is to add the DAG nodes required to perform
the operation during lowering. (in X86TargetLowering::LowerVAARG()).
However, the resulting code will be relatively
2017 Aug 14
2
[RFC] The future of the va_arg instruction
On 9 August 2017 at 19:38, Friedman, Eli <efriedma at codeaurora.org> wrote:
> On 8/9/2017 9:11 AM, Alex Bradbury via llvm-dev wrote:
>>
>> Option 3: Teach va_arg to handle aggregates
>> * In this option, va_arg might reasonably be expected to handle a
>> struct,
>> but would not be expected to have detailed ABI-specific knowledge. e.g.
>> it
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
2013 Dec 19
2
[LLVMdev] Problems with optimizations and va_arg intrinsic
Hi all,
I am currently writing an obfuscation pass (on LLVM 3.3 code base) that works at IR level and that implement procedures fusion. For this, I am heavily
relying on the va_arg intrinsic. My code is functional when compiled with no optimization (-O0), but I experience strange behavior
when compiling with -O2 or -O3. I am currently using the libgmp and OpenSSL libraries test suites.
I know
2011 Aug 17
0
[LLVMdev] Is va_arg deprecated?
I should have been more specific:
"Why do we want this as an option? Do we want it on all the time? Why or why not?"
-eric
On Aug 17, 2011, at 3:02 PM, Will Dietz wrote:
> To get clang to emit va_arg instructions for va_arg() calls, as
> opposed to manually lowering it in the frontend, same as the llvm-gcc
> patch sent earlier does.
>
> ~Will
>
> On Wed, Aug
2010 Jul 19
0
[LLVMdev] Is va_arg deprecated?
Neal,
FYI, my group has added a flag to llvm-gcc for emitting the va_arg
instruction (instead of lowering in the front-end),
and we also have an implementation of the VAARG instruction for
X86-64. (which is currently not implemented in the LLVM backend).
Both of these things will be sent upstream to LLVM soon, pending some
more testing and review.
If you are dire need of these features now, I
2011 Aug 17
2
[LLVMdev] Is va_arg deprecated?
To get clang to emit va_arg instructions for va_arg() calls, as
opposed to manually lowering it in the frontend, same as the llvm-gcc
patch sent earlier does.
~Will
On Wed, Aug 17, 2011 at 2:41 PM, Eric Christopher <echristo at apple.com> wrote:
>
> On Aug 17, 2011, at 11:53 AM, Will Dietz wrote:
>
>> FWIW, attached is a similar patch that adds a -falways-use-llvm-vaarg
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
2010 Jul 19
4
[LLVMdev] Is va_arg deprecated?
Hi folk,
I'm writing a set of small C code to verify whether my pass handle some
instruction correctly. One of the instruction I want to test is "va_arg",
but compiling my variadic function does not generate any va_arg instruction.
Is va_arg deprecated? Will va_arg instruction ever be generated by any
front-end? The source code and llvm instructions are appended as follows.
the
2009 Jan 04
2
[LLVMdev] hi, llvm-gcc deal with va_arg() by word alignment.
hi,
I am porting llvm to our embedded cpu.
By my abi, long long type is aligned by 8 bytes.
But now llvm-gcc frontend follows x86 abi, generate
word-alignment LLVM-IR for va_arg().
In some degree, llvm-gcc frontend depends on targets.
The best solution is llvm-gcc can create va_arg node,
I can lower it at the backend.
Who can give a temporary solution to make frontend can
create 8
2011 Aug 17
0
[LLVMdev] Is va_arg deprecated?
On Aug 17, 2011, at 11:53 AM, Will Dietz wrote:
> 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,
2016 Jan 08
2
Is it a va_arg bug in clang?
For the variadic function error with AMD64 abi and windows calling convention on 64bits x86, I find it has been tracked in Bug 20847 (https://llvm.org/bugs/show_bug.cgi?id=20847) (http://reviews.llvm.org/D1622#inline-9345). Do we still plan to fix it?
You know, I meet exactly same va_arg mistake with llvm3.7 when I enable the Uefi firmware (http://www.uefi.org/) build with clang. The ms_abi is
2011 Aug 18
1
[LLVMdev] Is va_arg deprecated?
Oh, sorry about that, and thanks for the clarification as to what you
were looking for.
Here you go:
** Why do we want this option? **
Presently clang will manually lower va_arg() in the frontend to the
equivalent (relatively complicated!) IR, as opposed to making use of
the LLVM va_arg instruction directly. IR that contains the va_arg
instruction is much easier to analyze because it is
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
2011 Feb 19
2
[LLVMdev] Is va_arg deprecated?
Hi David,
I'm working on source to source transformations and instrumentation.
A flag to disable 'va_arg' lowering in LLVM FEs will be very useful.
Have you sent your modifications upstream to LLVM?
If not, could you please share link to your public repository.
Thanks,
Sergey Yakoushkin
On Mon, Jul 19, 2010 at 11:18 PM, David Meyer <pdox at google.com> wrote:
> Neal,
>
2013 Feb 27
2
[LLVMdev] Mips backend 3.2 va_arg possible bug
i have this code
typedef long long L;
typedef integer I;
void test2(auto L p0, auto L p1, auto L p2, auto L p4, ...)
{
va_list select;
va_start (select, p4);
report( va_arg(select,L) );
report( va_arg(select,I) );
report( va_arg(select,L) );