Document need (or no need) to save & restore registers in asm_xtensa functions
I am discovering micropython for the esp8266 and am absolutely astonished at what is possible already!
One thing I am struggling with is the machine.asm_xtensa decorator which so far is undocumented.
Most things can be understood by analogy to the documented machine.asm_thumb decorator, but one thing absolutely stumps me:
Does one have to save and restore any registers one modifies in an asm_xtensa function? If so, are there any convenient solutions for doing so, or does one have to all the stack pointer algebra oneself? The asm_thumb instruction push({...}) looks great!
py/nlrthumb: Save and restore some VFP registers.
These s16-s21 registers are used by gcc so need to be saved. It seems that gcc doesn't use any higher registers (s22-s31) so as an optimisation (for C stack usage, and time storing/loading them) they are not saved/restored.
See issue #4844