Browse Source

change thread return address.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1848 bbd45198-f89e-11dd-88c7-29a3b14d5316
nongli1031@gmail.com 13 years ago
parent
commit
212d828d3f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libcpu/xilinx/microblaze/stack.c

+ 1 - 1
libcpu/xilinx/microblaze/stack.c

@@ -48,7 +48,7 @@ rt_uint8_t *rt_hw_stack_init(void *tentry, void *parameter, rt_uint8_t *stack_ad
     *stk-- = 0; /* r19 */
     *stk-- = 0; /* r18 */
     *stk-- = 0; /* r17 */
-    *stk-- = (unsigned long) texit; /* r15 = task return address*/
+    *stk-- = (unsigned long) texit - 8; /* r15 = task return address*/
     *stk-- = (unsigned long) tentry; /* r14 = entry address*/
     *stk-- = (unsigned long) &_SDA_BASE_; /* r13 */
     *stk-- = 0; /* r12 */