From 7603b38588139b41a7f72c1875ee7d5cc0ec4a51 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Mon, 21 Jun 2004 22:35:48 +0000 Subject: Pure luck has protected us from this bug until now: locore.S %r9 are not saved over function calls and more we did not even want &proc0 as the old process in switch_search, but zero. Fixes bsd.rd. --- sys/arch/amd64/amd64/locore.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S index 732eea0a0df..665161f05c6 100644 --- a/sys/arch/amd64/amd64/locore.S +++ b/sys/arch/amd64/amd64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.11 2004/06/13 21:49:12 niklas Exp $ */ +/* $OpenBSD: locore.S,v 1.12 2004/06/21 22:35:47 niklas Exp $ */ /* $NetBSD: locore.S,v 1.2 2003/04/26 19:34:45 fvdl Exp $ */ /* @@ -1036,8 +1036,8 @@ ENTRY(switch_exit) call *%rsi /* Jump into cpu_switch() with the right state. */ - movq %r9, %r13 - movq $0, CPUVAR(CURPROC) + xorq %r13, %r13 + movq %r13, CPUVAR(CURPROC) jmp switch_search /* -- cgit v1.2.3