From f45463e353039436955b563e295ed6eabeab0a6c Mon Sep 17 00:00:00 2001 From: newton Date: Wed, 2 Jun 1999 15:35:46 +0000 Subject: Back out last commit (did I get all of them?) Submitted by: Kazutaka YOKOTA --- sys/i386/svr4/svr4_locore.s | 2 ++ sys/i386/svr4/svr4_machdep.c | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'sys') diff --git a/sys/i386/svr4/svr4_locore.s b/sys/i386/svr4/svr4_locore.s index a8f3ed1..2f9c683 100644 --- a/sys/i386/svr4/svr4_locore.s +++ b/sys/i386/svr4/svr4_locore.s @@ -8,9 +8,11 @@ NON_GPROF_ENTRY(svr4_sigcode) leal SVR4_SIGF_UC(%esp),%eax # ucp (the call may have clobbered the # copy at SIGF_UCP(%esp)) #if defined(NOTYET) +#ifdef VM86 testl $PSL_VM,SVR4_UC_EFLAGS(%eax) jnz 1f #endif +#endif movl SVR4_UC_GS(%eax),%edx movl %dx,%gs #if defined(__NetBSD__) diff --git a/sys/i386/svr4/svr4_machdep.c b/sys/i386/svr4/svr4_machdep.c index 947d728..5e77fd1 100644 --- a/sys/i386/svr4/svr4_machdep.c +++ b/sys/i386/svr4/svr4_machdep.c @@ -117,6 +117,7 @@ svr4_getcontext(p, uc, mask, oonstack) /* * Set the general purpose registers */ +#ifdef VM86 if (tf->tf_eflags & PSL_VM) { r[SVR4_X86_GS] = tf->tf_vm86_gs; r[SVR4_X86_FS] = tf->tf_vm86_fs; @@ -124,6 +125,7 @@ svr4_getcontext(p, uc, mask, oonstack) r[SVR4_X86_DS] = tf->tf_vm86_ds; r[SVR4_X86_EFL] = get_vflags(p); } else +#endif { #if defined(__NetBSD__) __asm("movl %%gs,%w0" : "=r" (r[SVR4_X86_GS])); @@ -213,6 +215,7 @@ svr4_setcontext(p, uc) /* * Restore register context. */ +#ifdef VM86 if (r[SVR4_X86_EFL] & PSL_VM) { tf->tf_vm86_gs = r[SVR4_X86_GS]; tf->tf_vm86_fs = r[SVR4_X86_FS]; @@ -220,6 +223,7 @@ svr4_setcontext(p, uc) tf->tf_vm86_ds = r[SVR4_X86_DS]; set_vflags(p, r[SVR4_X86_EFL]); } else +#endif { /* * Check for security violations. If we're returning to -- cgit v1.1