Register Declarations
LocalRegIndex: TYPE = [0..15];
AuxRegIndex: TYPE = [0..15];
ConstIndex: TYPE = [0..11];
SrcStackIndex: TYPE = [0..15]; -- 12..15 only are valid
DstStackIndex: TYPE = [0..15]; -- 12..15 only are valid
RegSpec:
TYPE =
RECORD[
SELECT kind: *
FROM
reg => [reg: LocalRegIndex],
aux => [aux: AuxRegIndex],
const => [const: ConstIndex],
srcStack => [stack: SrcStackIndex],
dstStack => [stack: DstStackIndex],
ENDCASE];
LocalRegSpec: TYPE = RegSpec[reg];
AuxRegSpec: TYPE = RegSpec[aux];
ConstSpec: TYPE = RegSpec[const];
SrcStackSpec: TYPE = RegSpec[srcStack];
DstStackSpec: TYPE = RegSpec[dstStack];
reg0: LocalRegSpec = [reg[0]];
reg1: LocalRegSpec = [reg[1]];
reg2: LocalRegSpec = [reg[2]];
reg3: LocalRegSpec = [reg[3]];
reg4: LocalRegSpec = [reg[4]];
reg5: LocalRegSpec = [reg[5]];
reg6: LocalRegSpec = [reg[6]];
reg7: LocalRegSpec = [reg[7]];
reg8: LocalRegSpec = [reg[8]];
reg9: LocalRegSpec = [reg[9]];
reg10: LocalRegSpec = [reg[10]];
reg11: LocalRegSpec = [reg[11]];
reg12: LocalRegSpec = [reg[12]];
reg13: LocalRegSpec = [reg[13]];
reg14: LocalRegSpec = [reg[14]];
reg15: LocalRegSpec = [reg[15]];
The first 8 auxilliary registers can only written from kernel mode
global: AuxRegSpec = [aux[0]]; -- base of global frame table
hook: AuxRegSpec = [aux[1]]; -- addr of eldest frame saved to memory (per process)
free: AuxRegSpec = [aux[2]]; -- free frame slot addr (per processor)
base: AuxRegSpec = [aux[3]]; -- base of frame slots (per processor)
process: AuxRegSpec = [aux[4]]; -- addr of current process object (per process)
processor: AuxRegSpec = [aux[5]]; -- addr of current processor block
aux6: AuxRegSpec = [aux[6]]; -- # 0 => trace and sweep collection prohibited
aux7: AuxRegSpec = [aux[7]];
The second 8 auxilliary registers can be written from user mode
aux8: AuxRegSpec = [aux[8]];
aux9: AuxRegSpec = [aux[9]];
aux10: AuxRegSpec = [aux[10]];
aux11: AuxRegSpec = [aux[11]];
aux12: AuxRegSpec = [aux[12]];
noTS: AuxRegSpec = [aux[13]]; -- # 0 => trace and sweep collection prohibited
temp: AuxRegSpec = [aux[14]]; -- just used for stack save/restore
nregs: AuxRegSpec = [aux[15]]; -- just used for stack save/restore
The first 8 constant registers can only written from kernel mode
const0: ConstSpec = [const[0]]; -- constant 0
const1: ConstSpec = [const[1]]; -- constant 1
const2: ConstSpec = [const[2]]; -- constant 2
const3: ConstSpec = [const[3]]; -- constant 3
const4: ConstSpec = [const[4]]; -- constant 4
constN2: ConstSpec = [const[5]]; -- constant - 2
constN1: ConstSpec = [const[6]]; -- constant - 1
constNI: ConstSpec = [const[7]]; -- constant FIRST[INT]
The last 4 constant registers can be written from user mode
constNSI: ConstSpec = [const[8]]; -- constant 100000B
constU9: ConstSpec = [const[9]]; -- unspecified right now
constU10: ConstSpec = [const[10]]; -- unspecified right now
constU11: ConstSpec = [const[11]]; -- unspecified right now
stack options for sources (RRformInst & RJBformInst)
topSrc: SrcStackSpec = [srcStack[12]];
belowSrc: SrcStackSpec = [srcStack[13]];
popSrc: SrcStackSpec = [srcStack[14]];
belowSrcPop: SrcStackSpec = [srcStack[15]];
stack options for destinations (RRformInst)
topDst: DstStackSpec = [dstStack[12]];
belowDst: DstStackSpec = [dstStack[13]];
pushDst: DstStackSpec = [dstStack[15]];
ShortRegSpec:
TYPE =
MACHINE
DEPENDENT {
Must be consistent with DragOpsCross.ShortRegRJB for numbers, but should be consistent with HandCoding.RegSpec for names.
const0(0), -- constant 0
const1(1), -- constant 1
topSrc(2), -- [S]
popSrc(3)}; -- [S]-