https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106977

--- Comment #21 from ibuclaw at gcc dot gnu.org ---
There is something about the Darwin ABI I'm just not getting from looking at
the front-end alone though:

C++ Darwin 32-bit calling a method that returns an 8 byte struct:
```
__Z4testP3Bar:
        subl    $24, %esp
        movl    28(%esp), %eax
        movl    (%eax), %edx
        pushl   %eax            // <--
        call    *(%edx)
```

C++ Linux 32-bit calling a method that returns an 8 byte struct:
```
_Z4testP3Bar:
        subl    $44, %esp
        movl    %gs:20, %edx
        movl    %edx, 28(%esp)
        xorl    %edx, %edx
        movl    48(%esp), %eax
        leal    8(%esp), %ecx
        subl    $8, %esp
        movl    (%eax), %edx
        pushl   %eax            // <--
        pushl   %ecx            // <--
        call    *(%edx)
```

Reply via email to