1
0
mirror of https://github.com/open-simh/simh.git synced 2026-04-26 04:07:23 +00:00

sigma: Fix dangling else in IO read/write direct

This commit is contained in:
Ken Rector
2022-07-12 13:53:32 -07:00
committed by Mark Pizzolato
parent 801a3be07d
commit 8dc14a4b52
2 changed files with 8 additions and 4 deletions

View File

@@ -119,6 +119,7 @@
113. MT: device address must include unit identifier everywhere, for interrupt generation. 113. MT: device address must include unit identifier everywhere, for interrupt generation.
114: RAD: device address must include unit identifier everywhere, for interrupt generation. 114: RAD: device address must include unit identifier everywhere, for interrupt generation.
115. MT: error handling not consistent. 115. MT: error handling not consistent.
116: IO: dangling else in write direct mode 1 code causes incorrect behavior.
Diagnostic Notes Diagnostic Notes

View File

@@ -1,6 +1,6 @@
/* sigma_io.c: XDS Sigma IO simulator /* sigma_io.c: XDS Sigma IO simulator
Copyright (c) 2007-2020, Robert M Supnik Copyright (c) 2007-2022, Robert M Supnik
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), copy of this software and associated documentation files (the "Software"),
@@ -23,6 +23,7 @@
used in advertising or otherwise to promote the sale, use or other dealings used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Robert M Supnik. in this Software without prior written authorization from Robert M Supnik.
07-Jul-2022 RMS Fixed dangling else in read/write direct (Ken Rector)
05-Mar-2020 RMS Fixed s5x0_ireg size declaration (Mark Pizzolato) 05-Mar-2020 RMS Fixed s5x0_ireg size declaration (Mark Pizzolato)
09-Mar-2017 RMS Fixed unspecified return value in HIO (COVERITY) 09-Mar-2017 RMS Fixed unspecified return value in HIO (COVERITY)
*/ */
@@ -1109,13 +1110,15 @@ uint32 i, beg, end, mask, sc;
uint32 grp = DIO_GET1GRP (ad); uint32 grp = DIO_GET1GRP (ad);
uint32 fnc = DIO_GET1FNC (ad); uint32 fnc = DIO_GET1FNC (ad);
if (grp == 1) /* group 1? */
return 0; /* not there */
if (grp == 0) { /* overrides? */ if (grp == 0) { /* overrides? */
beg = INTG_OVR; beg = INTG_OVR;
end = INTG_IO; end = INTG_IO;
} }
else if (grp == 1) /* group 1? */ else { /* all others */
return 0; /* not there */ beg = end = grp + 1;
else beg = end = grp + 1; }
if (op == OP_RD) { /* read direct? */ if (op == OP_RD) { /* read direct? */
if (!QCPU_S89_5X0) /* S89, 5X0 only */ if (!QCPU_S89_5X0) /* S89, 5X0 only */