__attribute__ __stdcall__ support broken in latest-egcs

Richard Henderson rth@cygnus.com
Sat Apr 24 22:38:00 GMT 1999


On Fri, Apr 09, 1999 at 07:54:15PM +0200, Marcus Meissner wrote:
> Following code snippet
> ------------------------------------------------
> int __attribute__((__stdcall__)) foo(int a) {
> 	return a+1;
> }
> -----------------------------------------------
[...]
>    d:	c2 10 00       	ret    $0x10
> 
> The ret should be "ret 0x4", not "ret 0x10".

There were several bugs lurking in this area.  The most direct
offender being the one in function.c; the changes to calls.c
are needed to actually keep the stack aligned with stdcall.  An
interesting test case for that last is attached.



r~


More information about the Gcc-patches mailing list