[LLVMdev] another problem with function arguments aligment

Evan Cheng evan.cheng at apple.com
Tue Feb 27 13:05:10 PST 2007


This is a design decision to not allow passing aggregates by value.  
Chris has already started working on some major changes to make llvm  
flexible enough to represent any calling conventions.

Chris was right though. You can probably fix this particular bug in  
the frontend by not splitting i64 into a pair of i32's.

Evan

On Feb 27, 2007, at 11:02 AM, Lauro Ramos Venancio wrote:

> I think, we must move function arguments lowering from frontend to
> LLVM core. This lowering is generating machine dependent bytecode. See
> http://llvm.org/bugs/show_bug.cgi?id=1230
>
> Lauro
>
> 2007/2/26, Chris Lattner <sabre at nondot.org>:
>> On Mon, 26 Feb 2007, Lauro Ramos Venancio wrote:
>>> The problem is: llvm-gcc generates the same bytecode for both  
>>> functions:
>>>
>>> declare void @f(i32, i64)
>>> declare void @g(i32, i64)
>>>
>>> I can't differ an i64 argument from a struct argument.
>>
>> Oops.  You can fix this by changing llvm-gcc: gcc/llvm-abi.h
>>
>> Grep for instances of Int64Ty there.  I can help answer any q's  
>> you might
>> have.
>>
>> -Chris
>>
>> --
>> http://nondot.org/sabre/
>> http://llvm.org/
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list