summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-02-18 23:09:54 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-02-18 23:09:54 +0000
commit061518d9e9cccb6b9575708a32a5d7a1ebdccbb6 (patch)
treecc328a845c8215a8093d435b71c4b74b253e0bb6 /sys/arch/i386
parent601337fb68d9c8731744d7cd6bbd0ca45377aedb (diff)
when saving %fs,%gs clear out the upper 16 bits for ddb
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/locore.s10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index b1a030cb1a4..66300b7e409 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.64 2001/12/04 20:54:11 niklas Exp $ */
+/* $OpenBSD: locore.s,v 1.65 2002/02/18 23:09:53 mickey Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
@@ -1733,6 +1733,10 @@ sw1: bsfl %ecx,%ebx # find a full q
movl P_ADDR(%esi),%esi
/* Save segment registers. */
+#ifdef DDB
+ xorl %ax, %ax
+ xorl %cx, %cx
+#endif
movl %fs,%ax
movl %gs,%cx
movl %eax,PCB_FS(%esi)
@@ -1891,6 +1895,10 @@ ENTRY(savectx)
movl 4(%esp),%edx # edx = p->p_addr
/* Save segment registers. */
+#ifdef DDB
+ xorl %ax, %ax
+ xorl %cx, %cx
+#endif
movl %fs,%ax
movl %gs,%cx
movl %eax,PCB_FS(%edx)