Le 04/09/2012 20:55, Masur Jonathan a écrit :
> I am under the impression this is exactly what SDCC does - not using an 
> argument stack for maximal code optimisation - at the cost to not being 
> able to write re-entrant functions. But this is a very small price to 
> pay for something that can result in code which is 2x faster and smaller 
> too.
Hello,

It depends on the port.

the stack strategy is used in the pic ports, but the mcs51 uses an "overlay"
strategy. One of my wishes is to have an optional overlay strategy for the pic
port, because the stack-based code generated by the pic port is ugly (but highly
usable, I won't blame it, this is difficult code).

For your port, you can have both (as for mcs51): functions flagged with
__reentrant will use the stack convention, the others will use the overlay
convention.

To write a new port, I don't think you need an official guide, just look at how
an existing port is called from the main code and integrated, and start a new
one in a new subfolder :) If I remember correctly, there's a big port_t
structure that you have to fill with the proper values and function pointers.

Regards
Sebastien

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to