Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2005 16:09:51 +0200
From:      "Norbert Koch" <NKoch@demig.de>
To:        "Rink Springer" <rink@stack.nl>, "Ludvig Strigeus" <strigeus@gmail.com>
Cc:        hackers@freebsd.org, ed@fxq.nl
Subject:   RE: Problem with pic16l_setled
Message-ID:  <000701c592b4$dadcd000$4801a8c0@ws-ew-3.W2KDEMIG>
In-Reply-To: <20050727134432.GA10142@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
> You see, in C, I call the function like this (for example):
> 
> 	void pic16l_setled(unsigned int val);
> 	pic16l_setled (0x1234);
> 
> And it gets assembled to:
> 
> 	pushl	$0x1234
> 	call	pic16l_setled
> 
> But it should be assembled to:
> 
> 	pushl	$0x1234
> 	call	pic16l_setled
> 	add	$4,%esp			/* ditch the parameter */

Usually gcc collects stack cleanups.
See -fno-defer-pop.

Norbert



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000701c592b4$dadcd000$4801a8c0>