BSD 4_4 release
[unix-history] / usr / src / usr.bin / f77 / pass1.vax / vax.c
index 7eb55b0..b7cec26 100644 (file)
@@ -1,12 +1,15 @@
-/*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+/*-
+ * Copyright (c) 1980 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This module is believed to contain source code proprietary to AT&T.
+ * Use and redistribution is subject to the Berkeley Software License
+ * Agreement and your Software Agreement with AT&T (Western Electric).
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)vax.c      5.1 (Berkeley) %G%";
-#endif not lint
+static char sccsid[] = "@(#)vax.c      5.4 (Berkeley) 4/12/91";
+#endif /* not lint */
 
 /*
  * vax.c
 
 /*
  * vax.c
@@ -15,8 +18,14 @@ static char sccsid[] = "@(#)vax.c    5.1 (Berkeley) %G%";
  *
  * University of Utah CS Dept modification history:
  *
  *
  * University of Utah CS Dept modification history:
  *
- * $Header: vax.c,v 3.1 85/02/27 19:14:58 donn Exp $
  * $Log:       vax.c,v $
  * $Log:       vax.c,v $
+ * Revision 5.2  85/08/10  05:06:30  donn
+ * Deleted intcon[] and realcon[], since they are now made redundant by
+ * changes in intr.c.  From Jerry Berkman.
+ * 
+ * Revision 5.1  85/08/10  03:50:38  donn
+ * 4.3 alpha
+ * 
  * Revision 3.1  85/02/27  19:14:58  donn
  * Changed to use pcc.h instead of pccdefs.h.
  * 
  * Revision 3.1  85/02/27  19:14:58  donn
  * Changed to use pcc.h instead of pccdefs.h.
  * 
@@ -54,37 +63,6 @@ int regnum[] =  { 10, 9, 8, 7, 6 } ;
 static int regmask[] = { 0x800, 0xc00, 0xe00, 0xf00, 0xf80, 0xfc0 };
 
 
 static int regmask[] = { 0x800, 0xc00, 0xe00, 0xf00, 0xf80, 0xfc0 };
 
 
-
-ftnint intcon[14] =
-       { 2, 2, 2, 2,
-         15, 31, 24, 56,
-         -128, -128, 127, 127,
-         32767, 2147483647 };
-
-#if HERE == VAX
-       /* then put in constants in octal */
-long realcon[6][2] =
-       {
-               { 0200, 0 },
-               { 0200, 0 },
-               { 037777677777, 0 },
-               { 037777677777, 037777777777 },
-               { 032200, 0 },
-               { 022200, 0 }
-       };
-#else
-double realcon[6] =
-       {
-       2.9387358771e-39,
-       2.938735877055718800e-39
-       1.7014117332e+38,
-       1.701411834604692250e+38
-       5.960464e-8,
-       1.38777878078144567e-17,
-       };
-#endif
-
-
 /*
  * The VAX assembler has a serious and not easily fixable problem
  * with generating instructions that contain expressions of the form
 /*
  * The VAX assembler has a serious and not easily fixable problem
  * with generating instructions that contain expressions of the form
@@ -428,32 +406,32 @@ register Constp cp;
   switch (cp->vtype)
     {
     case TYSHORT:
   switch (cp->vtype)
     {
     case TYSHORT:
-      *((short *) shrt) = (short) cp->const.ci;
+      *((short *) shrt) = (short) cp->constant.ci;
       return (shrt);
 
     case TYLONG:
     case TYLOGICAL:
     case TYREAL:
       return (shrt);
 
     case TYLONG:
     case TYLOGICAL:
     case TYREAL:
-      *((int *) lng) = cp->const.ci;
+      *((int *) lng) = cp->constant.ci;
       return (lng);
 
     case TYDREAL:
       ip = (int *) quad;
       return (lng);
 
     case TYDREAL:
       ip = (int *) quad;
-      jp = (int *) &(cp->const.cd[0]);
+      jp = (int *) &(cp->constant.cd[0]);
       ip[0] = jp[0];
       ip[1] = jp[1];
       return (quad);
 
     case TYCOMPLEX:
       ip = (int *) quad;
       ip[0] = jp[0];
       ip[1] = jp[1];
       return (quad);
 
     case TYCOMPLEX:
       ip = (int *) quad;
-      jp = (int *) &(cp->const.cd[0]);
+      jp = (int *) &(cp->constant.cd[0]);
       ip[0] = jp[0];
       ip[1] = jp[2];
       return (quad);
 
     case TYDCOMPLEX:
       ip = (int *) oct;
       ip[0] = jp[0];
       ip[1] = jp[2];
       return (quad);
 
     case TYDCOMPLEX:
       ip = (int *) oct;
-      jp = (int *) &(cp->const.cd[0]);
+      jp = (int *) &(cp->constant.cd[0]);
       *ip++ = *jp++;
       *ip++ = *jp++;
       *ip++ = *jp++;
       *ip++ = *jp++;
       *ip++ = *jp++;
       *ip++ = *jp++;
@@ -942,7 +920,7 @@ if (anylocals == YES)
 if(argvec)
        {
        if (argvec->tag != TADDR) badtag ("prolog",argvec->tag);
 if(argvec)
        {
        if (argvec->tag != TADDR) badtag ("prolog",argvec->tag);
-       argloc = argvec->memoffset->constblock.const.ci + SZINT;
+       argloc = argvec->memoffset->constblock.constant.ci + SZINT;
                        /* first slot holds count */
        if(proctype == TYCHAR)
                {
                        /* first slot holds count */
        if(proctype == TYCHAR)
                {
@@ -1004,7 +982,7 @@ for(p = ep->arglist ; p ; p = p->nextp)
                size = typesize[ q->vtype ];
                if(q->vtype == TYCHAR)
                        if( ISICON(q->vleng) )
                size = typesize[ q->vtype ];
                if(q->vtype == TYCHAR)
                        if( ISICON(q->vleng) )
-                               size *= q->vleng->constblock.const.ci;
+                               size *= q->vleng->constblock.constant.ci;
                        else
                                size = -1;
 
                        else
                                size = -1;
 
@@ -1034,13 +1012,13 @@ for(p = ep->arglist ; p ; p = p->nextp)
                                        p->datap->nameblock.vardesc.varno +
                                                ARGOFFSET);
                                }
                                        p->datap->nameblock.vardesc.varno +
                                                ARGOFFSET);
                                }
-                       else if(dp->baseoffset->constblock.const.ci != 0)
+                       else if(dp->baseoffset->constblock.constant.ci != 0)
                                {
                                char buff[25];
                                if(size > 0)
                                        {
                                        sprintf(buff, "\tsubl2\t$%ld,%d(ap)",
                                {
                                char buff[25];
                                if(size > 0)
                                        {
                                        sprintf(buff, "\tsubl2\t$%ld,%d(ap)",
-                                               dp->baseoffset->constblock.const.ci * size,
+                                               dp->baseoffset->constblock.constant.ci * size,
                                                p->datap->nameblock.vardesc.varno +
                                                        ARGOFFSET);
                                        }
                                                p->datap->nameblock.vardesc.varno +
                                                        ARGOFFSET);
                                        }