diff options
author | Yuji Mano <yuji.mano@am.sony.com> | 2009-03-19 13:54:58 -0700 |
---|---|---|
committer | Yuji Mano <yuji.mano@am.sony.com> | 2009-03-23 12:21:33 -0700 |
commit | 6d773b0dd71fa76777e62939b303d22c8a00138e (patch) | |
tree | 610ed7a32c25ac2e1aa8b74c9e41e67e9a5a4935 | |
parent | 7ff60f2f6fe33c9f5d6fce65f52a1986c6a483a9 (diff) | |
download | mars-src-6d773b0dd71fa76777e62939b303d22c8a00138e.tar.gz |
task: Module switch asm fix
This patch fixes the task module module/task switch code.
Need to reserve 16 bytes for global __module_stack and __task_stack storage.
Put __module_stack and __task_stack in .bss since its uninitialized data.
Replace incorrect lqr instructin with lqa instruction.
Signed-off-by: Yuji Mano <yuji.mano@am.sony.com>
Acked-by: Kazunori Asayama <asayama@sm.sony.co.jp>
-rw-r--r-- | task/src/mpu/module/task_switch.S | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/task/src/mpu/module/task_switch.S b/task/src/mpu/module/task_switch.S index 1d5a936..0c688da 100644 --- a/task/src/mpu/module/task_switch.S +++ b/task/src/mpu/module/task_switch.S @@ -35,19 +35,19 @@ * LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY. */ -.data +.section .bss /* void *__module_stack */ .align 4 .globl __module_stack __module_stack: -.space 4 +.space 16 /* void *__task_stack */ .align 4 .globl __task_stack __task_stack: -.space 4 +.space 16 .text @@ -118,7 +118,7 @@ task_restore: brsl $LR, __task_restore /* call task restore body */ brsl $LR, __registers_restore /* restore registers */ - lqr $SP, __task_stack /* restore task stack */ + lqa $SP, __task_stack /* restore task stack */ sync /* sync before execution */ ai $SP, $SP, 48 /* pop task_save stack frame */ @@ -169,7 +169,7 @@ __registers_restore: shlqbyi INST_MASK, INST_MASK, 15 /* shift to correct position */ body: - lqr STACK_PTR, __task_stack /* load task stack pointer */ + lqa STACK_PTR, __task_stack /* load task stack pointer */ il TEMP, -NUM_REGS * 16 /* size of reg save area */ a REGS_PTR, STACK_PTR, TEMP /* set reg load addr pointer */ ai CODE_PTR, REGS_PTR, -2 * 16 /* set code load addr pointer */ |