> I'm not sure the resulting code will actually work
Thinking on this - I do recall GCC having problems with anything other than -O0 on Firewing generated code. Basically, there is a lot of underlying ASM used in the Firewing code which the GCC optimiser doesn't handle very well. There may be a better way of coding the ASM macros used (they are open source, so can be modified) so the optimiser handles them correctly but at the time there were written, I couldn't find one. The Firewing32 compiler uses a completely different approach, where no ASM was used at all. This allowed the GCC optimiser to be used, so all Firewing 32 programs can have all -Ox options enabled. However, you have this strange situation where optimised high level GCC code isn't necessarily better than hand rolled ASM so I'm very reluctant to re-code all the macros in order to test. It would be interesting to compare performance against a native Firewing program with -O0 against an equivalent c program with -O2. If I get time I may look at that - any suggestions of the type of program for the test would be welcome. I've written quite a lot of commercial code using Firewing16 in the last year and never encountered any performance issues, even with the default -O0.
