Re: Linux-abi group

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 3:08 PM, Joseph Myers wrote: > On Mon, 8 Feb 2016, H.J. Lu wrote: > >> >> I was referring to program properties: >> >> >> >> https://groups.google.com/forum/#!topic/generic-abi/fyIXttIsYc8 >> > >> > This looks more like an ELF topic to me, not really ABI. >> > >> > Please di

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Richard Smith
On Mon, Feb 8, 2016 at 3:01 PM, H.J. Lu wrote: > On Mon, Feb 8, 2016 at 2:58 PM, Richard Smith wrote: >> On Mon, Feb 8, 2016 at 2:54 PM, H.J. Lu wrote: >>> On Mon, Feb 8, 2016 at 2:51 PM, Richard Smith wrote: On Mon, Feb 8, 2016 at 2:46 PM, H.J. Lu wrote: > On Mon, Feb 8, 2016 at 2:35

Re: Linux-abi group

2016-02-08 Thread Joseph Myers
On Mon, 8 Feb 2016, H.J. Lu wrote: > >> I was referring to program properties: > >> > >> https://groups.google.com/forum/#!topic/generic-abi/fyIXttIsYc8 > > > > This looks more like an ELF topic to me, not really ABI. > > > > Please discuss this on a GNU project list because it affects the > > ent

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 2:55 PM, Richard Smith wrote: > On Mon, Feb 8, 2016 at 2:49 PM, H.J. Lu wrote: >> On Mon, Feb 8, 2016 at 2:42 PM, Richard Smith wrote: >>> Do we really need an 'empty type' special case? >>> >>> The x86_64 psABI already seems clear that empty types with size <= 16 >>> are

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 2:58 PM, Richard Smith wrote: > On Mon, Feb 8, 2016 at 2:54 PM, H.J. Lu wrote: >> On Mon, Feb 8, 2016 at 2:51 PM, Richard Smith wrote: >>> On Mon, Feb 8, 2016 at 2:46 PM, H.J. Lu wrote: On Mon, Feb 8, 2016 at 2:35 PM, Richard Smith wrote: > On Mon, Feb 8,

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Richard Smith
On Mon, Feb 8, 2016 at 2:54 PM, H.J. Lu wrote: > On Mon, Feb 8, 2016 at 2:51 PM, Richard Smith wrote: >> On Mon, Feb 8, 2016 at 2:46 PM, H.J. Lu wrote: >>> On Mon, Feb 8, 2016 at 2:35 PM, Richard Smith wrote: On Mon, Feb 8, 2016 at 1:40 PM, H.J. Lu wrote: > > On Mon, Feb 8, 2016 a

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Richard Smith
On Mon, Feb 8, 2016 at 2:49 PM, H.J. Lu wrote: > On Mon, Feb 8, 2016 at 2:42 PM, Richard Smith wrote: >> Do we really need an 'empty type' special case? >> >> The x86_64 psABI already seems clear that empty types with size <= 16 >> are not passed at all. Following the algorithm in section 3.2.3,

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 2:51 PM, Richard Smith wrote: > On Mon, Feb 8, 2016 at 2:46 PM, H.J. Lu wrote: >> On Mon, Feb 8, 2016 at 2:35 PM, Richard Smith wrote: >>> On Mon, Feb 8, 2016 at 1:40 PM, H.J. Lu wrote: On Mon, Feb 8, 2016 at 12:38 PM, Richard Smith wrote: > On Mon,

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Richard Smith
On Mon, Feb 8, 2016 at 2:46 PM, H.J. Lu wrote: > On Mon, Feb 8, 2016 at 2:35 PM, Richard Smith wrote: >> On Mon, Feb 8, 2016 at 1:40 PM, H.J. Lu wrote: >>> >>> On Mon, Feb 8, 2016 at 12:38 PM, Richard Smith >>> wrote: >>> > On Mon, Feb 8, 2016 at 12:05 PM, H.J. Lu wrote: >>> >> >>> >> On Mon,

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 2:42 PM, Richard Smith wrote: > Do we really need an 'empty type' special case? > > The x86_64 psABI already seems clear that empty types with size <= 16 > are not passed at all. Following the algorithm in section 3.2.3, each > eightbyte is classified as NO_CLASS, and thus i

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 2:35 PM, Richard Smith wrote: > On Mon, Feb 8, 2016 at 1:40 PM, H.J. Lu wrote: >> >> On Mon, Feb 8, 2016 at 12:38 PM, Richard Smith wrote: >> > On Mon, Feb 8, 2016 at 12:05 PM, H.J. Lu wrote: >> >> >> >> On Mon, Feb 8, 2016 at 11:33 AM, Jonathan Wakely >> >> wrote: >> >>

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Richard Smith
Do we really need an 'empty type' special case? The x86_64 psABI already seems clear that empty types with size <= 16 are not passed at all. Following the algorithm in section 3.2.3, each eightbyte is classified as NO_CLASS, and thus is not passed. So the proposed change would only affect the beha

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Richard Smith
On Mon, Feb 8, 2016 at 1:40 PM, H.J. Lu wrote: > > On Mon, Feb 8, 2016 at 12:38 PM, Richard Smith wrote: > > On Mon, Feb 8, 2016 at 12:05 PM, H.J. Lu wrote: > >> > >> On Mon, Feb 8, 2016 at 11:33 AM, Jonathan Wakely > >> wrote: > >> > On 8 February 2016 at 19:23, Richard Smith wrote: > >> >> "P

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 12:38 PM, Richard Smith wrote: > On Mon, Feb 8, 2016 at 12:05 PM, H.J. Lu wrote: >> >> On Mon, Feb 8, 2016 at 11:33 AM, Jonathan Wakely >> wrote: >> > On 8 February 2016 at 19:23, Richard Smith wrote: >> >> "POD for the purpose of layout" is defined in the Itanium C++ ABI

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 11:33 AM, Jonathan Wakely wrote: > On 8 February 2016 at 19:23, Richard Smith wrote: >> "POD for the purpose of layout" is defined in the Itanium C++ ABI here: >> >> http://mentorembedded.github.io/cxx-abi/abi.html#definitions > > Thanks. So there's no problem using "POD f

Re: Linux-abi group

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 11:44 AM, Florian Weimer wrote: > * H. J. Lu: > >> On Mon, Feb 8, 2016 at 11:32 AM, Florian Weimer wrote: >>> * H. J. Lu: >>> I created a mailing list to discuss Linux specific,.processor independent modification and extension of generic System V Application Binar

Re: Linux-abi group

2016-02-08 Thread Florian Weimer
* H. J. Lu: > On Mon, Feb 8, 2016 at 11:32 AM, Florian Weimer wrote: >> * H. J. Lu: >> >>> I created a mailing list to discuss Linux specific,.processor independent >>> modification and extension of generic System V Application Binary Interface: >>> >>> https://groups.google.com/d/forum/linux-abi

Re: Linux-abi group

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 11:33 AM, Szabolcs Nagy wrote: > * H.J. Lu [2016-02-08 11:24:53 -0800]: >> I created a mailing list to discuss Linux specific,.processor independent >> modification and extension of generic System V Application Binary Interface: >> >> https://groups.google.com/d/forum/linux

Re: Linux-abi group

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 11:32 AM, Florian Weimer wrote: > * H. J. Lu: > >> I created a mailing list to discuss Linux specific,.processor independent >> modification and extension of generic System V Application Binary Interface: >> >> https://groups.google.com/d/forum/linux-abi >> >> I will start t

Re: Linux-abi group

2016-02-08 Thread Szabolcs Nagy
* H.J. Lu [2016-02-08 11:24:53 -0800]: > I created a mailing list to discuss Linux specific,.processor independent > modification and extension of generic System V Application Binary Interface: > > https://groups.google.com/d/forum/linux-abi > > I will start to document existing Linux extensions

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Jonathan Wakely
On 8 February 2016 at 19:23, Richard Smith wrote: > "POD for the purpose of layout" is defined in the Itanium C++ ABI here: > > http://mentorembedded.github.io/cxx-abi/abi.html#definitions Thanks. So there's no problem using "POD for the purposes of layout", and the change to "POD for the purpos

Re: Linux-abi group

2016-02-08 Thread Florian Weimer
* H. J. Lu: > I created a mailing list to discuss Linux specific,.processor independent > modification and extension of generic System V Application Binary Interface: > > https://groups.google.com/d/forum/linux-abi > > I will start to document existing Linux extensions, like STT_GNU_IFUNC. > I wil

Linux-abi group

2016-02-08 Thread H.J. Lu
Hi, I created a mailing list to discuss Linux specific,.processor independent modification and extension of generic System V Application Binary Interface: https://groups.google.com/d/forum/linux-abi I will start to document existing Linux extensions, like STT_GNU_IFUNC. I will propose some new e

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 10:46 AM, Jonathan Wakely wrote: > On 8 February 2016 at 18:31, H.J. Lu wrote: >> On Mon, Feb 8, 2016 at 10:30 AM, Jonathan Wakely >> wrote: >>> On 8 February 2016 at 18:26, Jonathan Wakely wrote: On 8 February 2016 at 17:58, H.J. Lu wrote: > On Mon, Feb 8, 2016

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Jonathan Wakely
On 8 February 2016 at 18:31, H.J. Lu wrote: > On Mon, Feb 8, 2016 at 10:30 AM, Jonathan Wakely > wrote: >> On 8 February 2016 at 18:26, Jonathan Wakely wrote: >>> On 8 February 2016 at 17:58, H.J. Lu wrote: On Mon, Feb 8, 2016 at 7:59 AM, Jonathan Wakely wrote: >>> A type is a s

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Jonathan Wakely
On 8 February 2016 at 17:58, H.J. Lu wrote: > On Mon, Feb 8, 2016 at 7:59 AM, Jonathan Wakely wrote: A type is a standard-layout type, or it isn't. >>> >>> How about "An empty record is standard-layout Plain Old Data (POD) >>> type and ..."? >> >> That's redundant, all POD types are standard-

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 10:30 AM, Jonathan Wakely wrote: > On 8 February 2016 at 18:26, Jonathan Wakely wrote: >> On 8 February 2016 at 17:58, H.J. Lu wrote: >>> On Mon, Feb 8, 2016 at 7:59 AM, Jonathan Wakely >>> wrote: >> A type is a standard-layout type, or it isn't. > > How about

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Jonathan Wakely
On 8 February 2016 at 18:26, Jonathan Wakely wrote: > On 8 February 2016 at 17:58, H.J. Lu wrote: >> On Mon, Feb 8, 2016 at 7:59 AM, Jonathan Wakely >> wrote: > A type is a standard-layout type, or it isn't. How about "An empty record is standard-layout Plain Old Data (POD) ty

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 7:59 AM, Jonathan Wakely wrote: >>> A type is a standard-layout type, or it isn't. >> >> How about "An empty record is standard-layout Plain Old Data (POD) >> type and ..."? > > That's redundant, all POD types are standard-layout types. > Apparently, not all standard-layout

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 8:15 AM, Jonathan Wakely wrote: > On 8 February 2016 at 16:05, H.J. Lu wrote: >> My understanding is >> >> A type that is standard-layout means that it orders and packs its >> members in a way that is compatible with C. >> >> What is the corresponding compatible type in C? >

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Jonathan Wakely
On 8 February 2016 at 16:05, H.J. Lu wrote: > My understanding is > > A type that is standard-layout means that it orders and packs its > members in a way that is compatible with C. > > What is the corresponding compatible type in C? An empty structure, such as struct A. One of the requirements f

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 7:59 AM, Jonathan Wakely wrote: > On 8 February 2016 at 15:42, H.J. Lu wrote: >> On Mon, Feb 8, 2016 at 7:02 AM, Jonathan Wakely >> wrote: >>> On 8 February 2016 at 13:54, H.J. Lu wrote: On Sun, Feb 7, 2016 at 12:52 PM, H.J. Lu wrote: The standard-layout

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Jonathan Wakely
On 8 February 2016 at 15:42, H.J. Lu wrote: > On Mon, Feb 8, 2016 at 7:02 AM, Jonathan Wakely wrote: >> On 8 February 2016 at 13:54, H.J. Lu wrote: >>> On Sun, Feb 7, 2016 at 12:52 PM, H.J. Lu wrote: >>> >>> The standard-layout POD is well defined: >>> >>> https://en.wikipedia.org/wiki/C%2B%2B1

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Mon, Feb 8, 2016 at 7:02 AM, Jonathan Wakely wrote: > On 8 February 2016 at 13:54, H.J. Lu wrote: >> On Sun, Feb 7, 2016 at 12:52 PM, H.J. Lu wrote: >> >> The standard-layout POD is well defined: >> >> https://en.wikipedia.org/wiki/C%2B%2B11#Modification_to_the_definition_of_plain_old_data >>

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread Jonathan Wakely
On 8 February 2016 at 13:54, H.J. Lu wrote: > On Sun, Feb 7, 2016 at 12:52 PM, H.J. Lu wrote: > > The standard-layout POD is well defined: > > https://en.wikipedia.org/wiki/C%2B%2B11#Modification_to_the_definition_of_plain_old_data > > Here is the updated proposal for Intel386, x86-64 and IA MCU

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-08 Thread H.J. Lu
On Sun, Feb 7, 2016 at 12:52 PM, H.J. Lu wrote: > On Sun, Feb 7, 2016 at 12:48 PM, Florian Weimer wrote: >> * H. J. Lu: >> I tested GCC 5.3.1 and Clang 3.5.0. GCC Clang s0 non-emptynon-empty s1 non-emptyempty s2 non-emptyempty s3