C2CAddressing.mesa C2CAddressing.errlog
Copyright Ó 1987, 1988, 1991 by Xerox Corporation. All rights reserved.
Christian Jacobi, January 19, 1993 4:56 pm PST
DIRECTORY
C2CDefs USING [AddressMode, AddressContainer, CodeOrRope, Mode],
IntCodeDefs USING [Node, Var],
Rope USING [ROPE];
C2CAddressing: CEDAR DEFINITIONS =
BEGIN
Mode: TYPE = C2CDefs.Mode;
CodeOrRope: TYPE = C2CDefs.CodeOrRope;
AddressMode: TYPE = C2CDefs.AddressMode;
AddressContainer: TYPE = C2CDefs.AddressContainer;
noAddress: AddressContainer = AddressContainer[NIL, NIL];
ProposedMode:
PROC [node: IntCodeDefs.Node, lhs:
BOOL, wrongSize:
BOOL, usedSz:
INT]
RETURNS [Mode];
--gets "natural" mode with which this node could be addressed
--wrongSize: size of node may be wrong
--lhs: lhs versus rhs
--usedSz: size which will be actually used; 0 if alignment does not matter
ProposedModeForVar:
PROC [var: IntCodeDefs.Var, lhs:
BOOL, wrongSize:
BOOL, usedSz:
INT]
RETURNS [Mode];
--gets "natural" mode with which this var could be addressed
--wrongSize: size of node may be wrong
--lhs: lhs versus rhs
--usedSz: size which will be actually used; 0 if alignment does not matter
ACFromCodes:
PROC [w: CodeOrRope, b: CodeOrRope¬
NIL]
RETURNS [AddressContainer];
--converts word and bit address codes to AddressContainer
--Convention: user of container shall not use addresses more than once (dynamically)
-- to prevent doubling side effects
END.