mirror of
https://github.com/open-simh/simh.git
synced 2026-01-18 17:17:38 +00:00
All VAX: Fix REI check when compatibilty mode. From Bob Supnik
The rule check on the PSL was incomplete. DV, FU, IV must all be zero, and they weren't checked at all. VAX Diagnostic EVKAE now runs to completion.
This commit is contained in:
parent
af95f21308
commit
f6404e2d22
@ -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<cm>.
|
||||
|
||||
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;
|
||||
|
||||
@ -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<cur_mode> LEQ tmp<prv_mode>
|
||||
7 tmp<20:16> LEQ PSL<20:16> tmp<ipl> LEQ PSL<ipl>
|
||||
8 tmp<31,29:28,21,15:8> = 0 tmp<mbz> = 0
|
||||
9 tmp<31> = 1 => tmp<cur_mode> = 3, tmp<prv_mode> = 3>, tmp<fpd,is,ipl> = 0
|
||||
9 tmp<31> = 1 => tmp<cur_mode> = 3, tmp<prv_mode> = 3>, tmp<fpd,is,ipl,dv,fu,iv> = 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 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user