Jump to content
IGNORED

SDCC maybe changing the default ABI


PkK
 Share

Recommended Posts

There has been some work on a change of the ABI in SDCC. It is not yet decided if the change will go ahead.

Basically, such a change would break existing asm code (as the way parameters and return values are passed)¹, but would give an improvement in code size and speed.

In particular, the new ABI would pass some parameters in registers, would pass the return values in different registers, and for some function the cleanup of stack parameters would be done by the callee instead of the caller.

 

More details can be found in the SDCC feature request:

https://sourceforge.net/p/sdcc/feature-requests/732/

 

Work is happening the in the breaktheworld branch, where the new ABI is the default, and mostly working (in particular, banked calls, i.e. for the ColecoVision using a Megacart is not yet working there).

 

¹ There is a way to mark individual functions as using the old ABI via __sdcccall(0) to continue using existing asm functions from C code compiled for the new convention.

Link to comment
Share on other sites

There would also be a --sdcccall N option to set the default. The final change of default ABI, if it happens would change the default in case of absence of --sdcccall N or __sdccall(N), and set the default for the precompiled standard library.

 

Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...