Am 29.06.21 um 10:22 schrieb Павел Бельтюков: > It would be great if there was some macro definition indicating calling > convention at compile time. > In such case we could do something like that: > > void some_func() > { > __asm > #ifdef __SDCC_STM8_CALL_LEGACY > /*Legacy code*/ > #else /* __SDCC_STM8_CALL_LEGACY */ > /*Code for current calling convention*/ > #endif /* __SDCC_STM8_CALL_LEGACY */ > __endasm; > } > > > Best regards, > Paul Beltyukov
Do we need a separate macro? There will be a bump in the minor version number anyway, so you could test for that (or test for the revision, as I do to deal with old char getchar(void) vs current int getchar(void)). Philipp _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user