Back to bugtracker overview.

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

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)


Jackson, Steve Feb 24, 2015
Disregard, got posted to wrong bug
Jackson, Steve Feb 24, 2015

I went back and checked, we're on Rev 117 so it likely got fixed in a subsequent release(s). I talked to the other engineer that actually found the bug, but our memory was a bit foggy on the circumstances for failure and unfortunately I only left a short comment in the code where I fixed it in the execution unit.

wire [1:0] mb_wr_msk = inst_alu[`EXEC_NO_WR] | reg_pc_call ? 2'b00 : // saj added reg_pc_call to prevent mem writes
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-2018, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.