projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add .fill rep, size, value directive
[unix-history]
/
usr
/
src
/
old
/
as.vax
/
asparse.c
diff --git
a/usr/src/old/as.vax/asparse.c
b/usr/src/old/as.vax/asparse.c
index
64159c6
..
29bf77f
100644
(file)
--- a/
usr/src/old/as.vax/asparse.c
+++ b/
usr/src/old/as.vax/asparse.c
@@
-1,18
+1,6
@@
/* Copyright (c) 1980 Regents of the University of California */
/* Copyright (c) 1980 Regents of the University of California */
-static char sccsid[] = "@(#)asparse.c 4.
1
%G%";
+static char sccsid[] = "@(#)asparse.c 4.
4
%G%";
#include <stdio.h>
#include <stdio.h>
-#include <sys/types.h>
-#ifdef UNIX
-# include <a.out.h>
-#endif UNIX
-
-#ifdef VMS
-# ifdef UNIXDEVEL
-# include <a.out.h>
-# else VMSDEVEL
-# include <aout.h>
-# endif
-#endif VMS
#include "as.h"
#include "asexpr.h"
#include "asscan.h"
#include "as.h"
#include "asexpr.h"
#include "asscan.h"
@@
-83,6
+71,8
@@
int yyparse()
int seg_type; /*the kind of segment: data or text*/
int seg_number; /*the segment number*/
int space_value; /*how much .space needs*/
int seg_type; /*the kind of segment: data or text*/
int seg_number; /*the segment number*/
int space_value; /*how much .space needs*/
+ int fill_rep; /*how many reps for .fill */
+ int fill_size; /*how many bytes for .fill */
int field_width; /*how wide a field is to be*/
int field_value; /*the value to stuff in a field*/
int field_width; /*how wide a field is to be*/
int field_value; /*the value to stuff in a field*/
@@
-98,7
+88,7
@@
int yyparse()
while (INTOKSET(val, LINSTBEGIN)){
if (val == INT) {
while (INTOKSET(val, LINSTBEGIN)){
if (val == INT) {
- int i = ((struct exp *)yylval)->xvalue;
+ int i = ((struct exp *)yylval)->
e_
xvalue;
shift;
if (val != COLON)
goto nocolon;
shift;
if (val != COLON)
goto nocolon;
@@
-128,43
+118,59
@@
int yyparse()
shiftover(NAME);
nocolon:
if (val != COLON) {
shiftover(NAME);
nocolon:
if (val != COLON) {
+#ifdef FLEXNAMES
yyerror("\"%s\" is not followed by a ':' for a label definition",
yyerror("\"%s\" is not followed by a ':' for a label definition",
- np->name);
+#else not FLEXNAMES
+ yyerror("\"%.*s\" is not followed by a ':' for a label definition",
+ NCPS,
+#endif not FLEXNAMES
+ np->s_name);
goto errorfix;
}
restlab:
shift;
flushfield(NBPW/4);
goto errorfix;
}
restlab:
shift;
flushfield(NBPW/4);
- if ((np->type&XTYPE)!=XUNDEF) {
- if( (np->
type&XTYPE)!=dotp->
xtype
- || np->
value!=dotp->
xvalue
+ if ((np->
s_
type&XTYPE)!=XUNDEF) {
+ if( (np->
s_type&XTYPE)!=dotp->e_
xtype
+ || np->
s_value!=dotp->e_
xvalue
|| ( (passno==1)
|| ( (passno==1)
- &&(np->
index != dotp->
xloc)
+ &&(np->
s_index != dotp->e_
xloc)
)
){
#ifndef DEBUG
)
){
#ifndef DEBUG
- if (np->name[0] != 'L')
+ if (np->
s_
name[0] != 'L')
#endif not DEBUG
{
if (passno == 1)
#endif not DEBUG
{
if (passno == 1)
- yyerror("%.8s redefined", np->name);
+#ifdef FLEXNAMES
+ yyerror("%s redefined",
+#else not FLEXNAMES
+ yyerror("%.*s redefined",
+ NCPS,
+#endif not FLEXNAMES
+ np->s_name);
else
else
- yyerror("%.8s redefined: PHASE ERROR, 1st: %d, 2nd: %d",
- np->name,
- np->value,
- dotp->xvalue);
+#ifdef FLEXNAMES
+ yyerror("%s redefined: PHASE ERROR, 1st: %d, 2nd: %d",
+#else not FLEXNAMES
+ yyerror("%.*s redefined: PHASE ERROR, 1st: %d, 2nd: %d",
+ NCPS,
+#endif not FLEXNAMES
+ np->s_name,
+ np->s_value,
+ dotp->e_xvalue);
}
}
}
}
}
}
- np->type &= ~(XTYPE|XFORW);
- np->
type |= dotp->
xtype;
- np->
value = dotp->
xvalue;
+ np->
s_
type &= ~(XTYPE|XFORW);
+ np->
s_type |= dotp->e_
xtype;
+ np->
s_value = dotp->e_
xvalue;
if (passno == 1){
if (passno == 1){
- np->index = dotp-usedot;
- if (np->name[0] == 'L'){
+ np->
s_
index = dotp-usedot;
+ if (np->
s_
name[0] == 'L'){
nlabels++;
}
nlabels++;
}
- np->tag = LABELID;
+ np->
s_
tag = LABELID;
}
} /*end of this being a label*/
} /*end of to consuming all labels, NLs and SEMIS */
}
} /*end of this being a label*/
} /*end of to consuming all labels, NLs and SEMIS */
@@
-206,7
+212,7
@@
restlab:
case ILINENO:
shift; /*over the ILINENO*/
expr(locxp, val);
case ILINENO:
shift; /*over the ILINENO*/
expr(locxp, val);
- lineno = locxp->xvalue;
+ lineno = locxp->
e_
xvalue;
break;
case ISET: /* .set <name> , <expr> */
break;
case ISET: /* .set <name> , <expr> */
@@
-215,12
+221,12
@@
restlab:
shiftover(NAME);
shiftover(CM);
expr(locxp, val);
shiftover(NAME);
shiftover(CM);
expr(locxp, val);
- np->type &= (XXTRN|XFORW);
- np->
type |= locxp->
xtype&(XTYPE|XFORW);
- np->
value = locxp->
xvalue;
+ np->
s_
type &= (XXTRN|XFORW);
+ np->
s_type |= locxp->e_
xtype&(XTYPE|XFORW);
+ np->
s_value = locxp->e_
xvalue;
if (passno==1)
if (passno==1)
- np->
index = locxp->
xloc;
- if ((locxp->xtype&XTYPE) == XUNDEF)
+ np->
s_index = locxp->e_
xloc;
+ if ((locxp->
e_
xtype&XTYPE) == XUNDEF)
yyerror("Illegal set?");
break;
yyerror("Illegal set?");
break;
@@
-240,18
+246,18
@@
restlab:
if (passno == 1){
stpt = (struct symtab *)symalloc();
#ifdef FLEXNAMES
if (passno == 1){
stpt = (struct symtab *)symalloc();
#ifdef FLEXNAMES
- stpt->
name = np->
name;
+ stpt->
s_name = np->s_
name;
#else
#else
- movestr(stpt->
name, np->
name, NCPS);
+ movestr(stpt->
s_name, np->s_
name, NCPS);
#endif
#endif
- np->
tag = OBSOLETE;
/*invalidate original */
+ np->
s_tag = OBSOLETE;
/*invalidate original */
nforgotten++;
np = stpt;
nforgotten++;
np = stpt;
- if (locxp->xtype != XABS)
+ if (locxp->
e_
xtype != XABS)
("Illegal lsym");
("Illegal lsym");
- np->
value=locxp->
xvalue;
- np->type=XABS;
- np->tag = ILSYM;
+ np->
s_value=locxp->e_
xvalue;
+ np->
s_
type=XABS;
+ np->
s_
tag = ILSYM;
}
break;
}
break;
@@
-259,7
+265,7
@@
restlab:
shift;
np = (struct symtab *)yylval;
shiftover(NAME);
shift;
np = (struct symtab *)yylval;
shiftover(NAME);
- np->type |= XXTRN;
+ np->
s_
type |= XXTRN;
break;
case IDATA: /*.data [ <expr> ] */
break;
case IDATA: /*.data [ <expr> ] */
@@
-275,7
+281,7
@@
restlab:
seg_number = 0;
seg_type = -seg_type;
} else {
seg_number = 0;
seg_type = -seg_type;
} else {
- if (locxp->
xtype != XABS || (seg_number=locxp->
xvalue) >= NLOC) {
+ if (locxp->
e_xtype != XABS || (seg_number=locxp->e_
xvalue) >= NLOC) {
yyerror("illegal location counter");
seg_number = 0;
}
yyerror("illegal location counter");
seg_number = 0;
}
@@
-294,7
+300,7
@@
restlab:
if (passno==2) {
puchar(vms_obj_ptr,6); /* setpl */
puchar(vms_obj_ptr,seg_number); /* psect # */
if (passno==2) {
puchar(vms_obj_ptr,6); /* setpl */
puchar(vms_obj_ptr,seg_number); /* psect # */
- plong(vms_obj_ptr,dotp->xvalue);/* offset */
+ plong(vms_obj_ptr,dotp->
e_
xvalue);/* offset */
puchar(vms_obj_ptr,80); /* setrb */
if((vms_obj_ptr-sobuf) > 400){
write(objfil,sobuf,vms_obj_ptr-sobuf);
puchar(vms_obj_ptr,80); /* setrb */
if((vms_obj_ptr-sobuf) > 400){
write(objfil,sobuf,vms_obj_ptr-sobuf);
@@
-341,9
+347,9
@@
restlab:
if (val == COLON){
shiftover(COLON);
expr(pval, val);
if (val == COLON){
shiftover(COLON);
expr(pval, val);
- if (locxp->xtype != XABS)
+ if (locxp->
e_
xtype != XABS)
yyerror("Width not absolute");
yyerror("Width not absolute");
- field_width = locxp->xvalue;
+ field_width = locxp->
e_
xvalue;
locxp = pval;
if (bitoff + field_width >
curlen)
locxp = pval;
if (bitoff + field_width >
curlen)
@@
-355,7
+361,7
@@
restlab:
flushfield(curlen);
}
flushfield(curlen);
}
- if ((locxp->xtype&XTYPE)!=XABS) {
+ if ((locxp->
e_
xtype&XTYPE)!=XABS) {
if (bitoff)
yyerror("Illegal relocation in field");
field_width=LEN1;
if (bitoff)
yyerror("Illegal relocation in field");
field_width=LEN1;
@@
-364,15
+370,15
@@
restlab:
if (curlen==NBPW/2)
field_width = LEN2;
if (passno == 1){
if (curlen==NBPW/2)
field_width = LEN2;
if (passno == 1){
- dotp->xvalue += reflen[field_width];
+ dotp->
e_
xvalue += reflen[field_width];
} else {
} else {
- outrel(&locxp->xvalue,
+ outrel(&locxp->
e_
xvalue,
field_width,
field_width,
- locxp->xtype,
- locxp->xname);
+ locxp->
e_
xtype,
+ locxp->
e_
xname);
}
} else {
}
} else {
- field_value = locxp->xvalue & ( (1L << field_width)-1);
+ field_value = locxp->
e_
xvalue & ( (1L << field_width)-1);
bitfield |= field_value << bitoff;
bitoff += field_width;
}
bitfield |= field_value << bitoff;
bitoff += field_width;
}
@@
-383,16
+389,16
@@
restlab:
flushfield(curlen);
if ( ( curlen == NBPW/4) && bitoff)
flushfield(curlen);
if ( ( curlen == NBPW/4) && bitoff)
- dotp->xvalue ++;
+ dotp->
e_
xvalue ++;
break;
/*end of case IBYTE, IWORD, ILONG, IINT*/
case ISPACE: /* .space <expr> */
shift;
expr(locxp, val);
break;
/*end of case IBYTE, IWORD, ILONG, IINT*/
case ISPACE: /* .space <expr> */
shift;
expr(locxp, val);
- if (locxp->xtype != XABS)
+ if (locxp->
e_
xtype != XABS)
yyerror("Space size not absolute");
yyerror("Space size not absolute");
- space_value = locxp->xvalue;
+ space_value = locxp->
e_
xvalue;
ospace:
flushfield(NBPW/4);
#ifdef UNIX
ospace:
flushfield(NBPW/4);
#ifdef UNIX
@@
-403,7
+409,7
@@
restlab:
outs(strbuf[2].str, space_value);
#endif UNIX
#ifdef VMS
outs(strbuf[2].str, space_value);
#endif UNIX
#ifdef VMS
- dotp->
xvalue += space_value;
/*bump pc*/
+ dotp->
e_xvalue += space_value;
/*bump pc*/
if (passno==2){
if(*(strbuf[2].str)==0) {
puchar(vms_obj_ptr,81); /* AUGR */
if (passno==2){
if(*(strbuf[2].str)==0) {
puchar(vms_obj_ptr,81); /* AUGR */
@@
-418,20
+424,35
@@
restlab:
break;
#ifdef UNIX
break;
#ifdef UNIX
- case IFILL: /* .fill count, value */
- /* fill count bytes with value */
+ /*
+ * .fill rep, size, value
+ * repeat rep times: fill size bytes with (truncated) value
+ * size must be between 1 and 8
+ */
+ case IFILL:
shift;
expr(locxp, val);
shift;
expr(locxp, val);
- if (locxp->xtype != XABS)
+ if (locxp->
e_
xtype != XABS)
yyerror("Fill repetition count not absolute");
yyerror("Fill repetition count not absolute");
- space_value = locxp->xvalue;
+ fill_rep = locxp->e_xvalue;
+ shiftover(CM);
+ expr(locxp, val);
+ if (locxp->e_xtype != XABS)
+ yyerror("Fill size not absolute");
+ fill_size = locxp->e_xvalue;
+ if (fill_size <= 0 || fill_size > 8)
+ yyerror("Fill count not in in 1..8");
shiftover(CM);
expr(locxp, val);
shiftover(CM);
expr(locxp, val);
- if (
locxp->
xtype != XABS)
- yyerror("Fill value not absolute");
+ if (
passno == 2 && locxp->e_
xtype != XABS)
+
yyerror("Fill value not absolute");
flushfield(NBPW/4);
flushfield(NBPW/4);
- while(space_value-- > 0)
- outb(locxp->xvalue & 0xFF);
+ if (passno == 1) {
+ locxp->e_xvalue += fill_rep * fill_size;
+ } else {
+ while(fill_rep-- > 0)
+ bwrite(&locxp->e_xvalue, fill_size, txtfil);
+ }
break;
#endif UNIX
break;
#endif UNIX
@@
-448,7
+469,7
@@
restlab:
while (val == STRING){
flushfield(NBPW/4);
if (bitoff)
while (val == STRING){
flushfield(NBPW/4);
if (bitoff)
- dotp->xvalue++;
+ dotp->
e_
xvalue++;
stringp = (struct strdesc *)yylval;
#ifdef UNIX
outs(stringp->str, stringp->str_lg);
stringp = (struct strdesc *)yylval;
#ifdef UNIX
outs(stringp->str, stringp->str_lg);
@@
-457,7
+478,7
@@
restlab:
{
register int i;
for (i=0; i < stringp->str_lg; i++){
{
register int i;
for (i=0; i < stringp->str_lg; i++){
- dotp->xvalue += 1;
+ dotp->
e_
xvalue += 1;
if (passno==2){
puchar(vms_obj_ptr,-1);
puchar(vms_obj_ptr,stringp->str[i]);
if (passno==2){
puchar(vms_obj_ptr,-1);
puchar(vms_obj_ptr,stringp->str[i]);
@@
-484,7
+505,7
@@
restlab:
puchar(vms_obj_ptr,-1);
puchar(vms_obj_ptr,0);
}
puchar(vms_obj_ptr,-1);
puchar(vms_obj_ptr,0);
}
- dotp->xvalue += 1;
+ dotp->
e_
xvalue += 1;
#endif VMS
}
break;
#endif VMS
}
break;
@@
-493,11
+514,11
@@
restlab:
shift;
expr(locxp, val);
shift;
expr(locxp, val);
- if (locxp->xtype==XABS)
+ if (locxp->
e_
xtype==XABS)
orgwarn++;
orgwarn++;
- else if ((locxp->
xtype & ~XXTRN) != dotp->
xtype)
+ else if ((locxp->
e_xtype & ~XXTRN) != dotp->e_
xtype)
yyerror("Illegal expression to set origin");
yyerror("Illegal expression to set origin");
- space_value = locxp->
xvalue - dotp->
xvalue;
+ space_value = locxp->
e_xvalue - dotp->e_
xvalue;
if (space_value < 0)
yyerror("Backwards 'org'");
goto ospace;
if (space_value < 0)
yyerror("Backwards 'org'");
goto ospace;
@@
-548,7
+569,7
@@
restlab:
shift;
for (argcnt = 0; argcnt < 8; argcnt++){
expr(locxp, val);
shift;
for (argcnt = 0; argcnt < 8; argcnt++){
expr(locxp, val);
- stpt->
name[argcnt] = locxp->
xvalue;
+ stpt->
s_name[argcnt] = locxp->e_
xvalue;
xp = explist;
shiftover(CM);
}
xp = explist;
shiftover(CM);
}
@@
-560,26
+581,26
@@
restlab:
tailstab:
expr(locxp, val);
tailstab:
expr(locxp, val);
- if (! (locxp->xvalue & STABTYPS)){
+ if (! (locxp->
e_
xvalue & STABTYPS)){
yyerror("Invalid type in %s",stabname);
goto errorfix;
}
yyerror("Invalid type in %s",stabname);
goto errorfix;
}
- stpt->
ptype = locxp->
xvalue;
+ stpt->
s_ptype = locxp->e_
xvalue;
shiftover(CM);
expr(locxp, val);
shiftover(CM);
expr(locxp, val);
- stpt->
other = locxp->
xvalue;
+ stpt->
s_other = locxp->e_
xvalue;
shiftover(CM);
expr(locxp, val);
shiftover(CM);
expr(locxp, val);
- stpt->
desc = locxp->
xvalue;
+ stpt->
s_desc = locxp->e_
xvalue;
shiftover(CM);
exprisname = 0;
expr(locxp, val);
shiftover(CM);
exprisname = 0;
expr(locxp, val);
- p = locxp->xname;
+ p = locxp->
e_
xname;
if (p == NULL) { /*absolute expr to begin with*/
if (p == NULL) { /*absolute expr to begin with*/
- stpt->
value = locxp->
xvalue;
- stpt->index = dotp - usedot;
+ stpt->
s_value = locxp->e_
xvalue;
+ stpt->
s_
index = dotp - usedot;
if (exprisname){
if (exprisname){
- switch(stpt->ptype){
+ switch(stpt->
s_
ptype){
case N_GSYM:
case N_FNAME:
case N_RSYM:
case N_GSYM:
case N_FNAME:
case N_RSYM:
@@
-589,19
+610,19
@@
restlab:
case N_BCOMM:
case N_ECOMM:
case N_LENG:
case N_BCOMM:
case N_ECOMM:
case N_LENG:
- stpt->tag = STABFIXED;
+ stpt->
s_
tag = STABFIXED;
break;
default:
break;
default:
- stpt->tag = STABFLOATING;
+ stpt->
s_
tag = STABFLOATING;
break;
}
} else
break;
}
} else
- stpt->tag = STABFIXED;
+ stpt->
s_
tag = STABFIXED;
}
else { /*really have a name*/
}
else { /*really have a name*/
- stpt->
dest = locxp->
xname;
- stpt->
index = p->
index;
- stpt->
type = p->
type | STABFLAG;
+ stpt->
s_dest = locxp->e_
xname;
+ stpt->
s_index = p->s_
index;
+ stpt->
s_type = p->s_
type | STABFLAG;
/*
* We will assign a more accruate
* guess of locxp's location when
/*
* We will assign a more accruate
* guess of locxp's location when
@@
-609,7
+630,7
@@
restlab:
* The final value of value is
* given by stabfix()
*/
* The final value of value is
* given by stabfix()
*/
- stpt->tag = STABFLOATING;
+ stpt->
s_
tag = STABFLOATING;
}
/*
* tokptr now points at one token beyond
}
/*
* tokptr now points at one token beyond
@@
-636,17
+657,17
@@
restlab:
shift; /*over the ISTABDOT*/
if (passno == 1){
expr(locxp, val);
shift; /*over the ISTABDOT*/
if (passno == 1){
expr(locxp, val);
- if (! (locxp->xvalue & STABTYPS)){
+ if (! (locxp->
e_
xvalue & STABTYPS)){
yyerror("Invalid type in .stabd");
goto errorfix;
}
yyerror("Invalid type in .stabd");
goto errorfix;
}
- stpt->
ptype = locxp->
xvalue;
+ stpt->
s_ptype = locxp->e_
xvalue;
shiftover(CM);
expr(locxp, val);
shiftover(CM);
expr(locxp, val);
- stpt->
other = locxp->
xvalue;
+ stpt->
s_other = locxp->e_
xvalue;
shiftover(CM);
expr(locxp, val);
shiftover(CM);
expr(locxp, val);
- stpt->
desc = locxp->
xvalue;
+ stpt->
s_desc = locxp->e_
xvalue;
/*
*
* Now, clobber everything but the
/*
*
* Now, clobber everything but the
@@
-662,9
+683,9
@@
restlab:
* (ensures they are sorted into right place)/
* pass 2: Fix the actual value
*/
* (ensures they are sorted into right place)/
* pass 2: Fix the actual value
*/
- stpt->
value = dotp->
xvalue;
- stpt->index = dotp - usedot;
- stpt->
tag = STABFLOATING;
/*although it has no effect in pass 2*/
+ stpt->
s_value = dotp->e_
xvalue;
+ stpt->
s_
index = dotp - usedot;
+ stpt->
s_tag = STABFLOATING;
/*although it has no effect in pass 2*/
break;
case ISTABNONE: stabname = ".stabn"; goto shortstab;
break;
case ISTABNONE: stabname = ".stabn"; goto shortstab;
@@
-694,9
+715,9
@@
restlab:
#endif
}
#ifndef FLEXNAMES
#endif
}
#ifndef FLEXNAMES
- movestr(stpt->name, stringp->str, auxval);
+ movestr(stpt->
s_
name, stringp->str, auxval);
#else
#else
- stpt->name = savestr(stringp->str);
+ stpt->
s_
name = savestr(stringp->str);
#endif
goto tailstab;
break;
#endif
goto tailstab;
break;
@@
-710,17
+731,23
@@
restlab:
shiftover(CM);
expr(locxp, val);
shiftover(CM);
expr(locxp, val);
- if (locxp->xtype != XABS)
+ if (locxp->
e_
xtype != XABS)
yyerror("comm size not absolute");
yyerror("comm size not absolute");
- if (passno==1 && (np->type&XTYPE)!=XUNDEF)
- yyerror("Redefinition of %.8s", np->name);
+ if (passno==1 && (np->s_type&XTYPE)!=XUNDEF)
+#ifdef FLEXNAMES
+ yyerror("Redefinition of %s",
+#else not FLEXNAMES
+ yyerror("Redefinition of %.*s",
+ NCPS,
+#endif not FLEXNAMES
+ np->s_name);
if (passno==1) {
if (passno==1) {
- np->
value = locxp->
xvalue;
+ np->
s_value = locxp->e_
xvalue;
if (auxval == ICOMM)
if (auxval == ICOMM)
- np->type |= XXTRN;
+ np->
s_
type |= XXTRN;
else {
else {
- np->type &= ~XTYPE;
- np->type |= XBSS;
+ np->
s_
type &= ~XTYPE;
+ np->
s_
type |= XBSS;
}
}
break;
}
}
break;
@@
-765,17
+792,17
@@
restlab:
+SAFEEXPRBEG)) ) {
ERROR("expression expected");
}
+SAFEEXPRBEG)) ) {
ERROR("expression expected");
}
- expr(ap->xp,val);
+ expr(ap->
a_
xp,val);
overdisp:
if ( val == LP || sawsize){
shiftover(LP);
findreg(regno);
shiftover(RP);
overdisp:
if ( val == LP || sawsize){
shiftover(LP);
findreg(regno);
shiftover(RP);
- ap->atype = ADISP;
- ap->areg1 = regno;
+ ap->a
_a
type = ADISP;
+ ap->a
_a
reg1 = regno;
} else {
} else {
- ap->atype = AEXP;
- ap->areg1 = 0;
+ ap->a
_a
type = AEXP;
+ ap->a
_a
reg1 = 0;
}
goto index;
}
goto index;
@@
-788,8
+815,8
@@
restlab:
case REG:
case REGOP:
findreg(regno);
case REG:
case REGOP:
findreg(regno);
- ap->atype = AREG;
- ap->areg1 = regno;
+ ap->a
_a
type = AREG;
+ ap->a
_a
reg1 = regno;
break;
case MUL:
break;
case MUL:
@@
-819,7
+846,7
@@
restlab:
*/
if (val != REG && val != REGOP){
droppedLP = 1;
*/
if (val != REG && val != REGOP){
droppedLP = 1;
- val = exprparse(val, &(ap->xp));
+ val = exprparse(val, &(ap->
a_
xp));
droppedLP = 0;
goto overdisp;
}
droppedLP = 0;
goto overdisp;
}
@@
-827,34
+854,34
@@
restlab:
shiftover(RP);
if (val == PLUS){
shift;
shiftover(RP);
if (val == PLUS){
shift;
- ap->atype = AINCR;
+ ap->a
_a
type = AINCR;
} else
} else
- ap->atype = ABASE;
- ap->areg1 = regno;
+ ap->a
_a
type = ABASE;
+ ap->a
_a
reg1 = regno;
goto index;
case LITOP:
imm:
shift;
expr(locxp, val);
goto index;
case LITOP:
imm:
shift;
expr(locxp, val);
- ap->atype = AIMM;
- ap->areg1 = 0;
- ap->xp = locxp;
+ ap->a
_a
type = AIMM;
+ ap->a
_a
reg1 = 0;
+ ap->
a_
xp = locxp;
goto index;
case MP:
shift; /* -(reg) */
findreg(regno);
shiftover(RP);
goto index;
case MP:
shift; /* -(reg) */
findreg(regno);
shiftover(RP);
- ap->atype = ADECR;
- ap->areg1 = regno;
+ ap->a
_a
type = ADECR;
+ ap->a
_a
reg1 = regno;
index: /*look for [reg] */
if (val == LB){
shift;
findreg(regno);
shiftover(RB);
sawindex = 1;
index: /*look for [reg] */
if (val == LB){
shift;
findreg(regno);
shiftover(RB);
sawindex = 1;
- ap->areg2 = regno;
+ ap->a
_a
reg2 = regno;
}
break;
}
break;
@@
-866,21
+893,21
@@
restlab:
* Make a concession for *(%r)
* meaning *0(%r)
*/
* Make a concession for *(%r)
* meaning *0(%r)
*/
- if (ap->atype == ABASE) {
- ap->atype = ADISP;
- xp->xtype = XABS;
- xp->xvalue = 0;
- xp->xloc = 0;
- ap->xp = xp++;
+ if (ap->a
_a
type == ABASE) {
+ ap->a
_a
type = ADISP;
+ xp->
e_
xtype = XABS;
+ xp->
e_
xvalue = 0;
+ xp->
e_
xloc = 0;
+ ap->
a_
xp = xp++;
}
}
- ap->atype |= ASTAR;
+ ap->a
_a
type |= ASTAR;
sawmul = 0;
}
if (sawindex){
sawmul = 0;
}
if (sawindex){
- ap->atype |= AINDX;
+ ap->a
_a
type |= AINDX;
sawindex = 0;
}
sawindex = 0;
}
- ap->dispsize = sawsize == 0 ? d124 : sawsize;
+ ap->
a_
dispsize = sawsize == 0 ? d124 : sawsize;
if (val != CM) break;
shiftover(CM);
} /*processing all the arguments*/
if (val != CM) break;
shiftover(CM);
} /*processing all the arguments*/
@@
-895,6
+922,7
@@
restlab:
break;
case IFLOAT: curlen = 4; goto floatlist;
break;
case IFLOAT: curlen = 4; goto floatlist;
+ case IQUAD:
case IDOUBLE:
curlen = 8;
floatlist:
case IDOUBLE:
curlen = 8;
floatlist:
@@
-910,7
+938,7
@@
restlab:
if (val != FLTNUM) {
ERROR("floating number expected");
}
if (val != FLTNUM) {
ERROR("floating number expected");
}
- dotp->xvalue += curlen;
+ dotp->
e_
xvalue += curlen;
#ifdef UNIX
if (passno == 2) {
if(curlen == 8)
#ifdef UNIX
if (passno == 2) {
if(curlen == 8)
@@
-991,15
+1019,15
@@
int funnyreg(val, regnoback) /*what the read head will sit on*/
expr(locxp, val); /*and leave the current read head with value*/
if ( (passno == 2) &&
expr(locxp, val); /*and leave the current read head with value*/
if ( (passno == 2) &&
- ( locxp->xtype & XTYPE != XABS
- || locxp->xvalue < 0
- || locxp->xvalue >= 16
+ ( locxp->
e_
xtype & XTYPE != XABS
+ || locxp->
e_
xvalue < 0
+ || locxp->
e_
xvalue >= 16
)
){
yyerror("Illegal register");
return(0);
}
)
){
yyerror("Illegal register");
return(0);
}
- *regnoback = locxp->xvalue;
+ *regnoback = locxp->
e_
xvalue;
return(val);
}
return(val);
}