1
0
mirror of https://github.com/open-simh/simh.git synced 2026-01-13 15:27:46 +00:00

All VAX: Properly define Unimplemented Opcode specifier count mask

the opcode table first word consists of bits:

<7> = FPD is legal for this opcode.
<4:6> = number of specifiers for unimplemented opcodes (VAX subsets)
<3> = unused
<0:2> = number of specifiers

The mask used to be 0x70. The convention is that x_M_y is a mask value
<right-justified>, for a macro like:

#define get_foo(x)        (((x) >> x_V_foo) & x_M_foo)

For a subset VAX (like the 3900), the unimplemented opcodes are those
that are recognized on a full VAX but simply trap as reserved instructions
(e.g., the H-floating instructions). This really only affected symbolic
printing and decoding of these instructions.
This commit is contained in:
Bob Supnik 2017-03-20 07:19:32 -07:00 committed by Mark Pizzolato
parent eb2862fde4
commit 3165a1b3ab

View File

@ -377,7 +377,7 @@
#define DR_F 0x80 /* FPD ok flag */
#define DR_NSPMASK 0x07 /* #specifiers */
#define DR_V_USPMASK 4
#define DR_M_USPMASK 0x70 /* #spec, sym_ */
#define DR_M_USPMASK 0x7 /* #spec, sym_ */
#define DR_GETNSP(x) ((x) & DR_NSPMASK)
#define DR_GETUSP(x) (((x) >> DR_V_USPMASK) & DR_M_USPMASK)