Make local INTRENTRY, INTRFASTEXIT match those in locore.s, i.e. store &

restore %fs/%gs appropriately.
Fixes kern/14275 - compat svr4 works on i386 again :)

Thanks to MOCHIDA Shuji for initial investigation on the issue, that helped
to find the bug a lot.
This commit is contained in:
jdolecek 2001-10-31 18:16:02 +00:00
parent d42a6dc5c2
commit 01d4649f9f
1 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_sigcode.s,v 1.5 2001/09/21 14:12:51 fvdl Exp $ */ /* $NetBSD: svr4_sigcode.s,v 1.6 2001/10/31 18:16:02 jdolecek Exp $ */
/*- /*-
* Copyright (c) 1998 The NetBSD Foundation, Inc. * Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -110,7 +110,6 @@
#define IDTVEC(name) ALIGN_TEXT; .globl _X/**/name; _X/**/name: #define IDTVEC(name) ALIGN_TEXT; .globl _X/**/name; _X/**/name:
#endif #endif
/* /*
* These are used on interrupt or trap entry or exit. * These are used on interrupt or trap entry or exit.
*/ */
@ -119,15 +118,22 @@
pushl %ecx ; \ pushl %ecx ; \
pushl %edx ; \ pushl %edx ; \
pushl %ebx ; \ pushl %ebx ; \
movl $GSEL(GDATA_SEL, SEL_KPL),%eax ; \
pushl %ebp ; \ pushl %ebp ; \
pushl %esi ; \ pushl %esi ; \
pushl %edi ; \ pushl %edi ; \
pushl %ds ; \ pushl %ds ; \
pushl %es ; \ pushl %es ; \
movl $GSEL(GDATA_SEL, SEL_KPL),%eax ; \
movw %ax,%ds ; \ movw %ax,%ds ; \
movw %ax,%es movw %ax,%es ; \
pushl %fs ; \
pushl %gs ; \
movw %ax,%fs ; \
movw %ax,%gs ; \
#define INTRFASTEXIT \ #define INTRFASTEXIT \
popl %gs ; \
popl %fs ; \
popl %es ; \ popl %es ; \
popl %ds ; \ popl %ds ; \
popl %edi ; \ popl %edi ; \