[llvm-commits] [PATCH] Win64 var arg support

Cameron Esfahani dirty at apple.com
Tue Sep 14 16:49:27 PDT 2010


Okay, here's a version which reverts the listed change below.  I'm using the TargetFrameInfo to determine how far we are from the caller allocated portion of the stack.

I've also written a test case to verify that the non-var arg, more than 4 parameter, function calls still work.

Hopefully this should address all the remaining issues for the Windows 64 var args patch.



On Sep 2, 2010, at 8:42 PM, Cameron Esfahani wrote:

> This is required for the var arg support.  Without this change, there's no way to know how far the home register space allocated by the caller is from the top of the stack.  Any fixed object created via MFI is put at it's offset after the frame info stuff is calculated.  So, if you wanted to put something into the caller's frame, it's pretty difficult.
> 
> On Sep 2, 2010, at 4:13 PM, Anton Korobeynikov wrote:
> 
>> Hello, Cameron
>> 
>>> Here's the corresponding llvm changes to support the Win64 ABI version of var args.  With a test case!
>> This hunk seems to be unrelated to the patch and in wrong in general:
>> -              (Subtarget.isTargetWin64() ? -40 :
>> -               (Subtarget.is64Bit() ? -8 : -4))),
>> +              (Subtarget.is64Bit() ? -8 : -4)),
>> Why do you need it?
>> 
>> -- 
>> With best regards, Anton Korobeynikov
>> Faculty of Mathematics and Mechanics, Saint Petersburg State University
> 
> Cameron Esfahani
> dirty at apple.com
> 
> "You only live once, and the way I live, once is enough"
> 
> Frank Sinatra

Cameron Esfahani
dirty at apple.com

"Americans are very skilled at creating a custom meaning from something that's mass-produced."

Ann Powers


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100914/5e94c08b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm_va.patch
Type: application/octet-stream
Size: 5873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100914/5e94c08b/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100914/5e94c08b/attachment-0001.html>


More information about the llvm-commits mailing list