Displaying 20 results from an estimated 193 matches for "va_args".
Did you mean:
va_arg
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
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
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,
2011 Jun 13
1
[LLVMdev] Modifying DAG in TargetLowering::ReplaceNodeResults()
Hi!
I am trying to implement va_arg() on ppc32. Everything went smooth, except
implementing va_arg() of 64bit int. Since i64 is not a legal type on ppc32
DAGTypeLegalizer::ExpandRes_VAARG() splits the va_arg(i64) into two i32
va_args.
The problem with ppc32 va_arg is that it needs special "alignment" of its
gpr pointer when the argument is i64. Ie. I need to know if I am lowering
va_arg of i64.
I tried to tackle this by providing custom lowering for va_arg(i64) that
just aligns stuff properly. I do this by adding I...
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
2016 Apr 20
3
va_arg on Windows 64
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,
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
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 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
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
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
2016 Oct 19
4
[Sparc] vararg double issue on 32 bit Sparc processors
...on Sparc processors (specifically, LEON, but I suspect but can't verify that it also happens on all Sparc processors).
The problem is, or appears to be with using double values in Sparc (32 bit).
Specifically, double values are not being loaded into registers correctly within a function using va_args. Only half the value is loaded (i.e. 32, rather than 64 bits of the value).
What I have also found is that the failure does not happen in all circumstances. The simplest situation I've been able to re-create that avoids the problem is to put a store and subsequent load instruction around the v...
1999 Dec 10
0
snprintf from postgresql
/*
* Copyright (c) 1983, 1995, 1996 Eric P. Allman
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of
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
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
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
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
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 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,