Thank you for the clarification.
I also found that clang generates much better asm than arm-none-eabi-gcc.
Ooops, sorry for the duplication.
Thank you for the clarification.
I also found that clang generates much better asm than arm-none-eabi-gcc.
I don't really remember the exact reasons, but "noinline" wasn't good enough in
this case, so we used a volatile function pointer. The reason is that the C
compiler must not optimize out our conservative GC stack marking. None of this
is required for arc/orc.
Look at this very strange code:
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void); // <-- volatile?!! Why?
PreMain();
inner = NimMainInner;
(*inner)();
}
Run
This code turns into strange asm (ARM v6, dan