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

H.J. Lu via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 8 14:49:52 PST 2016


On Mon, Feb 8, 2016 at 2:42 PM, Richard Smith <richard at 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.


More information about the cfe-commits mailing list