Am 12.08.21 um 10:36 schrieb Philipp Klaus Krause: > 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: > […]
Some data comparing trunk (old calling convention) to the thebreaktheworld branch (new calling convention): * For the SDCC regression tests (which contain many small functions, so are affected a lot by the calling convention), the new ABI reduces code size by 8%, runtime by 1%. * For Whetstone, the new ABI reduces code size by 4%, reduces score by 3%. * For Dhrystone, the new ABI reduces code size by 3%, increases score by 4%. * For Coremark, the new ABI reduces code size by 2%, increases score by 3%. * For stdcbench, the new ABI reduces code size by 4%, increases score by 6%. Philipp P.S.: In case you wonder why Whetstone score regresses: Having the callee clean up stack parameters for functions makes the code slower, but smaller. The effect is very strong on whetstone due to the many calls to softfloat helper functions with their 32-bit return parameters (increasing overhead for in the callee). If we would go with caller-cleanup (as the current ABI does) instead, we'd get a small increase of Whetstone score instead of the regression, but also a much smaller Whetstone code size reduction. _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user