On 22.02.22 19:20, Richard Hodges wrote:
Hi, all.
I see that 4.2 is on its way, and I would like to be sure that my inline
assembly won't die suddenly.
The latest manual has a new, expanded section 4.5.1 describing the new
ABI and states:
"Using the option –sdcccall 0, the default can be changed to version 0."
I would like to verify that adding "-sddcall 0" to my compiler flags in
the Makefile will ensure compatibility with my old assembler code.
To my knowledge `--sdcccall 0` even counts for the standard library and
therefore is useful if you use your own standard library. 4.2.0 will not
come with a standard library precompiled for the old calling convention,
so if you want to use sdcc's it's better to use `__sdcccall(0)` for your
legacy asm.
Next question is about new inline assembly code. If I use "-sdcccall 0"
as a general compiler flag, can I start using "__sdcccall(1)" to use the
new ABI?
Would I need this for every function? Or is it persistent for all
functions until I change it with "__sdcccall(0)"?
The manual actually doesn't say it in the STM8 section, but others are
more clearly, for example Z80 says:
> This calling convention can be chosen for individual function via
__sdcccall(1).
http://sdcc.sourceforge.net/doc/sdccman.pdf#subsection.4.3.3
So you have to add that to every function.
--
Freundliche Grüße / Yours sincerely
Sebastian „Baŝto“ Riedel
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user