Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.10
 
1.11
 
MAIN:ragge:20140603201950
 
code.c
_>7070         if ((name = sp->soname) == NULL)
 7171                 name = exname(sp->sname);
 7272 
<> 73+        if (ISFTN(sp->stype))
  74+                return;
7375         if (sp->sclass == EXTDEF)
 7476                 printf("\t.globl %s\n", name);
 7577         if (sp->slevel == 0)
     
 !
105107 }
 106108 
 107109 
<> 110+//static int ac3temp;
108111 /*
 109112  * code for the end of a function
 110113  * deals with struct return here
     
 !
115118         NODE *p, *q;
 116119 //      int sz;
 117120 
<> 121+#if 0
  122+        /* restore ac3 */
  123+        p = block(REG, 0, 0, INT, 0, 0);
  124+        regno(p) = 3;
  125+        q = tempnode(ac3temp, INT, 0, 0);
  126+        ecomp(buildtree(ASSIGN, p, q));
  127+#endif
  128+
  129+
118130         if (cftnsp->stype != STRTY+FTN && cftnsp->stype != UNIONTY+FTN)
 119131                 return;
 120132 cerror("efcode");
     
 !
143155 void
 144156 bfcode(struct symtab **a, int n)
 145157 {
<> 158+//      NODE *p, *q;
146159         int i;
 147160 
<> 161+        for (i = 0; i < n; i++) {
  162+                if (a[i]->stype == CHAR)
  163+                        a[i]->stype = INT;
  164+                if (a[i]->stype == UCHAR)
  165+                        a[i]->stype = UNSIGNED;
  166+        }
  167+
148168         if (cftnsp->stype != STRTY+FTN && cftnsp->stype != UNIONTY+FTN)
 149169                 return;
 150170 cerror("bfcode");
     
 !
166186 {
 167187 }
 168188 
<>169 -#if 0
 170 -/*
 171 - * Print character t at position i in one string, until t == -1.
 172 - * Locctr & label is already defined.
 173 - */
 174 -void
 175 -bycode(int t, int i)
 176 -{
 177 -        static  int     lastoctal = 0;
 178 -
 179 -        /* put byte i+1 in a string */
 180 -
 181 -        if (t < 0) {
 182 -                if (i != 0)
 183 -                        puts("\"");
 184 -        } else {
 185 -                if (i == 0)
 186 -                        printf("\t.ascii \"");
 187 -                if (t == '\\' || t == '"') {
 188 -                        lastoctal = 0;
 189 -                        putchar('\\');
 190 -                        putchar(t);
 191 -                } else if (t < 040 || t >= 0177) {
 192 -                        lastoctal++;
 193 -                        printf("\\%o",t);
 194 -                } else if (lastoctal && '0' <= t && t <= '9') {
 195 -                        lastoctal = 0;
 196 -                        printf("\"\n\t.ascii \"%c", t);
 197 -                } else {        
 198 -                        lastoctal = 0;
 199 -                        putchar(t);
 200 -                }
 201 -        }
 202 -}
 203 -#endif
 204 -
205189 /* fix up type of field p */
 206190 void
 207191 fldty(struct symtab *p)
     
 !
223207 NODE *
 224208 funcode(NODE *p)
 225209 {
<> 210+        NODE *r, *l;
  211+
  212+        /* Fix function call arguments. On nova, just add funarg */
  213+        for (r = p->n_right; r->n_op == CM; r = r->n_left) {
  214+                if (r->n_right->n_op != STARG)
  215+                        r->n_right = block(FUNARG, r->n_right, NIL,
  216+                            r->n_right->n_type, r->n_right->n_df,
  217+                            r->n_right->n_ap);
  218+        }
  219+        if (r->n_op != STARG) {
  220+                l = talloc();
  221+                *l = *r;
  222+                r->n_op = FUNARG;
  223+                r->n_left = l;
  224+                r->n_type = l->n_type;
  225+        }
  226+
<_226227         return p;
 227228 }
 228229 
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-21 19:02 +0100