The MSP430X CPU supports the PUSHM and POPM instructions, which can push
and pop multiple registers to and from the stack in a single
instruction.
For example:
pushm #2, r10 popm #2, r10
is equivalent to:
push r10 push r9 pop r9 pop r10
PUSHM and POPM only cost 2+n cycles, with a size of one word, so their
use can significantly improve performance and reduce code size,
compared to using individual PUSH and POP instructions.
In addition to the LLVM regression tests, I also ran the dg.exp, execute.exp,
and dg-torture.exp testsuites from GCC, using the MSP430 Binutils simulator.
The results for -mcpu=msp430{,x} were unchanged compared to the results for
without the patch.
If the patch is acceptable, I would appreciate it if someone would apply it
for me using the name and email
"Jozef Lawrynowicz <jozefl.opensrc@gmail.com>",
as I do not have commit access.
Thanks,
Jozef