[LLVMdev] Declaration of a va_list should be an intrinsic?
Chris Lattner
sabre at nondot.org
Tue Apr 3 11:18:05 PDT 2007
On Tue, 3 Apr 2007, Nicolas Geoffray wrote:
>> Right now, vaarg
>> handling is not target independent at the llvm level.
> Isn't this an error at the conception level? llvm bytecode should be
> target independent.
Ideally yes. However, llvm-gcc does a number of non-portable things
already. For example, I think it currently lowers vaarg to pointer
arithmetic, instead of using the correct intrinsic. If you'd like to look
into fixing this stuff, it would be great, but I think some of the
problems will be harder to fix than others.
>> I agree that a
>> va_list alloc intrinsic would go a long way towards abstracting the
>> target ABI from a vaarg function.
> So you agree that it's the correct way to implement this target-dependant
> feature? Updating all backends shouldn't be too hard.
This sounds like a great way to go to me. Updating llvm and the backends
won't be hard. It may be more difficult to coax this intrinsic out of the
f.e.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list