I thought maybe there is some trick to store variable in IRAM (lets say right after ret instruction, or before routine entry point) and use some relative addresing to PC (which then could fit inside 24 bits OP code format size) but there is no such addresing mode which utilize only literal offset (without register). Also possible way would be to target address in cache and then using literal offset access to that value without utilizing register for address. Offcorse, reading would be into some register but that way it would be only one utilized. Also posible way would be to use some special register for address index (similary like indexed addressing is performed on microcontrollers). So you would use lets say
Code: Select all
movi a0, addres
wsr a0, some special register
l32i a0, that special register in indexing address mode
inc a0
s32i a0, that special register for indexing addres mode
Aniway, thanks for info. Now, at least, I know that I didn't miss anything.
Also one more instant question, is there any document describing register policy in ISR? For example what registers are automaticaly preserved and how, what registers can be changed and what registers must not be changed and so on. Are there some registers strictly reserved by ESP-IDF. I mean, for examle, when a higher priority interrupt, interrupts some executing ISR of lower priority interrupt what registers are preserved in such a call of higher priority ISR?