forked from Imagelibrary/rtems
2008-07-16 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/cpu.c: propagate R2 to all task contexts even if the ABI is SVR4. Cannot hurt...
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2008-07-16 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
|
* new-exceptions/cpu.c: propagate R2 to all task contexts
|
||||||
|
even if the ABI is SVR4. Cannot hurt...
|
||||||
|
|
||||||
2008-07-16 Till Straumann <strauman@slac.stanford.edu>
|
2008-07-16 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
* new-exceptions/cpu.c: use ppc_interrupt_get_disable_mask()
|
* new-exceptions/cpu.c: use ppc_interrupt_get_disable_mask()
|
||||||
|
|||||||
@@ -126,9 +126,15 @@ void _CPU_Context_Initialize(
|
|||||||
the_context->pc = (uint32_t)entry_point;
|
the_context->pc = (uint32_t)entry_point;
|
||||||
|
|
||||||
#if (PPC_ABI == PPC_ABI_SVR4)
|
#if (PPC_ABI == PPC_ABI_SVR4)
|
||||||
{ unsigned r13 = 0;
|
/*
|
||||||
asm volatile ("mr %0, 13" : "=r" ((r13)));
|
* SVR4 says R2 is for 'system-reserved' use; it cannot hurt to
|
||||||
|
* propagate R2 to all task contexts.
|
||||||
|
*/
|
||||||
|
{ uint32_t r2 = 0;
|
||||||
|
unsigned r13 = 0;
|
||||||
|
asm volatile ("mr %0,2; mr %1,13" : "=r" ((r2)), "=r" ((r13)));
|
||||||
|
|
||||||
|
the_context->gpr2 = r2;
|
||||||
the_context->gpr13 = r13;
|
the_context->gpr13 = r13;
|
||||||
}
|
}
|
||||||
#elif (PPC_ABI == PPC_ABI_EABI)
|
#elif (PPC_ABI == PPC_ABI_EABI)
|
||||||
|
|||||||
Reference in New Issue
Block a user