RTMicrocode.Mesa
Defines the interface between the CedarRuntime software and the CedarRuntime microcode
last edited 2-Feb-82 11:38:48 by Willie-Sue
last edited May 11, 1983 10:43 am by Paul Rovner
DIRECTORY
PrincOps USING[zMISC, zWCDBL, zICDBL, alpha ],
RTRefCounts USING[ProbeIndex, rcoState, MSOperation],
RTZones USING[PZone],
SafeStorage USING[Type];
RTMicrocode: DEFINITIONS
= BEGIN OPEN PrincOps;
microcodeVersion: CARDINAL = 13B;
microcode version number that corresponds to this CedarRuntime system
Stuff that will(?) be in PrincOps...
aRECLAIMEDREF: alpha = 60B;
used by the reclaimer when it finds a REF to be nilified in an object being reclaimed
aALTERCOUNT: alpha = 61B;
general, low-level access to refcount table entries; used by the collectors
aRSTKBits: alpha = 62B;
used by the collector to reset onStack bits at end of collection
aRTMOVESTATUS: alpha = 63B;
used in two ways, based on first arg (msOperation):
"initialize" ... initialize CedarRuntime ucode
"upDate" ... move info about overflow free list from microcode registers to memory and move other status info from memory to microcode registers
aRCFINALIZECOUNT: alpha = 64B;
used for statistics gathering, maybe someday to decide to collect
aISPIRECLAIMABLE: alpha = 65B;
used by the reclaimer to examine refcount table entries
aREADREGS: alpha = 66B;
used for Cedar microcode debugging
aCREATEREF: alpha = 67B;
used to establish a newly allocated object as such (sets refcount to logical 0)
NOTE copied in RTMicrocode to break DEFS circularity
aDUMPINDEX: alpha = 70B;
used for Cedar software debugging
aGETCANONICALREFERENTTYPE: alpha = 72B;
used (e.g.) by compiled code for NARROW
Support for the allocator
aALLOCATEHEAPNODE: alpha = 74B;
aFREEOBJECT: alpha = 75B;
aFREEPREFIXEDNODE: alpha = 77B;
MACHINE CODE Procedures...
RECLAIMEDREF: PROC[ref: REF] RETURNS[REF] =
MACHINE CODE { zMISC, aRECLAIMEDREF };
ALTERCOUNT: PROC[rcv: RTRefCounts.rcoState, ref: REF] =
MACHINE CODE { zMISC, aALTERCOUNT };
RESETSTKBITS: PROC[pi: RTRefCounts.ProbeIndex] =
MACHINE CODE { zMISC, aRSTKBits };
RTMOVESTATUS: PROC[msOperation: RTRefCounts.MSOperation, gcStateBank: CARDINAL ← 0]
RETURNS[CARDINAL]=
MACHINE CODE { zMISC, aRTMOVESTATUS };
RCFINALIZECOUNT: PROC RETURNS [CARDINAL] =
MACHINE CODE { zMISC, aRCFINALIZECOUNT };
ISPIRECLAIMABLE: PROC[pi: RTRefCounts.ProbeIndex]
RETURNS[fpi: RTRefCounts.ProbeIndex, npi: CARDINAL] =
MACHINE CODE { zMISC, aISPIRECLAIMABLE };
READREGS: PROC RETURNS[CARDINAL] =
MACHINE CODE { zMISC, aREADREGS };
NOTE copied in RTRefCounts to break DEFS circularity
CREATEREF: PROC[npr: RTRefCounts.rcoState, ref: REF] =
MACHINE CODE { zMISC, aCREATEREF };
DUMPINDEX: PROC[pi: RTRefCounts.ProbeIndex] RETURNS[count: CARDINAL] =
MACHINE CODE { zMISC, aDUMPINDEX };
GETCANONICALREFERENTTYPE: PROC[ref: REF] RETURNS[SafeStorage.Type] =
MACHINE CODE { zMISC, aGETCANONICALREFERENTTYPE };
ALLOCATEHEAPNODE:
PROC[zn: RTZones.PZone, size: CARDINAL, type: SafeStorage.Type] RETURNS[LONG POINTER] =
MACHINE CODE { zMISC, aALLOCATEHEAPNODE };
FREEOBJECT: PROC[ptr: LONG POINTER] =
MACHINE CODE { zMISC, aFREEOBJECT };
FREEPREFIXEDNODE: PROC[ptr: LONG POINTER, zn: RTZones.PZone] =
MACHINE CODE { zMISC, aFREEPREFIXEDNODE };
PPALTERCOUNT: PROC[rcv: RTRefCounts.rcoState, ref: REF] =
MACHINE CODE { zMISC, aALTERCOUNT};
ASSIGNREF: PROC[refNew: REF, refPtr: LONG POINTER TO REF] =
MACHINE CODE { zWCDBL, 0 };
ASSIGNREFNEW: PROC[refNew: REF, refPtr: LONG POINTER TO REF] =
MACHINE CODE { zICDBL, 0 };
END.