mspgcc: A port of the GNU tools to the Texas Instruments MSP430 microcontrollers | ||
---|---|---|
<<< Previous | An introduction to the TI MSP430 low-power microcontrollers | Next >>> |
Generally, instructions take 1 cycle per word of memory accessed.
Thus, start with 1 cycle for the instruction itself. Then add 1 cycle for a memory source, 2 cycles for a memory destination, and one additional cycle per offset word.
Note that in two-operand instructions, memory destinations require an offset word, so they cost a total of 3 cycles.
This holds even for instructions (MOV, CMP and BIT) that only access the destination once.
Short immediate constants (using r2 or r3) count as register operands for instruction timing purposes.
Exceptions to this rule are:
A 2-operand instruction which writes to PC (r0) takes an extra cycle if it's only one word long (i.e. source not indexed).
Jumps take 2 cycles, whether taken or not.
PUSH, CALL and RETI are special:
Other CPU operations take following times to execute:
<<< Previous | Home | Next >>> |
The instruction set | Up | Interrupts |