diff --git a/VAX/vax780_bug_history.txt b/VAX/vax780_bug_history.txt index b4f32f44..f79c0e2f 100644 --- a/VAX/vax780_bug_history.txt +++ b/VAX/vax780_bug_history.txt @@ -61,7 +61,7 @@ Bugs Found And Fixed During Simulator Debug 58. POLYx: add step require truncation (proved by AXE tests). 59. Unaligned references to IO space: incorrect on CVAX. 60. REI to compatibility mode: PSL were not checked for mbz. - +61. Indexed immediate not does fault. diff --git a/VAX/vax780_defs.h b/VAX/vax780_defs.h index eb162318..d5bc1ca9 100644 --- a/VAX/vax780_defs.h +++ b/VAX/vax780_defs.h @@ -1,6 +1,6 @@ /* vax780_defs.h: VAX 780 model-specific definitions file - Copyright (c) 2004-2017, Robert M Supnik + Copyright (c) 2004-2019, 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,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Robert M Supnik. + 23-Apr-19 RMS Added hook for unpredictable indexed immediate .aw 18-May-17 RMS Added model-specific AST validation test 19-Jan-17 RMS Moved CR to BR6 (Mark Pizzolato) 29-Mar-15 RMS Added model specific IPR max @@ -151,6 +152,7 @@ #define MT_AST_TEST(r) r = (r) & 07; \ if ((r) > AST_MAX) RSVD_OPND_FAULT +#define IDX_IMM_TEST /* Memory */ diff --git a/VAX/vax_cpu.c b/VAX/vax_cpu.c index bbacdbb2..ee349b72 100644 --- a/VAX/vax_cpu.c +++ b/VAX/vax_cpu.c @@ -25,6 +25,7 @@ cpu VAX central processor + 23-Apr-19 RMS Added hook for unpredictable indexed immediate .aw 14-Apr-19 RMS Added hook for non-standard MxPR CC's 31-Mar-17 RMS Fixed uninitialized variable on FPD path (COVERITY) 13-Mar-17 RMS Fixed dangling else in show_opnd (COVERITY) @@ -886,20 +887,11 @@ for ( ;; ) { case AIN|VB: case AIN|WB: case AIN|WW: case AIN|WL: case AIN|WQ: case AIN|WO: -/* CHECK_FOR_PC; */ opnd[j++] = OP_MEM; case AIN|AB: case AIN|AW: case AIN|AL: case AIN|AQ: case AIN|AO: va = opnd[j++] = R[rn]; if (rn == nPC) { - if (DR_LNT (disp) >= L_QUAD) { - GET_ISTR (temp, L_LONG); - GET_ISTR (temp, L_LONG); - if (DR_LNT (disp) == L_OCTA) { - GET_ISTR (temp, L_LONG); - GET_ISTR (temp, L_LONG); - } - } - else GET_ISTR (temp, DR_LNT (disp)); + SETPC (PC + DR_LNT (disp)); } else { R[rn] = R[rn] + DR_LNT (disp); @@ -1410,10 +1402,15 @@ for ( ;; ) { break; case AIN: - CHECK_FOR_PC; index = index + R[rn]; - R[rn] = R[rn] + DR_LNT (disp); - recq[recqptr++] = RQ_REC (AIN | (disp & DR_LNMASK), rn); + if (rn == nPC) { + IDX_IMM_TEST; + SETPC (PC + DR_LNT (disp)); + } + else { + R[rn] = R[rn] + DR_LNT (disp); + recq[recqptr++] = RQ_REC (AIN | (disp & DR_LNMASK), rn); + } break; case AID: diff --git a/VAX/vax_defs.h b/VAX/vax_defs.h index c8b9f7d5..0d986c3a 100644 --- a/VAX/vax_defs.h +++ b/VAX/vax_defs.h @@ -602,7 +602,7 @@ enum opcodes { #define STR_GETDPC(x) (((x) >> STR_V_DPC) & STR_M_DPC) #define STR_GETCHR(x) (((x) >> STR_V_CHR) & STR_M_CHR) #define STR_PACK(m,x) ((((PC - fault_PC) & STR_M_DPC) << STR_V_DPC) | \ - (((m) & STR_M_CHR) << STR_V_CHR) | ((x) & STR_LNMASK)) + (((m) & STR_M_CHR) << STR_V_CHR) | ((x) & STR_LNMASK)) /* Read and write */ diff --git a/VAX/vaxmod_defs.h b/VAX/vaxmod_defs.h index df8c5209..e096d56b 100644 --- a/VAX/vaxmod_defs.h +++ b/VAX/vaxmod_defs.h @@ -1,6 +1,6 @@ /* vaxmod_defs.h: VAX model-specific definitions file - Copyright (c) 1998-2017, Robert M Supnik + Copyright (c) 1998-2019, 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,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Robert M Supnik. + 23-Apr-19 RMS Added hook for unpredictable indexed immediate .aw 18-May-17 RMS Added model-specific AST validation test 29-Mar-15 RMS Added model-specific IPR max 20-Dec-13 RMS Added prototypes for unaligned IO and register handling @@ -217,6 +218,7 @@ #define LP_AST_TEST(r) #define LP_MBZ84_TEST(r) #define LP_MBZ92_TEST(r) +#define IDX_IMM_TEST RSVD_ADDR_FAULT /* fault on indexed imm */ #define MT_AST_TEST(r) if ((r) > AST_MAX) RSVD_OPND_FAULT