summaryrefslogtreecommitdiffstats
path: root/sys/i386/svr4
diff options
context:
space:
mode:
authornewton <newton@FreeBSD.org>1999-06-02 15:35:46 +0000
committernewton <newton@FreeBSD.org>1999-06-02 15:35:46 +0000
commitf45463e353039436955b563e295ed6eabeab0a6c (patch)
treeea7bd5d4825ea53aa4a9b14da734e2c542278f27 /sys/i386/svr4
parente452020bd2eb64de8bff36b9482eaba448ea81bf (diff)
downloadFreeBSD-src-f45463e353039436955b563e295ed6eabeab0a6c.zip
FreeBSD-src-f45463e353039436955b563e295ed6eabeab0a6c.tar.gz
Back out last commit (did I get all of them?)
Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
Diffstat (limited to 'sys/i386/svr4')
-rw-r--r--sys/i386/svr4/svr4_locore.s2
-rw-r--r--sys/i386/svr4/svr4_machdep.c4
2 files changed, 6 insertions, 0 deletions
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
OpenPOWER on IntegriCloud