[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-commits
Subject:    Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
From:       "H.J. Lu via cfe-commits" <cfe-commits () lists ! llvm ! org>
Date:       2016-03-08 15:01:54
Message-ID: CAMe9rOqiTfZuOHeuPa6tvH_fRasTYRFjGTSnFDAHtX8v1-5fOw () mail ! gmail ! com
[Download RAW message or body]

On Tue, Mar 1, 2016 at 8:43 AM, Michael Matz via cfe-commits
<cfe-commits@lists.llvm.org> wrote:
> Hi,
>
> On Mon, 29 Feb 2016, Jason Merrill wrote:
>
>> > Also this insistence that all of "trivially copyable" is already quite
>> > nicely specified in the C++ ABI is still not really relevant because
>> > C++ _is not the only language out there_.  I'm not sure how often I
>> > have to repeat this until people get it.
>>
>> Other language ABIs can handle language specific calling conventions as
>> appropriate for them.  The psABI can only talk about things that are in
>> its domain.
>
> Naturally.  How far to follow that road, though?  Remove the word "class"
> from the description of empty types again?  Why is that in-domain and the
> notion of trivially copyable isn't?
>

Removing "class" is a good idea.  Here is the updated change:

An empty type is a type where it and all of its subobjects (recursively)
are of structure, union, or array type.  No memory slot nor register
should be used to pass or return an object of empty type.

Footnote: Array of empty type can only passed by reference in C and C++.

Languages may have exceptions like array in C/C++ and class in C++.

-- 
H.J.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic