[sdiy] Organisation of tasks in synth's main uP

Olivier Gillet ol.gillet at gmail.com
Tue Nov 23 14:54:06 CET 2010


> Most compilers aimed at embedded systems, including GCC, usually have
> some way to place native assembler instructions in your C code
> ("inline assembler") and have the compiler sort out all the other
> stuff (function prologue and epilogue, etc) for you.  However  I don't
> generally recommend it for large functions (it tends to block any
> optimisations in that function, same with longjmp/setjmp) so best to
> hide it away in utility functions.

Same experience here... I found that avr-gcc did the "right" register
allocation in code surrounding inlined assembly only when the assembly
code was kept small and didn't touch too many variables. So it seems
better (and also good from a readability and code reuse point of view)
to keep in C the "glue" between small inlined assembly functions.



More information about the Synth-diy mailing list