2008-07-29 02:24 AM
INC /DEC
2011-05-17 03:40 AM
an expression like
unsigned int i; i--; is compiled as LDR SUBS STR is there any sort of INC / DEC command to do this in one instruction on the ARM like on other processors? matt2011-05-17 03:40 AM
SUBS is equivalent to a decrement instruction. LDR and STR are only required if your variable resides in memory and it is not allocated into a register.
So: yes, it has increment/decrement instructions but it is not capable to increment/decrement variables in memory (like most other RISCs, it is a load/store machine). regards, Giovanni --- ChibiOS/RT