Based on the TI documentation when a 'push' instruction is executed 1st thing that happens is R1(stack pointer) decremented by 2. The current (svn 100) openmsp430 is fetching the data from RAM //prior// R1 update.
e.g. the code: push 4(r1) push 4(r1)
should replicate last 2 elements from the stack.
iiahim
Hi Mihai,
Thanks a lot for the report. That was a tricky one :-P
I had a closer look and the bug occurs only when the push instruction is executed with the stack pointer (SR/R1) as an operand with an addressing mode which is either:
This bug will be fixed shortly.
Thanks again, Olivier
Fixed in SVN revision 102
It is to be noted that the POP instruction is not concerned by this bug.