Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libc/powerpc64/gen/_ctx_start.S
Show All 26 Lines | |||||
#include <machine/asm.h> | #include <machine/asm.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
.globl CNAME(_ctx_done) | .globl CNAME(_ctx_done) | ||||
.globl CNAME(abort) | .globl CNAME(abort) | ||||
ENTRY(_ctx_start) | ENTRY(_ctx_start) | ||||
#if !defined(_CALL_ELF) || _CALL_ELF == 1 | |||||
/* Load values from function descriptor */ | |||||
ld %r2,8(%r14) | ld %r2,8(%r14) | ||||
ld %r14,0(%r14) | ld %r14,0(%r14) | ||||
#else | |||||
/* Load global entry point */ | |||||
mr %r12,%r14 | |||||
#endif | |||||
mtlr %r14 | mtlr %r14 | ||||
blrl /* branch to start function */ | blrl /* branch to start function */ | ||||
mr %r3,%r15 /* pass pointer to ucontext as argument */ | mr %r3,%r15 /* pass pointer to ucontext as argument */ | ||||
nop | nop | ||||
bl CNAME(_ctx_done) /* branch to ctxt completion func */ | bl CNAME(_ctx_done) /* branch to ctxt completion func */ | ||||
/* | /* | ||||
* we should never return from the | * we should never return from the | ||||
* above branch. | * above branch. | ||||
*/ | */ | ||||
nop | nop | ||||
bl CNAME(abort) /* abort */ | bl CNAME(abort) /* abort */ | ||||
nop | nop | ||||
END(_ctx_start) | END(_ctx_start) | ||||
.section .note.GNU-stack,"",%progbits | .section .note.GNU-stack,"",%progbits |