[LLVMdev] LLVM 2.6 and Aggregate Return Values: 64 bit

Kenneth Uildriks kennethuil at gmail.com
Wed Jan 20 07:43:37 PST 2010

On Wed, Jan 20, 2010 at 9:35 AM, John Criswell <criswell at uiuc.edu> wrote:
> Duncan Sands wrote:
>> Hi John,
>>> How well does LLVM 2.6 support aggregate return values for 64 bit
>>> targets?  I'm currently working on 64 bit Mac OS X and 64 bit Linux.
>>> Are there any known problems or limitations?
>> on x86-64 it depends on what you are returning, but for example you
>> should be able to return a 128 bit integer fine,
> Just to make sure I understand, if the size of the aggregate return
> value is 128 bits or less, then it should work.  Correct?
>>  but anything more
>> will cause the code generator blow up.
> By "blow up," do you mean that the code generator will fail to generate
> code at all (e.g., it will hit an assertion) or do you mean that the
> code generator will generate incorrect code?  I am seeing the latter in
> my code, and I currently suspect it's a code generator bug (though I
> could be wrong).

You will see the code generator hit an assertion if the return value
isn't supported on your platform.  If assertions are turned off, then
of course it will generate bad code.

On the trunk, large struct returns *should* work on x86-64, but I
haven't tested that... I've only tested x86.

More information about the llvm-dev mailing list