-/* $OpenBSD: asm.h,v 1.15 2022/08/30 16:26:29 miod Exp $ */
+/* $OpenBSD: asm.h,v 1.16 2022/10/25 06:05:57 guenther Exp $ */
/* $NetBSD: asm.h,v 1.15 2000/08/02 22:24:39 eeh Exp $ */
/*
#ifndef _MACHINE_ASM_H_
#define _MACHINE_ASM_H_
-/* Pull in CCFSZ, CC64FSZ, and BIAS from frame.h */
+/* Pull in CC64FSZ and BIAS from frame.h */
#ifndef _LOCORE
#define _LOCORE
#endif
-/* $OpenBSD: machdep.c,v 1.203 2022/10/23 23:39:41 guenther Exp $ */
+/* $OpenBSD: machdep.c,v 1.204 2022/10/25 06:05:57 guenther Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
* Set up registers on exec.
*/
-#define STACK_OFFSET BIAS
#define CPOUTREG(l,v) copyout(&(v), (l), sizeof(v))
-#undef CCFSZ
-#define CCFSZ CC64FSZ
/* ARGSUSED */
void
tf->tf_npc = tf->tf_pc + 4;
tf->tf_global[2] = tf->tf_pc;
stack -= sizeof(struct rwindow);
- tf->tf_out[6] = stack - STACK_OFFSET;
+ tf->tf_out[6] = stack - BIAS;
#ifdef NOTDEF_DEBUG
printf("setregs: setting tf %p sp %p pc %p\n", (long)tf,
(long)tf->tf_out[6], (long)tf->tf_pc);
struct sigframe sf;
tf = p->p_md.md_tf;
- oldsp = tf->tf_out[6] + STACK_OFFSET;
+ oldsp = tf->tf_out[6] + BIAS;
/*
* Compute new user stack addresses, subtract off
tf->tf_global[1] = (vaddr_t)catcher;
tf->tf_pc = addr;
tf->tf_npc = addr + 4;
- tf->tf_out[6] = newsp - STACK_OFFSET;
+ tf->tf_out[6] = newsp - BIAS;
return 0;
}
-/* $OpenBSD: vm_machdep.c,v 1.41 2022/10/21 18:55:42 miod Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.42 2022/10/25 06:05:57 guenther Exp $ */
/* $NetBSD: vm_machdep.c,v 1.38 2001/06/30 00:02:20 eeh Exp $ */
/*
* The offset of the topmost frame in the kernel stack.
*/
#define TOPFRAMEOFF (USPACE-sizeof(struct trapframe)-CC64FSZ)
-#define STACK_OFFSET BIAS
#ifdef DEBUG
char cpu_forkname[] = "cpu_fork()";
rp->rw_local[1] = (long)arg; /* and its argument */
npcb->pcb_pc = (long)proc_trampoline - 8;
- npcb->pcb_sp = (long)rp - STACK_OFFSET;
+ npcb->pcb_sp = (long)rp - BIAS;
/* Need to create a %tstate if we're forking from proc0. */
if (p1 == &proc0)