Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50325/dtc.beg
There are no other files named dtc.beg in the archive.
! File:   DTC.BEG
!
!    This work was supported by the Advanced Research
!    Projects Agency of the Office of the Secretary of
!    Defense (F44620-73-C-0074) and is monitored by the
!    Air Force Office of Scientific Research.

!
!  THE FOLLOWING FIELD DEFINITIONS HAVE TO DO WITH SETTING AND TESTING
!    THE FIELDS OF THE NODES THEMSELVES.  THE FIRST PART HAS TO DO
!    WITH THE RESULT WORD FORMAT (AND IS PERHAPS NOT NEEDED OUTSIDE
!    OF DELAY).  THE SECOND PART CONCERNS CODE PRODUCTION AND MUST BE
!    SHARED.

!  RESULT WORD FIELD DEFINITIONS:

BIND	RWOFF=5, ! STATEWORD OFFSET IN A GT NODE
	BWOFF=7; ! GT BITS WORD OFFSET IN A GT NODE

COMMENT ! FIELDK
!
! FUNCTION:
!	USED FOR SETTING UP BINDS OF IDENTIFIERS AND ASSOCIATED
!	VARIATIONS THAT REPRESENT INFORMATION CONTAINED IN THE
!	REQUEST, RESULT AND STATE WORDS DURING DELAY.
! INPUT:
!	PS -- THE BIT POSITION AT WHICH THE FIELD STARTS
!	 N -- THE BASIC NAME OF A PARTICULAR VALUE FOR THIS FIELD
!	 O -- THE ACTUAL LITERAL VALUE FOR THIS IDENTIFIER
! SPECIFICS:
!	THE NAME 'N' IS BOUND TO 'O'. THE NAME SUFFIXED WITH A 'K'
!	IS BOUND TO 'O' SHIFTED TO ITS PROPER BIT POSITIONING (PS)
!	TO BE USED A MASK. THE NAME SUFFIXED WITH A 'Q' IS THE
!	STARTING BIT POSITION OF THE INFORMATION FIELD ITSELF (PS).
! EXAMPLE:
!	THE VALUE TYPE FIELD HAS FOUR POSSIBLE CHOICES: RFREAL,
!	RFFLOW, RFNONE AND RFBOTH. THEREFORE A TWO BIT WIDE FIELD
!	IS NEEDED. AS IT TURNS OUT, BITS 34 & 35 ARE THIS FIELD.
!	THEREFORE, TO DEFINE THE RFFLOW SUBSTATE MNEUMONIC WITH ITS
!	ASSOCIATED MASK, WE HAVE:
!		FIELDK(34,RFFLOW,2);
!	WHICH EXPANDS TO
!		BIND RFFLOW=2, RFFLOWK=2^34, RFFLOWQ=34;
!
  MACRO FIELDK(PS,N,O)=BIND N=O, ID(N)K=N^PS, ID(N)Q=PS$;

  MACRO
	SRFF	=34,2$,		! REAL/FLOW SUBSTATES
	  SRFRF	=34,1$,		! REAL RESULT BIT
	  SRFFF	=35,1$,		! FLOW RESULT BIT
	SLF	=33,1$,		! NON-LITERAL(=0)/LITERAL(=1)
	SSLF	=30,3$,		! LITERAL SUBSTATE CASES
	SSPF	=27,3$,		! POINTER SUBSTATE CASES
	KNEGF	=26,1$,		! RESULT NEGATIVE
	KNOTF	=25,1$,		! RESULT COMPLEMENTED
	IDTF	=24,1$,		! INVOLVES DESTROYABLE TEMPORARY
	IMMF	=23,1$,		! IMMEDIATE ADDRESS (ON SYMBOL OR LIT)
	RWORDF=23,13$;		! THE WHOLE RESULT WORD BITS FIELD

BIND RESULTPOS=23;

! SAME FIELD DEFINITIONS EXCEPT FOR USE WITH GTVEC MAPPING IN ACCESSING
!  THE STATE WORD OF THE GT NODE

MACRO
	NSRFF	=RWOFF,34,2$,		! REAL/FLOW SUBSTATES
	  NSRFRF =RWOFF,34,1$,		! REAL RESULT BIT
	  NSRFFF =RWOFF,35,1$,		! FLOW RESULT BIT
	NSLF	=RWOFF,33,1$,		! NON-LITERAL(=0)/LITERAL(=1)
	NSSLF	=RWOFF,30,3$,		! LITERAL SUBSTATE CASES
	NSSPF	=RWOFF,27,3$,		! POINTER SUBSTATE CASES
	NKNEGF	=RWOFF,26,1$,		! RESULT NEGATIVE
	NKNOTF	=RWOFF,25,1$,		! RESULT COMPLEMENTED
	NIDTF	=RWOFF,24,1$,		! INVOLVES DESTROYABLE TEMPORARY
	NIMMF	=RWOFF,23,1$,		! IMMEDIATE ADDRESS (ON SYMBOL OR LIT)
	NRWORDF	=RWOFF,23,13$;	! THE "WHOLE THING"

!(SAME FIELD DEFINITIONS FOR THE STATE WORD OF THE GT NODE.)

  ! SRFF VALUES

	FIELDK(34,RFNONE,0);
	FIELDK(34,RFREAL,1);
	FIELDK(34,RFFLOW,2);
	FIELDK(34,RFBOTH,3);

  ! SLF VALUES

	FIELDK(33,NOTLIT,0);
	FIELDK(33,LIT,1);

  ! SSLF VALUES

	FIELDK(30,LFOTHER,0);
	FIELDK(30,LFZERO,1);	! =0
	FIELDK(30,LFPM1,2);	! = +/- 1
	FIELDK(30,LFPM2,3);	! = +/- 2
	FIELDK(30,LF2N,4);	! = +/- (2 ** N)
	FIELDK(30,LF2NM1,5);	! = +/- (2 ** N -1)

  ! SSPF VALUES

	FIELDK(27,PFNONE,0);	! NO POINTER SPECIFIED
	FIELDK(27,PF016,1);	! <0,16>
	FIELDK(27,PF08,2);	! <0,8>
	FIELDK(27,PFE1,3);	! <E,1>
	FIELDK(27,PFOTHER,4);	! <E1,E2>
	FIELDK(27,PF88,5);	! <8,8>

  ! KNEGF VALUES

	FIELDK(26,KPOS,0);
	FIELDK(26,KNEG,1);
  ! IMMF VALUES

	FIELDK(23,IMM,1);




!
!  REAL CODE CONTROL BITS (IN CXBITS)
!

  MACRO
	RCMOF	=BWOFF,24,1$,		! "MOV OFFSET, TEMP"
	RCMTF	=BWOFF,23,1$,		! "MOV TARGET, TEMP"
	RCNTF	=BWOFF,22,1$,		! "NEG TEMP"
	RCOPTF	=BWOFF,21,1$,		! "OPERATOR NON-TARGET, TEMP"
	RCAF	=BWOFF,20,1$,		! "ADD OFFSET,TEMP"
	RCSF	=BWOFF,19,1$,		! "SUB OFFSET, TEMP"
	RCCF	=RCOPTF$,		! "COMPLEMENT TEMP"
	ROTHER	=BWOFF,20,1$,		!  SELECT CONTAINS AN OTHERWISE OR ALWAYS

	RCBITS	=BWOFF,19,6$,
	DELAYBITS =BWOFF,19,16$;

  ! OTHER CONTROL BITS IN THE GT ENTRY
  
  MACRO
	GCODEF=RCOPTF$,		! GENERATE CODE - VALID ONLY FOR +,- NODES
	LABELREQDF=BWOFF,27,1$,	! LABEL MUST BE ASSIGNED FOR NODE
	SYMOFFF=BWOFF,28,1$,	! OFFSETF IS A SYMBOL TABLE POINTER RATHER THAN LITERAL
	SYMRESULT=BWOFF,29,1$;	! RESULT IS SYMBOL (OFFSET AND RES. STATE)


COMMENT ! ISCSE, ISCSEUSE, ISCSECREATION, ISLARGECSE
!
! FUNCTION:
!	PREDICATES TO DETERMINE CSE INFORMATION ABOUT
!	A NODE. THE PREDICATES GIVE 'TRUE' ON THE FOLLOWING DESCRIBED
!	CONDITIONS:
!	  ISCSE -- IF NODE IS ANY KIND OF CSE (PARENT OR USE)
!	  ISCSEUSE -- IF NODE IS A CSE USE BUT NOT A CSPARENT
!	  ISCSECREATION -- IF NODE IS A CSPARENT
!	  ISLARGECSE -- IF NODE IS A LARGE CSE (3 OR MORE USES)
!
    MACRO
	ISCSE(NODE)=(.GT[.GT[.NODE,CSPARENT],OCCF] GTR 1)$,
	ISCSEUSE(NODE)=(BIND GTVEC ND=(NODE); ISCSE(NODE) AND NOT .ND[MUSTGENCODE])$,
	ISCSECREATION(NODE)=(BIND GTVEC ND=(NODE); ISCSE(NODE) AND .ND[MUSTGENCODE])$,
	ISLARGECSE(NODE)=(.GT[.GT[.NODE,CSPARENT],OCCF] GTR 2)$;

MACRO NONBOGUS(NODE)=		! COUNTERPART OF ROUTINE IN FLOWAN
	(DO NODE<ADDRF>_.NODE[CSTHREAD] UNTIL .NODE[MUSTGENCODE])$;

BIND ONES=#11111111,REPLICA3=#200401;
MACRO	SUMBITS(RCC)=(REGISTER QQ; QQ_((RCC)*REPLICA3 AND ONES)*ONES; .QQ<21,3>)$;
		% (VALID IF RCC HAS SEVEN OR FEWER BITS) %