register struct trapframe *tf;
register struct trapframe *tf = p->p_md.md_regs;
setregs(p, pack, stack, retval)	register struct proc *p;	struct exec_package *pack;	u_long stack;	register_t *retval;{	register struct trapframe *tf;#ifdef DEBUG	/*extern int pmapdebug;*/	/*pmapdebug = 13;*/	printf("setregs(%p, %p, %x, %p), ep=%x\n",	    p, pack, stack, retval, pack->ep_entry);#endif	/* FPU: setup regs */	tf = p->p_md.md_regs;	/* tf->tf_r?? = PS_STRINGS */	tf->tf_ipsw = PSW_C | PSW_Q | PSW_P | PSW_D | PSW_I;	tf->tf_iioq_head = tf->tf_iioq_tail =	    pack->ep_entry | HPPA_PC_PRIV_USER;	tf->tf_iisq_head = tf->tf_iisq_tail = p->p_addr->u_pcb.pcb_space;	tf->tf_rp = 0;	tf->tf_arg0 = stack;	tf->tf_arg1 = tf->tf_arg2 = 0; /* XXX dynload stuff */	tf->tf_eiem = 0;	tf->tf_sr4 = p->p_addr->u_pcb.pcb_space;	tf->tf_sr5 = p->p_addr->u_pcb.pcb_space;	tf->tf_sr6 = p->p_addr->u_pcb.pcb_space;	tf->tf_sr7 = HPPA_SID_KERNEL;	tf->tf_pidr1 = p->p_vmspace->vm_map.pmap->pmap_pid;	tf->tf_pidr2 = p->p_vmspace->vm_map.pmap->pmap_pid;	/* setup terminal stack frame */	stack += HPPA_FRAME_SIZE;	copyout(&tf->tf_rp, (caddr_t)(stack + HPPA_FRAME_PSP),	    sizeof(tf->tf_rp));	tf->tf_sp = stack;	retval[1] = 0;}