From dace69bfc49b217fa80783e0e9092851622b03d7 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 17 Apr 2010 19:24:16 +0000 Subject: 2010-04-17 Allan Hessenflow * 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. --- cpukit/score/cpu/bfin/cpu.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'cpukit/score/cpu/bfin/cpu.c') 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; } -- cgit v1.2.3