diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-04-17 19:24:16 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-04-17 19:24:16 +0000 |
commit | dace69bfc49b217fa80783e0e9092851622b03d7 (patch) | |
tree | 6bce6607917274ed0ed57274f396b0e4956bdc50 /cpukit/score/cpu/bfin/cpu.c | |
parent | 2010-04-17 Mike Frysinger <vapier.adi@gmail.com> (diff) | |
download | rtems-dace69bfc49b217fa80783e0e9092851622b03d7.tar.bz2 |
2010-04-17 Allan Hessenflow <allanh@kallisti.com>
* cpu.c, cpu_asm.S, rtems/score/cpu.h: Fine tune registers saved in the
context. The sp and imask registers need to be saved. Also allocated
12 bytes on the stack at thread entry as the abi requires that.
Diffstat (limited to 'cpukit/score/cpu/bfin/cpu.c')
-rw-r--r-- | cpukit/score/cpu/bfin/cpu.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/cpukit/score/cpu/bfin/cpu.c b/cpukit/score/cpu/bfin/cpu.c index 4afab4ab7c..f342e75e44 100644 --- a/cpukit/score/cpu/bfin/cpu.c +++ b/cpukit/score/cpu/bfin/cpu.c @@ -192,15 +192,10 @@ void _CPU_Context_Initialize( uint32_t stack_high; /* highest "stack aligned" address */ stack_high = ((uint32_t)(stack_base) + size); - the_context->register_sp = stack_high; + /* blackfin abi requires caller to reserve 12 bytes on stack */ + the_context->register_sp = stack_high - 12; the_context->register_rets = (uint32_t) entry_point; the_context->imask = new_level ? 0 : 0xffff; - - /* Blackfin C ABI requires L regs to be 0 upon func entry. */ - the_context->register_l0 = 0; - the_context->register_l1 = 0; - the_context->register_l2 = 0; - the_context->register_l3 = 0; } |