Problem with pic16l_setled

Norbert Koch NKoch at demig.de
Wed Jul 27 14:11:42 GMT 2005


> 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


More information about the freebsd-hackers mailing list