I also have rather a lot of inline assembly code in form 1. I have entire libraries that are almost exclusively naked functions consisting of only form 1 inline assembly - in fact, mostly done that way specifically because I wanted to take advantage of C preprocessor macros within the inline assembly. For example, when __SDCC_MODEL_LARGE is defined, use a different value within inline assembly for stack pointer offset of function arguments; or, to conditionally include/exclude certain sections of assembly code.

It is far, far more convenient to use form 1 inline assembly than form 2, where you are burdened with the business of quoting and escaping characters, etc. I curse any time I have to do inline assembly with GCC!

So I would definitely not want support for form 1-style inline assembly dropped.

If changes need to be made, I'm actually not really concerned with how exactly 'block' inline assembly syntax is manifested, so long as there remains a style of including inline assembly that consists of a start and an end marker, with anything in-between ignored by the C compiler (but not the preprocessor) and passed verbatim to the assembler.

I don't mind the changing of __asm("...") to __asm__("...") if it makes it easier to support in future input and outputs for the assembly code. I would love to be able to use such a feature with inline assembly - to at the very least be able to formally associate global/static C variables with whatever assembly symbol is associated with it. I always feel dirty relying on the informal implementation detail of SDCC making assembly symbols the same as the variable name prefixed with an underscore (e.g. "foo" => "_foo").

Regards,
Basil Hussain


_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to