[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-02-23 14:57:48
Message-ID: CAMe9rOqpMGOMORELX3-E6wUOcdGGkHysSBi9GFFHdHTv1es68w () mail ! gmail ! com
[Download RAW message or body]

On Mon, Feb 22, 2016 at 4:50 AM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> On Sat, 20 Feb 2016, Richard Smith wrote:
>
>> > An empty type is a type where it and all of its subobjects
>> > (recursively) are of class, structure, union, or array type.
>> >
>> > doesn't cover "trivially-copyable".
>>
>> That's correct. Whether a type is trivially copyable is unrelated to
>> whether it is empty.
>
> I would still feel more comfortable to include the restriction to
> trivially copyable types, not in the part of definition of empty type, of
> course, but as part of the restrictions of when a type can be passed in no
> registers.  Basically to clarify the intent in the psABI if there's any
> doubt.  I.e. like so:
>
> ---
> An empty type is a type where it and all of its subobjects (recursively)
> are of class, structure, union, or array type.  No memory slot nor
> register should be used to pass or return an object of empty type that's
> trivially copyable.
> ---
>
> (With possibly a self-sufficient definition of trivially copyable, that's
> language agnostic)
>

Do you have an example in which an empty type defined above isn't
"trivially copyable"?

-- 
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