Am 14.07.22 um 13:10 schrieb Tony Pavlov via Sdcc-user:
Hello Philipp,
Thursday, July 14, 2022, 1:58:07 PM, you wrote:
NO!!!! Please, don't do that!
1. A lot of projects have bug chunks of assembly code in "form 1"
2. Allowing assembly-written naked functions is crucial
3. Separate assembly-only sources not always work well, because you loose
the ability to land it into the same object! For example, if you use
automatic banking and similar stuff, you loose ability to put assembly
beside the C code into the same bank.
This part is fine, why need do break it?
Your "improvements" will break the GBDK-2020 library.
There are still a lot of hacks beside that in SDCC, even more annoying, for
example, text-based PH rules. Why not enhance that instead?!
SDCC needs a new preprocessor, and the inline asm forms is an issue that
came up there. The peephole optimizer, which is invoked much later is
not such a problem.
Even with the proposed changes, naked functions written in assembly
would still work. Only the possible future GCC-style forms with : in
them would not work there (but that is fine, since they are meant to
provide functionality for interacting with surrounding C code in the
same function, so they don't make sense for naked functions anyway).
I see the problem with exiting asm using form 1. However, it causes
issues with the preprocessor.
Would it be ok for your project, if we keep support for form 1, but
restrict it a bit: disallow the use of preprocessor directives and
macros in between __asm and __endasm?
Then only the users that want to use preprocessor functionality in
inline assembler would have to switch to form 2.
Philipp
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user