Changeset View
Changeset View
Standalone View
Standalone View
head/sys/mips/mips/pm_machdep.c
Show First 20 Lines • Show All 404 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Clear registers on exec | * Clear registers on exec | ||||
* $sp is set to the stack pointer passed in. $pc is set to the entry | * $sp is set to the stack pointer passed in. $pc is set to the entry | ||||
* point given by the exec_package passed in, as is $t9 (used for PIC | * point given by the exec_package passed in, as is $t9 (used for PIC | ||||
* code by the MIPS elf abi). | * code by the MIPS elf abi). | ||||
*/ | */ | ||||
void | void | ||||
exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) | exec_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) | ||||
{ | { | ||||
bzero((caddr_t)td->td_frame, sizeof(struct trapframe)); | bzero((caddr_t)td->td_frame, sizeof(struct trapframe)); | ||||
td->td_frame->sp = ((register_t)stack) & ~(STACK_ALIGN - 1); | td->td_frame->sp = ((register_t)stack) & ~(STACK_ALIGN - 1); | ||||
/* | /* | ||||
* If we're running o32 or n32 programs but have 64-bit registers, | * If we're running o32 or n32 programs but have 64-bit registers, | ||||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |