1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

e500 port: getcontext / setcontext / swapcontext.

This commit is contained in:
Joseph Myers
2013-10-04 15:55:15 +00:00
parent afee9c1a25
commit cd78f7e767
9 changed files with 190 additions and 0 deletions

View File

@ -261,6 +261,11 @@ ENTRY(__CONTEXT_FUNC_NAME)
2: /* L(no_vec): */
# endif
#endif
#ifdef __CONTEXT_ENABLE_E500
getcontext_e500
#endif
/* We need to set up parms and call sigprocmask which will clobber
volatile registers. So before the call we need to retrieve the
original ucontext ptr (parm1) from stack and store the UC_REGS_PTR

View File

@ -243,6 +243,10 @@ ENTRY(__CONTEXT_FUNC_NAME)
lfd fp31,_UC_FREGS+(31*8)(r31)
#endif /* __CONTEXT_ENABLE_FPRS */
#ifdef __CONTEXT_ENABLE_E500
setcontext_e500
#endif
/* Restore LR and CCR, and set CTR to the NIP value */
lwz r3,_UC_GREGS+(PT_LNK*4)(r31)
lwz r4,_UC_GREGS+(PT_NIP*4)(r31)

View File

@ -265,6 +265,10 @@ ENTRY(__CONTEXT_FUNC_NAME)
# endif /* __CONTEXT_ENABLE_VRS */
#endif /* __CONTEXT_ENABLE_FPRS */
#ifdef __CONTEXT_ENABLE_E500
getcontext_e500
#endif
/* Restore ucontext (parm1) from stack. */
lwz r12,_FRAME_PARM_SAVE1(r1)
li r4,0
@ -468,6 +472,10 @@ ENTRY(__CONTEXT_FUNC_NAME)
lfd fp31,_UC_FREGS+(31*8)(r31)
#endif /* __CONTEXT_ENABLE_FPRS */
#ifdef __CONTEXT_ENABLE_E500
setcontext_e500
#endif
/* Restore LR and CCR, and set CTR to the NIP value */
lwz r3,_UC_GREGS+(PT_LNK*4)(r31)
lwz r4,_UC_GREGS+(PT_NIP*4)(r31)