Google
 

Trailing-Edge - PDP-10 Archives - bb-m836c-bm_tops20_v6_1_tools - tools/blis10/rg3n.bli
There are 18 other files named rg3n.bli in the archive. Click here to see a list.
!THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
!  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
!
!COPYRIGHT (C) 1972,1973,1974,1977,1978 DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 01754
!FILENAME:	H3REGI.BLI
!DATE:		14 JANUARY 74	MGM/FLD/KR

%3.43%	GLOBAL BIND H3REV=4;	!MODULE VERSION NUMBER

       
!REVISION HISTORY
!7-15-77   ROUTINE RGINIT IS MODIFIED SO THAT SREG,VREG,FREG,
!          DREGS,RESREGM ARE DEFINED ACCORDING LCG CONVENSION
!          USING /Z SWITCH. THE USER CAN REDEFINE THEM IN MODULE 
!          HEAD.THESE ARE ALSO MADE GLOBAL FOR REL FILE.THIS FUTURE
!          WILL IDENTIFY AND INFORM THE USER AT LINK TIME IF
!          ANY MODULE IS COMPILED WITH DIFFERENT REGISTER
!          CONVENSION.
!






%%
%   THIS SECTION OF DRIVER INITIALIZES THE REGISTER MASKS AND
  COUNTS, NAMELY:

    MODREGM--BIT I ON INDICATES REGISTER I RESERVED BY PROGRAMMER
             OR IS ONE OF THE SPECIAL REGISTERS (VBF OR S);
    RESREGM--BIT I ON INDICATES REGISTER I RESERVED BY PROGRAMMER;
    NOSAVR--COUNT OF DECLARABLE REGISTERS;
    S-, B-, F-, V-REG--THE RUN-TIME SUPPORT REGISTERS.

    THE MODULE DECLARATION ALLOWS USER SETTING OF THESE VARIABLES--
  THE DECLARATIONS ARE DETECTED IN SWITCHER (IN DECLAR.BLI) WHICH
  THEN SIMPLY CALLS ONE OF THE GLOBAL ROUTINES DEFINED BELOW:

    PSWRES--RESERVES USER REGISTERS (SETTING MODREGM ONLY);
    PSWSAV--SETS NOSAVR;
    PSWSPC(I)--DEFINES SPECR(I), ONE OF THE SUPPORT REGISTERS.

    THE MODULE DECLARATION ALSO ALLOWS SETTING OF THE STACK REGISTERS.
  THE GLOBAL MACROS "STKLEN" AND "STKSTE" ARE USED TO GENERATE THE
  CODE FOR THE INITIALIZATION, ALSO DONE IN THIS BLOCK.  THE ROUTINE
  PSWSTK DEFINID BELOW HANDLES USER SPECIFICATION OF THESE.

    THE WINDOW HAS THE SWITCH TABLE POINTER IN "SYM" UPON ENTRY
  TO EACH OF THESE ROUTINES.  EACH ROUTINE RETURNS A VALUE OF 1
  IF THERE WAS A SYNTAX ERROR (AFTER DOING AN "ERROR").  THE MODULE
  THEN TRIES TO RECOVER BY LOOKING FOR A BEGIN.  ALL SEMANTIC ERRORS
  ARE TREATED AS WARNINGS--WE ATTEMPT TO MAKE SYNTACTIC ERRORS
  INTO WARNINGS.
%
%%
GLOBAL ROUTINE RGINIT =
BEGIN
   EXTERNAL ZFLAG,RREG;
  MAP MNAM, ACCUM;
%3.36%  MACRO SPECR(I)=(CASE I OF SET SREG; FREG; VREG TES)$,
        SYNER(X,Y)=(WARNEM(X,Y); RETURN 1)$,
        LDEL=DEL<LEFTHALF>$;

  GLOBAL ROUTINE PSWRES=
    BEGIN
      IF .LDEL NEQ HPAROPEN THEN SYNER(.NDEL,#606);
      DO
        BEGIN
          HRUND(); 
          IF (NOT LITP(.SYM)) OR (LITV(.SYM) GTR 15) OR
             (LITV(.SYM) LSS 0)
            THEN WARNEM(.NSYM,#612)
            ELSE 
              IF (.MODREGM OR .RESREGM)^(-LITV(.SYM))
                THEN WARNEM(.NSYM,ERSMINUSE)
                ELSE RESREGM_.RESREGM OR 1^LITV(.SYM)
        END
        WHILE .LDEL EQL HCOMMA;
      IF .LDEL NEQ HROCLO THEN SYNER(.NDEL,#606) ELSE HRUND();
      0
    END;

  GLOBAL ROUTINE PSWSAV=
    BEGIN
      IF .LDEL NEQ HEQL THEN SYNER(.NDEL,#610);
      HRUND(); 
      IF (NOT LITP(.SYM)) OR (LITV(.SYM) GTR 8) OR
         (LITV(.SYM) LSS 0)
        THEN WARNEM(.NSYM,#641)		! ?DNL
        ELSE NOSVR_LITV(.SYM);
      0
    END;

  GLOBAL ROUTINE PSWSPC(I)=
    BEGIN
      IF .LDEL NEQ HEQL THEN SYNER(.NDEL,ERSYRRINV);
      HRUND(); 
      IF (IF (NOT LITP(.SYM)) 
            THEN 1
            ELSE (LITV(.SYM) GTR 15) OR
                 (LITV(.SYM) LSS (.I NEQ 0)) )
        THEN WARNEM(.NSYM,ERSMSPRINV)
        ELSE
          IF (.MODREGM OR .RESREGM)^(-LITV(.SYM))
            THEN WARNEM(.NSYM,#642)	! ?SRN
            ELSE (MODREGM_.MODREGM OR 1^LITV(.SYM);
                  SPECR(.I)_LITV(.SYM));
      0
    END;
% ROUTINE TO ISSUE REGISTER ERROR MESSAGE AND RESET MASKS %
ROUTINE WNRTOM =
  BEGIN
    WARNEM(.NSYM,ERSMTOOM);
    MODREGM_.MODREGM XOR .RESREGM;
    RESREGM_0;
    NOSVR_5;
  END;
% BEGIN ACTUAL MODULE INITIALIZATION BLOCK %

  LOCAL AVLREG, VALREG, CONTIG, C, J;
        IF .ZFLAG THEN
          BEGIN
              INCR I FROM 0 TO 2
              DO (IF .SPECR(.I) GEQ 0 THEN 
                          (RREG[.I]_.SPECR(.I);RREG[4]_.RREG[4] OR 1^.SPECR(.I))
                    ELSE (SPECR(.I)_.RREG[.I];
                           RREG[4]_.RREG[4] OR 1^.RREG[.I]));
              IF .RESREGM EQL 0 THEN
                           RESREGM_#40001;
             IF .NOSVR EQL 5 THEN 
                     NOSVR_7;
              MODREGM_.RREG[4]
          END;
  %FILL SPECIAL REGISTERS%

  MODREGM_.MODREGM OR .RESREGM OR (.SREG GTR 0);
  AVLREG_-1; ACCUM[1]_-2;
  CONTIG_0;
%4.04%	C_IF .VREG LSS 0 THEN 4
%4.04%			ELSE IF .FREG LSS 0 THEN 3 ELSE 1;
  DO
    (IF .CONTIG LSS 0 THEN WNRTOM())
    UNTIL
     (CONTIG_
%4.04%	       (INCR I FROM .C TO 15 DO
%4.04%	          IF ((.MODREGM^(-(.I AND 15))) AND 3) EQL 0
            THEN BREAK (.I AND 15))) GEQ 0;
  MODREGM_.MODREGM OR (CONTIG_3^.CONTIG);
%3.36%  INCR I FROM 0 TO 2 DO
    BEGIN
      VALREG_SPECR(.I);
      IF @.VALREG LSS 0 
        THEN
          (DO AVLREG_.AVLREG+1
%3.36%       WHILE ((.MODREGM^(-.AVLREG)) OR (.AVLREG EQL 1) %FORCE FREG TO REG 2% );
           (.VALREG)<0,36>_.AVLREG;
           MODREGM_.MODREGM OR 1^.AVLREG); %END OF IF%
%3.36%      ACCUM[0]_(CASE .I OF SET 'SREG';'FREG';'VREG' TES) OR #376;
      STINSERT(ABSOLUTET^TYPEFP,LITLEXEME(@.VALREG OR 36^24))
    END;

  %CHECK TO SEE THAT WE HAVE 3 REGISTERS AVAILABLE FOR
   TEMPORARIES, NOT INCLUDING THE ZERO REGISTER, AND INSURE THAT
   AT LEAST 2 ARE CONTIGUOUS%

  AVLREG_0;
  INCR I FROM 1 TO 15 DO AVLREG_.AVLREG+((.MODREGM^(-.I)) AND 1);
  IF ((.AVLREG+.NOSVR) GTR (14+(.SREG EQL 0)))  
    THEN WNRTOM();


	SVREGM_0;J_16;
	DECR I FROM 15 TO (C_0) DO
	  BEGIN
	    C_.C+1;
	    IF .C GTR .NOSVR THEN
	       BREAK(DO LAHTR_J_.J-1 UNTIL NOT .MODREGM^(-.J));
	    DO J_.J-1 UNTIL NOT .MODREGM^(-.J);
	    SVREGM_.SVREGM OR (1^.J)
	  END;
        MODREGM_.MODREGM XOR .CONTIG;
	HITREGM_(1^16-1) XOR .SVREGM XOR .MODREGM;
	JSPREG_35-FIRSTONE(.HITREGM);
	REGINIT(2);
	GENSYMS_REGUSE_0;


END;  % END ROUTINE RGINIT %



!END OF H3REGI.BLI