diff --git a/VAX/vax_cmode.c b/VAX/vax_cmode.c index 72ce6302..c8064ce8 100644 --- a/VAX/vax_cmode.c +++ b/VAX/vax_cmode.c @@ -1,6 +1,6 @@ /* vax_cmode.c: VAX compatibility mode - Copyright (c) 2004-2008, Robert M Supnik + Copyright (c) 2004-2016, Robert M Supnik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -26,6 +26,7 @@ On a full VAX, this module implements PDP-11 compatibility mode. On a subset VAX, this module forces a fault if REI attempts to set PSL. + 14-Jul-16 RMS Updated PSL check (found by EVKAE 6.2) 28-May-08 RMS Inlined physical memory routines 25-Jan-08 RMS Fixed declaration (Mark Pizzolato) 03-May-06 RMS Fixed omission of SXT @@ -75,7 +76,7 @@ void WrRegW (int32 val, int32 rn); t_bool BadCmPSL (int32 newpsl) { -if ((newpsl & (PSL_FPD|PSL_IS|PSL_CUR|PSL_PRV|PSL_IPL)) != +if ((newpsl & (PSL_FPD|PSL_IS|PSL_CUR|PSL_PRV|PSL_IPL|PSW_DV|PSW_FU|PSW_IV)) != ((USER << PSL_V_CUR) | (USER << PSL_V_PRV))) return TRUE; else return FALSE; diff --git a/VAX/vax_cpu1.c b/VAX/vax_cpu1.c index 2ed53b84..ef6f710b 100644 --- a/VAX/vax_cpu1.c +++ b/VAX/vax_cpu1.c @@ -1,6 +1,6 @@ /* vax_cpu1.c: VAX complex instructions - Copyright (c) 1998-2015, Robert M Supnik + Copyright (c) 1998-2016, Robert M Supnik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -23,6 +23,9 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Robert M Supnik. + 14-Jul-16 RMS Corrected REI rule 9 + 21-Jun-16 RMS Removed reserved check on SIRR (Mark Pizzolato) + 18-Feb-16 RMS Changed variables in MxPR to unsigned 29-Mar-15 RMS Added model-specific IPR max 15-Mar-12 RMS Fixed potential integer overflow in LDPCTX (Mark Pizzolato) 25-Nov-11 RMS Added VEC_QBUS test in interrupt handler @@ -1214,7 +1217,7 @@ Rule SRM formulation Comment 6 tmp<25:24> LEQ tmp<23:22> tmp LEQ tmp 7 tmp<20:16> LEQ PSL<20:16> tmp LEQ PSL 8 tmp<31,29:28,21,15:8> = 0 tmp = 0 - 9 tmp<31> = 1 => tmp = 3, tmp = 3>, tmp = 0 + 9 tmp<31> = 1 => tmp = 3, tmp = 3>, tmp = 0 */ int32 op_rei (int32 acc) @@ -1438,8 +1441,8 @@ return 0; int32 op_mtpr (int32 *opnd) { -int32 val = opnd[0]; -int32 prn = opnd[1]; +uint32 val = opnd[0]; +uint32 prn = opnd[1]; int32 cc; if (PSL & PSL_CUR) /* must be kernel */ @@ -1528,9 +1531,9 @@ switch (prn) { /* case on reg # */ break; case MT_SIRR: /* SIRR */ - if ((val > 0xF) || (val == 0)) - RSVD_OPND_FAULT; - SISR = SISR | (1 << val); /* set bit in SISR */ + val = val & 0xF; /* consider only 4b */ + if (val != 0) /* if not zero */ + SISR = SISR | (1 << val); /* set bit in SISR */ break; case MT_SISR: /* SISR */ @@ -1566,7 +1569,7 @@ return cc; int32 op_mfpr (int32 *opnd) { -int32 prn = opnd[0]; +uint32 prn = opnd[0]; int32 val; if (PSL & PSL_CUR) /* must be kernel */