mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
2003-03-18 Till Straumann <strauman@slac.stanford.edu>
PR 356/bsps * cpu.c: This patch makes RTEMS/PowerPC eabi compliant.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2003-03-18 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 356/bsps
|
||||
* cpu.c: This patch makes RTEMS/PowerPC eabi compliant.
|
||||
|
||||
2003-03-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove AC_CONFIG_AUX_DIR.
|
||||
|
||||
@@ -70,6 +70,9 @@ void _CPU_Context_Initialize(
|
||||
unsigned32 sp;
|
||||
|
||||
sp = (unsigned32)stack_base + size - CPU_MINIMUM_STACK_FRAME_SIZE;
|
||||
|
||||
sp &= ~(CPU_STACK_ALIGNMENT-1);
|
||||
|
||||
*((unsigned32 *)sp) = 0;
|
||||
the_context->gpr1 = sp;
|
||||
|
||||
@@ -109,6 +112,24 @@ void _CPU_Context_Initialize(
|
||||
#endif
|
||||
|
||||
the_context->pc = (unsigned32)entry_point;
|
||||
|
||||
#if (PPC_ABI == PPC_ABI_SVR4)
|
||||
{ unsigned r13 = 0;
|
||||
asm volatile ("mr %0, 13" : "=r" ((r13)));
|
||||
|
||||
the_context->gpr13 = r13;
|
||||
}
|
||||
#elif (PPC_ABI == PPC_ABI_EABI)
|
||||
{ unsigned32 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;
|
||||
}
|
||||
#else
|
||||
#error unsupported PPC_ABI
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user