Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - SDCC maybe changing the default ABI

Reply to topic
Author Message
  • Joined: 07 Aug 2007
  • Posts: 220
  • Location: Yach, Germany
Reply with quote
SDCC maybe changing the default ABI
Post Posted: Sat Aug 14, 2021 6:41 am
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/

And in discussion on the sdcc-user mailing list.

Work is happening the in the breaktheworld branch https://sourceforge.net/p/sdcc/code/HEAD/tree/branches/breaktheworld/, where the new ABI is the default, and mostly working (in particular, banked calls are 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. And an option --sdcccall N to set the default ABI version.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!