Is there a way in ESP32 Xtensa assembly to change the content of an address location by "dirting" only one register?
Posted: Tue Apr 23, 2024 6:57 pm
I've searched in Xtensa ISA doc but can not find any instruction which would perform anything with content of an address (its value is stored in one register), which then imply that for changing of some memory location at least two registers must be "dirted" something like
Did I miss something or it is just impossible to do it by "dirting" only one register? Something like:
Code: Select all
movi a1, address
l32i a0, a1, 0 // take the content in another register
add a0, a0, 1 // let's say increment it
s32i a0, a1, 0 // store back new content
Code: Select all
l32i a0, address, 0 // take the content of address
add a0, a0, 1 // let's say increment it
s32i a0, address, 0 // store back new content to address