diff --git a/cpukit/score/cpu/bfin/ChangeLog b/cpukit/score/cpu/bfin/ChangeLog index b7de26fb2f..5f276f92e1 100644 --- a/cpukit/score/cpu/bfin/ChangeLog +++ b/cpukit/score/cpu/bfin/ChangeLog @@ -1,3 +1,7 @@ +2010-04-17 Mike Frysinger + + * cpu.c: Blackfin ABI requires L registers to be 0 upon function entry. + 2010-03-27 Joel Sherrill * Makefile.am: Remove unused file. diff --git a/cpukit/score/cpu/bfin/cpu.c b/cpukit/score/cpu/bfin/cpu.c index 58b96bae54..4afab4ab7c 100644 --- a/cpukit/score/cpu/bfin/cpu.c +++ b/cpukit/score/cpu/bfin/cpu.c @@ -195,6 +195,12 @@ void _CPU_Context_Initialize( the_context->register_sp = stack_high; 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; }