Dear SDCC users,

for a while there has been work on moving to a more efficient calling
convention. In particular, the following changes can substantially
improve the code geenerated for stm8:

* Pass some parameters in registers.
* Have the callee instead of the caller clean up stack parameters for
some functions (medium memory model only).

For a while, this has been implemented in the breaktheworld branch, as
the new default.

As of today, the new calling convention is also available in trunk (and
thus the snapshots); it can be make the default by compiling with
--sdcccall 1. Independent of the default, individual functions can be
marked as using the old convention via __sdcccall(0) or the new one via
__sdcccall(1).

The details are documented in the manual.

As of today (revision 12615), only two differences remain between trunk
and the breaktheworld branch:

* When the --sdcccall option is not used: in trunk, the old convention
is the default, in the branch the new convention is the default.
* In trunk, the standard library is compiled for the old convnetion, in
the branch it is compiled for the new convention.

If users are happy with the new ABI, these two differences will be
merged from the branch to trunk in the future. THIS WOULD BE A BREAKING
CHANGE, as hand-written asm code written for the old calling convention
would stop to work. Users of such code would have to either rewrite it
for the new convention, or add __sdcccall(0) to the function
declarations to continue using the old convnetion.

Philipp


_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to