diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-24 15:21:46 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-11-18 14:56:43 +0100 |
commit | 39a4574652f2f7bae2f18b4eb6f5f9bf788466a6 (patch) | |
tree | bbe29cd999cf4e89d4e01f8cc983a9938d83a22a /c/src/lib/libcpu/powerpc/new-exceptions/cpu.c | |
parent | powerpc: Do not validate reserved XER bits (diff) | |
download | rtems-39a4574652f2f7bae2f18b4eb6f5f9bf788466a6.tar.bz2 |
powerpc: Add r2 to CPU context
The r2 may be used for thread-local storage.
Diffstat (limited to 'c/src/lib/libcpu/powerpc/new-exceptions/cpu.c')
-rw-r--r-- | c/src/lib/libcpu/powerpc/new-exceptions/cpu.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c b/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c index 120ee07c9d..d6a883a6ad 100644 --- a/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c +++ b/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c @@ -68,6 +68,7 @@ void _CPU_Context_Initialize( ppc_context *the_ppc_context; uint32_t msr_value; uint32_t sp; + register uint32_t gpr2 __asm__("2"); sp = (uint32_t)stack_base + size - PPC_MINIMUM_STACK_FRAME_SIZE; @@ -127,6 +128,7 @@ void _CPU_Context_Initialize( the_ppc_context->gpr1 = sp; the_ppc_context->msr = msr_value; the_ppc_context->lr = (uint32_t) entry_point; + the_ppc_context->gpr2 = gpr2; #ifdef __ALTIVEC__ _CPU_Context_initialize_altivec( the_ppc_context ); |