The em_argtype sometimes was not set right
authorceriel <none@none>
Fri, 3 Jul 1987 10:35:55 +0000 (10:35 +0000)
committerceriel <none@none>
Fri, 3 Jul 1987 10:35:55 +0000 (10:35 +0000)
modules/src/read_em/read_em.3
modules/src/read_em/reade.c
modules/src/read_em/readk.c

index 5955338..e614c13 100644 (file)
@@ -139,8 +139,7 @@ Common definitions are \fBlong\fR for \fBarith\fR and \fBunsigned int\fR for
 The \fIe_instr\fR structure consists of the fields
 \fIem_type\fR, containing the type of this \fIe_instr\fR,
 \fIem_opcode\fR, containing the opcode of an instruction,
-\fIem_arg\fR, containing a possible argument,
-and two other fields for special purposes explained later.
+and \fIem_arg\fR, containing a possible argument.
 .PP
 The possible values of
 \fIem_type\fR, defined in <em_comp.h>, are summarized below:
index feedf74..144c472 100644 (file)
@@ -601,6 +601,7 @@ getlabel(c, p)
        switch(p->em_argtype) {
        case cst_ptyp:
                p->em_type = EM_DEFILB;
+               p->em_argtype = ilb_ptyp;
                p->em_ilb = p->em_cst;
                break;
        case sof_ptyp:
index dfb0225..df4e813 100644 (file)
@@ -307,6 +307,7 @@ gethead(p)
 
        if (i < sp_filb0+sp_nilb0 && i >= sp_filb0) {   /* Instruction label */
                p->em_type = EM_DEFILB;
+               p->em_argtype = ilb_ptyp;
                p->em_ilb = i - sp_filb0;
                return;
        }
@@ -314,11 +315,13 @@ gethead(p)
        switch(i) {
        case sp_ilb1:   /* Instruction label */
                p->em_type = EM_DEFILB;
+               p->em_argtype = ilb_ptyp;
                p->em_ilb = getbyte();
                break;
 
        case sp_ilb2:   /* Instruction label */
                p->em_type = EM_DEFILB;
+               p->em_argtype = ilb_ptyp;
                p->em_ilb = get16();
 #ifdef CHECKING
                if (p->em_ilb > 32767 && !EM_error) {
@@ -329,11 +332,13 @@ gethead(p)
 
        case sp_dlb1:   /* Numeric data label */
                p->em_type = EM_DEFDLB;
+               p->em_argtype = nof_ptyp;
                p->em_dlb = getbyte();
                break;
 
        case sp_dlb2:   /* Numeric data label */
                p->em_type = EM_DEFDLB;
+               p->em_argtype = nof_ptyp;
                p->em_dlb = get16();
 #ifdef CHECKING
                if (p->em_dlb > 32767 && !EM_error) {
@@ -347,6 +352,7 @@ gethead(p)
                struct string *s;
 
                p->em_type = EM_DEFDNAM;
+               p->em_argtype = sof_ptyp;
                if (!(s = getstring(1))) {
                        p->em_dnam = "";
                }