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
This commit is contained in:
Matt Burke 2017-04-26 15:25:55 -07:00 committed by Mark Pizzolato
parent b5a5aec57a
commit a3e6aac076

View file

@ -628,9 +628,9 @@ switch (rg) {
break; break;
case 10: /* Control mode bits */ 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)) if (((data & 0x3) == 0x1) || ((data & 0x3) == 2))
vc_intc.mode &= ~0x80 | ((data << 7) & 0x80); vc_intc.mode &= ~ICM_MM | ((data << 7) & ICM_MM);
break; break;
case 11: /* Preselect IMR */ case 11: /* Preselect IMR */
@ -800,7 +800,7 @@ uint32 i;
uint32 msk = (vc_intc.irr & ~vc_intc.imr); /* unmasked interrutps */ uint32 msk = (vc_intc.irr & ~vc_intc.imr); /* unmasked interrutps */
vc_icsr &= ~(ICSR_GRI|ICSR_M_IRRVEC); /* clear GRI & vector */ 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++) { for (i = 0; i < 8; i++) {
if (msk & (1u << i)) { if (msk & (1u << i)) {
vc_icsr |= (ICSR_GRI | i); vc_icsr |= (ICSR_GRI | i);
@ -1003,7 +1003,7 @@ vc_intc.irr = 0;
vc_intc.imr = 0xFF; vc_intc.imr = 0xFF;
vc_intc.isr = 0; vc_intc.isr = 0;
vc_intc.acr = 0; vc_intc.acr = 0;
vc_intc.mode = 0x80; vc_intc.mode = ICM_MM;
vc_icsr = 0; vc_icsr = 0;
vc_csr = (((QVMBASE >> QVMAWIDTH) & ((1<<CSR_S_MA)-1)) << CSR_V_MA) | CSR_MOD; vc_csr = (((QVMBASE >> QVMAWIDTH) & ((1<<CSR_S_MA)-1)) << CSR_V_MA) | CSR_MOD;