OpenCores

CALL SR bug

Back to bugtracker overview.

Information:
Type :: BUG
Status :: CLOSED
Assigned to :: nobody

Description:
Based on the TI documentation when a 'call' instruction is executed 1st thing that happens is R1(stack pointer) decremented by 2.
When using CALL in conjunction with the stack pointer, the current openmsp430 (svn 127 or earlier) is fetching the call address before the SR update.

For example the code: CALL 4(R1)
will in execute: CALL 2(R1)

Comments:

Girard, Olivier Dec 16, 2011
Bug fixed with SVN revision 129.

Note that beside PUSH and CALL, there are no other instructions modifying SR which can also use it as an argument.

Post a comment:
Login to post comments!

Back to bugtracker overview.

© copyright 1999-2014 OpenCores.org, equivalent to ORSoC AB, all rights reserved. OpenCores®, registered trademark.