This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Richard Smith <richard at metafoo dot co dot uk>
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>, GCC Development <gcc at gcc dot gnu dot org>, cfe-commits <cfe-commits at lists dot llvm dot org>
- Date: Mon, 8 Feb 2016 14:49:52 -0800
- Subject: Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOofYT89yzF6jxFZFG2=QVQuQpEC7DP0HV_epjeawCf_sA at mail dot gmail dot com> <87d1s8wc4w dot fsf at mid dot deneb dot enyo dot de> <CAMe9rOp_6ZpR1YSJZ7AiLpa+FPRGJoLm5fTPkiH5BgF4Tkg3RA at mail dot gmail dot com> <87r3gouvv2 dot fsf at mid dot deneb dot enyo dot de> <CAMe9rOo2tPZKZEgpgFbbSnkyBiONzS9vfntn_QsxRPbVHZGmUw at mail dot gmail dot com> <87k2mgutzr dot fsf at mid dot deneb dot enyo dot de> <CAMe9rOoMujhjExxKWrz-Dv8uE33X=Upvi_X_HZsfeN0GS+=56A at mail dot gmail dot com> <CAMe9rOruCOvtM2D2AmG94A1_8Og8Kfu7tYF4De=XNfzUG+eh5g at mail dot gmail dot com> <CAH6eHdQci21ZhZ4odOfJRjC8s8HjuJ5X73LfK6oqvxCtOnzK6w at mail dot gmail dot com> <CAMe9rOpJXNUNvusTmwFb3riOxXyXLTGTquSMKqZkBe=nbmt_QQ at mail dot gmail dot com> <CAH6eHdQcvj7EY3jXgtUBQePfikiTbcuqsNFpDH7SWyxD628peQ at mail dot gmail dot com> <CAMe9rOrsV-zohnj=31_DDYSxUDyRDYL0anTi_NJm5vqogF9URQ at mail dot gmail dot com> <CAH6eHdQtnzMO6gLLRsczDdvmx0exkqXxyY-WvZ6RjuM7a3=85A at mail dot gmail dot com> <CAH6eHdQQjpOwD2kNCZVjH+w6N0Wh=gbdaaCcjg21iEbaHaAE5A at mail dot gmail dot com> <CAMe9rOq5QL9J0F-isO1njJyDJcZ08gF4zUk4vXNONWSfUtSzwA at mail dot gmail dot com> <CAH6eHdR0vJkYuYeKU=zyhthOY0KT-m8C=m2AtZ5GfVeyPOA=jw at mail dot gmail dot com> <CAOfiQqmKnONCdEi=coKaAKO_0Ux5X1BdYZ5t98gCU+LN21xKvw at mail dot gmail dot com> <CAH6eHdTxMXA7BEEHB7y6c5dRG_Hur5=CmdrQWMRn3zRGHnGZuA at mail dot gmail dot com> <CAMe9rOr9CCDjVVdYq7SoCDewg6uLnegEvT3Rrf2jg05SSyM_GQ at mail dot gmail dot com> <CAOfiQqnK-MFNhjcnHPPBpFfcJxR5rkdj26x8HcfMOiibCtevXA at mail dot gmail dot com> <CAMe9rOpM5Cs4zthCTAyaBEx3TWAQ7QNKv=k9mrqNzvj-upGcUw at mail dot gmail dot com> <CAOfiQq=EwsG7rLK_Ra+rsncJ2kBJzw7wUuqMqJp_zNH3_n07=A at mail dot gmail dot com> <CAOfiQq=q+Yrvxj+1HRBcdURm85zZqwCMke6ZDq6XYs_oyJwXAw at mail dot gmail dot com>
On Mon, Feb 8, 2016 at 2:42 PM, Richard Smith <richard@metafoo.co.uk> 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 is not passed. So the
> proposed change would only affect the behavior of types larger than 16
> bytes that contain no data. It doesn't seem worth breaking ABI to more
> efficiently pass those.
>
Clang isn't consistent between ia32 and x86-64. GCC isn't compatible
with clang. My proposal will make GCC and clang compatible. It also
makes GCC and clang behave the same on both ia32 and x86-64.
--
H.J.
- References:
- RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
- Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct