From a3e6aac0768f3d2408293caa5cfbefc5ef7fb328 Mon Sep 17 00:00:00 2001 From: Matt Burke Date: Wed, 26 Apr 2017 15:25:55 -0700 Subject: [PATCH] All VAXStations: Fixed logical vs bitwise operator CID: 1415454 Tested with VWS, UWS and DECwindows. This QVSS issue only affected polled interrupt mode, which is likely not used by most operating systems --- VAX/vax_vc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/VAX/vax_vc.c b/VAX/vax_vc.c index 5fcf3e97..4c7ec192 100644 --- a/VAX/vax_vc.c +++ b/VAX/vax_vc.c @@ -628,9 +628,9 @@ switch (rg) { break; case 10: /* Control mode bits */ - vc_intc.mode &= ~0x60 | ((data << 3) & 0x60); /* mode<06:05> = data<03:02> */ + vc_intc.mode &= ~ICM_M_RP | ((data << 3) & ICM_M_RP); /* mode<06:05> = data<03:02> */ if (((data & 0x3) == 0x1) || ((data & 0x3) == 2)) - vc_intc.mode &= ~0x80 | ((data << 7) & 0x80); + vc_intc.mode &= ~ICM_MM | ((data << 7) & ICM_MM); break; case 11: /* Preselect IMR */ @@ -800,7 +800,7 @@ uint32 i; uint32 msk = (vc_intc.irr & ~vc_intc.imr); /* unmasked interrutps */ vc_icsr &= ~(ICSR_GRI|ICSR_M_IRRVEC); /* clear GRI & vector */ -if ((vc_intc.mode & 0x80) && ~(vc_intc.mode & 0x4)) { /* group int MM & not polled */ +if ((vc_intc.mode & (ICM_MM | ICM_IM)) == ICM_MM) { /* group int MM & not polled */ for (i = 0; i < 8; i++) { if (msk & (1u << i)) { vc_icsr |= (ICSR_GRI | i); @@ -1003,7 +1003,7 @@ vc_intc.irr = 0; vc_intc.imr = 0xFF; vc_intc.isr = 0; vc_intc.acr = 0; -vc_intc.mode = 0x80; +vc_intc.mode = ICM_MM; vc_icsr = 0; vc_csr = (((QVMBASE >> QVMAWIDTH) & ((1<