From 3e01bef859c54ae23104f045366e6dfffaa069d3 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 5 Sep 2014 13:59:12 -0700 Subject: [PATCH] VAX: Fix the PxBR and SBR validation tests to correctly reflect the 780 microcode patch 38 from Bob Supnik This fix allows older Unix operating systems to once again run with the VAX 780 simulator. --- VAX/vax730_defs.h | 18 +++++++++--------- VAX/vax750_defs.h | 4 ++-- VAX/vax780_defs.h | 4 ++-- VAX/vax860_defs.h | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/VAX/vax730_defs.h b/VAX/vax730_defs.h index e76130b7..258aaac3 100644 --- a/VAX/vax730_defs.h +++ b/VAX/vax730_defs.h @@ -100,21 +100,21 @@ /* 780 microcode patch 37 - only test LR<23:0> for appropriate length */ -#define ML_LR_TEST(r) if ((uint32)((r) & 0xFFFFFF) > 0x200000) RSVD_OPND_FAULT +#define ML_LR_TEST(r) if (((uint32)((r) & 0xFFFFFF)) > 0x200000) RSVD_OPND_FAULT -/* 780 microcode patch 38 - only test PxBR<31>=1 and xBR<1:0> = 0 */ +/* 780 microcode patch 38 - only test PxBR<31>=1, PxBR<30> = 0, and xBR<1:0> = 0 */ -#define ML_PXBR_TEST(r) if ((((r) & 0x80000000) == 0) || \ - ((r) & 0x00000003)) RSVD_OPND_FAULT -#define ML_SBR_TEST(r) if ((r) & 0x00000003) RSVD_OPND_FAULT +#define ML_PXBR_TEST(r) if (((((uint32)(r)) & 0x80000000) == 0) || \ + ((((uint32)(r)) & 0x40000003) != 0)) RSVD_OPND_FAULT +#define ML_SBR_TEST(r) if ((((uint32)(r)) & 0x00000003) != 0) RSVD_OPND_FAULT -/* 780 microcode patch 78 - only test xCBB<1:0> = 0 */ +/* 780 microcode patch 78 - test xCBB<1:0> = 0 */ -#define ML_PA_TEST(r) if ((r) & 0x00000003) RSVD_OPND_FAULT +#define ML_PA_TEST(r) if ((((uint32)(r)) & 0x00000003) != 0) RSVD_OPND_FAULT #define LP_AST_TEST(r) if ((r) > AST_MAX) RSVD_OPND_FAULT -#define LP_MBZ84_TEST(r) if ((r) & 0xF8C00000) RSVD_OPND_FAULT -#define LP_MBZ92_TEST(r) if ((r) & 0x7FC00000) RSVD_OPND_FAULT +#define LP_MBZ84_TEST(r) if ((((uint32)(r)) & 0xF8C00000) != 0) RSVD_OPND_FAULT +#define LP_MBZ92_TEST(r) if ((((uint32)(r)) & 0x7FC00000) != 0) RSVD_OPND_FAULT /* Memory */ diff --git a/VAX/vax750_defs.h b/VAX/vax750_defs.h index 48119703..e3c57104 100644 --- a/VAX/vax750_defs.h +++ b/VAX/vax750_defs.h @@ -127,9 +127,9 @@ #define ML_PXBR_TEST(r) if (((((uint32)(r)) & 0x80000000) == 0) || \ ((((uint32)(r)) & 0x40000003) != 0)) RSVD_OPND_FAULT -#define ML_SBR_TEST(r) if ((((uint32)(r)) & 0xC0000003) != 0) RSVD_OPND_FAULT +#define ML_SBR_TEST(r) if ((((uint32)(r)) & 0x00000003) != 0) RSVD_OPND_FAULT -/* 780 microcode patch 78 - only test xCBB<1:0> = 0 */ +/* 780 microcode patch 78 - test xCBB<1:0> = 0 */ #define ML_PA_TEST(r) if ((((uint32)(r)) & 0x00000003) != 0) RSVD_OPND_FAULT diff --git a/VAX/vax780_defs.h b/VAX/vax780_defs.h index 5210f357..1c1bf9ee 100644 --- a/VAX/vax780_defs.h +++ b/VAX/vax780_defs.h @@ -140,9 +140,9 @@ #define ML_PXBR_TEST(r) if (((((uint32)(r)) & 0x80000000) == 0) || \ ((((uint32)(r)) & 0x40000003) != 0)) RSVD_OPND_FAULT -#define ML_SBR_TEST(r) if ((((uint32)(r)) & 0xC0000003) != 0) RSVD_OPND_FAULT +#define ML_SBR_TEST(r) if ((((uint32)(r)) & 0x00000003) != 0) RSVD_OPND_FAULT -/* 780 microcode patch 78 - only test xCBB<1:0> = 0 */ +/* 780 microcode patch 78 - test xCBB<1:0> = 0 */ #define ML_PA_TEST(r) if ((((uint32)(r)) & 0x00000003) != 0) RSVD_OPND_FAULT diff --git a/VAX/vax860_defs.h b/VAX/vax860_defs.h index 0dd97149..b7f833bc 100644 --- a/VAX/vax860_defs.h +++ b/VAX/vax860_defs.h @@ -164,9 +164,9 @@ #define ML_PXBR_TEST(r) if (((((uint32)(r)) & 0x80000000) == 0) || \ ((((uint32)(r)) & 0x40000003) != 0)) RSVD_OPND_FAULT -#define ML_SBR_TEST(r) if ((((uint32)(r)) & 0xC0000003) != 0) RSVD_OPND_FAULT +#define ML_SBR_TEST(r) if ((((uint32)(r)) & 0x00000003) != 0) RSVD_OPND_FAULT -/* 780 microcode patch 78 - only test xCBB<1:0> = 0 */ +/* 780 microcode patch 78 - test xCBB<1:0> = 0 */ #define ML_PA_TEST(r) if ((((uint32)(r)) & 0x00000003) != 0) RSVD_OPND_FAULT