From 0bb8e015ec5d0a0670bf2763c4d0077a06832bf3 Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Thu, 28 Mar 1996 21:00:29 +0000 Subject: [PATCH] Sync up the Pentium implementation with the documentation. Previously, the sense of the E flag was reversed on Pentiums. --- sys/i386/i386/perfmon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/i386/i386/perfmon.c b/sys/i386/i386/perfmon.c index 43c4b56dc41c..138d5d7887a6 100644 --- a/sys/i386/i386/perfmon.c +++ b/sys/i386/i386/perfmon.c @@ -227,7 +227,7 @@ writectl5(int pmc) newval |= P5FLAG_USR << 16; if (ctl_shadow[1] & (PMCF_OS << 16)) newval |= P5FLAG_OS << 16; - if (ctl_shadow[1] & (PMCF_E << 16)) + if (!(ctl_shadow[1] & (PMCF_E << 16))) newval |= P5FLAG_E << 16; newval |= (ctl_shadow[1] & 0x3f) << 16; } @@ -236,7 +236,7 @@ writectl5(int pmc) newval |= P5FLAG_USR; if (ctl_shadow[0] & (PMCF_OS << 16)) newval |= P5FLAG_OS; - if (ctl_shadow[0] & (PMCF_E << 16)) + if (!(ctl_shadow[0] & (PMCF_E << 16))) newval |= P5FLAG_E; newval |= ctl_shadow[0] & 0x3f; }