Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.17
 
1.18
 
MAIN:ragge:20100811145113
 
local.c
_>9696 
 9797         c = p->n_sp->soname ? p->n_sp->soname : p->n_sp->sname;
 9898         sp = picsymtab("", c, "@GOTPCREL(%rip)");
<>99 -        q = block(NAME, NIL, NIL, INCREF(p->n_type), p->n_df, p->n_sue);
  99+        q = block(NAME, NIL, NIL, INCREF(p->n_type), p->n_df, p->n_ap);
100100         q->n_sp = sp;
<>101 -        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_sue);
  101+        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_ap);
102102         q->n_sp = sp;
 103103         nfree(p);
 104104         return q;
     
 !
141141          */
 142142 
 143143         /* calc address of var@TLSGD */
<>144 -        q = tempnode(gotnr, PTR|VOID, 0, MKSUE(VOID));
  144+        q = tempnode(gotnr, PTR|VOID, 0, MKAP(VOID));
145145         sp = picsymtab("", p->n_sp->soname, "@TLSGD");
 146146         r = xbcon(0, sp, INT);
 147147         q = buildtree(PLUS, q, r);
 148148 
 149149         /* assign to %eax */
<>150 -        r = block(REG, NIL, NIL, PTR|VOID, 0, MKSUE(VOID));
  150+        r = block(REG, NIL, NIL, PTR|VOID, 0, MKAP(VOID));
151151         r->n_rval = EAX;
 152152         q = buildtree(ASSIGN, r, q);
 153153 
     
 !
156156         sp2->stype = EXTERN|INT|FTN;
 157157         r = nametree(sp2);
 158158         r = buildtree(ADDROF, r, NIL);
<>159 -        r = block(UCALL, r, NIL, INT, 0, MKSUE(INT));
  159+        r = block(UCALL, r, NIL, INT, 0, MKAP(INT));
160160 
 161161         /* fusion both parts together */
 162162         q = buildtree(COMOP, q, r);
<>163 -        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_sue);
  163+        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_ap);
164164         q->n_sp = p->n_sp; /* for init */
 165165 
 166166         nfree(p);
     
 !
178178             ext == EXTERN ? "@INDNTPOFF" : "@NTPOFF");
 179179         q = xbcon(0, sp, INT);
 180180         if (ext == EXTERN)
<>181 -                q = block(UMUL, q, NIL, PTR|VOID, 0, MKSUE(VOID));
  181+                q = block(UMUL, q, NIL, PTR|VOID, 0, MKAP(VOID));
182182 
 183183         sp2 = lookup("%gs:0", 0);
 184184         sp2->stype = EXTERN|INT;
 185185         r = nametree(sp2);
 186186 
 187187         q = buildtree(PLUS, q, r);
<>188 -        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_sue);
  188+        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_ap);
189189         q->n_sp = p->n_sp; /* for init */
 190190 
 191191         nfree(p);
     
 !
310310                 if (p->n_type == VOID)
 311311                         break; /* nothing to do */
 312312                 /* have the call at left of a COMOP to avoid arg trashing */
<>313 -                r = tempnode(0, p->n_type, p->n_df, p->n_sue);
  313+                r = tempnode(0, p->n_type, p->n_df, p->n_ap);
314314                 m = regno(r);
 315315                 r = buildtree(ASSIGN, r, p);
<>316 -                p = tempnode(m, r->n_type, r->n_df, r->n_sue);
  316+                p = tempnode(m, r->n_type, r->n_df, r->n_ap);
317317                 p = buildtree(COMOP, r, p);
 318318                 break;
 319319 
 320320         case UCALL:
 321321         case USTCALL:
 322322                 /* For now, always clear eax */
<>323 -                l = block(REG, NIL, NIL, INT, 0, MKSUE(INT));
  323+                l = block(REG, NIL, NIL, INT, 0, MKAP(INT));
324324                 regno(l) = RAX;
 325325                 p->n_right = clocal(buildtree(ASSIGN, l, bcon(0)));
 326326                 p->n_op -= (UCALL-CALL);
     
 !
362362                 if (l->n_type < LONG) {
 363363                         /* float etc? */
 364364                         p->n_left = block(SCONV, l, NIL,
<>365 -                            UNSIGNED, 0, MKSUE(UNSIGNED));
  365+                            UNSIGNED, 0, MKAP(UNSIGNED));
366366                         break;
 367367                 }
 368368                 /* if left is SCONV, cannot remove */
     
 !
381381         delp:   l->n_type = p->n_type;
 382382                 l->n_qual = p->n_qual;
 383383                 l->n_df = p->n_df;
<>384 -                l->n_sue = p->n_sue;
  384+                l->n_ap = p->n_ap;
385385                 nfree(p);
 386386                 p = l;
 387387                 break;
     
 !
403403                         if (l->n_type < INT) {
 404404                                 p->n_left = block(SCONV, l, NIL,
 405405                                     ISUNSIGNED(l->n_type) ? UNSIGNED : INT,
<>406 -                                    l->n_df, l->n_sue);
  406+                                    l->n_df, l->n_ap);
407407                                 break;
 408408                         }
 409409                 }
     
 !
414414                 }
 415415 
 416416                 if ((p->n_type & TMASK) == 0 && (l->n_type & TMASK) == 0 &&
<>417 -                    btdims[p->n_type].suesize == btdims[l->n_type].suesize) {
  417+                    btattr[p->n_type].atypsz == btattr[l->n_type].atypsz) {
418418                         if (p->n_type != FLOAT && p->n_type != DOUBLE &&
 419419                             l->n_type != FLOAT && l->n_type != DOUBLE &&
 420420                             l->n_type != LDOUBLE && p->n_type != LDOUBLE) {
     
 !
483483                                 cerror("unknown type %d", m);
 484484                         }
 485485                         l->n_type = m;
<>486 -                        l->n_sue = MKSUE(m);
  486+                        l->n_ap = MKAP(m);
487487                         nfree(p);
 488488                         return l;
 489489                 } else if (l->n_op == FCON) {
 490490                         l->n_lval = l->n_dcon;
 491491                         l->n_sp = NULL;
 492492                         l->n_op = ICON;
 493493                         l->n_type = m;
<>494 -                        l->n_sue = MKSUE(m);
  494+                        l->n_ap = MKAP(m);
495495                         nfree(p);
 496496                         return clocal(l);
 497497                 }
     
 !
504504                     p->n_type == SHORT || p->n_type == USHORT) &&
 505505                     (l->n_type == FLOAT || l->n_type == DOUBLE ||
 506506                     l->n_type == LDOUBLE)) {
<>507 -                        p = block(SCONV, p, NIL, p->n_type, p->n_df, p->n_sue);
  507+                        p = block(SCONV, p, NIL, p->n_type, p->n_df, p->n_ap);
508508                         p->n_left->n_type = INT;
 509509                         return p;
 510510                 }
     
 !
517517                 if (o == MOD && p->n_type != CHAR && p->n_type != SHORT)
 518518                         break;
 519519                 /* make it an int division by inserting conversions */
<>520 -                p->n_left = block(SCONV, p->n_left, NIL, INT, 0, MKSUE(INT));
 521 -                p->n_right = block(SCONV, p->n_right, NIL, INT, 0, MKSUE(INT));
 522 -                p = block(SCONV, p, NIL, p->n_type, 0, MKSUE(p->n_type));
  520+                p->n_left = block(SCONV, p->n_left, NIL, INT, 0, MKAP(INT));
  521+                p->n_right = block(SCONV, p->n_right, NIL, INT, 0, MKAP(INT));
  522+                p = block(SCONV, p, NIL, p->n_type, 0, MKAP(p->n_type));
523523                 p->n_left->n_type = INT;
 524524                 break;
 525525 
     
 !
534534                 /* put return value in return reg */
 535535                 p->n_op = ASSIGN;
 536536                 p->n_right = p->n_left;
<>537 -                p->n_left = block(REG, NIL, NIL, p->n_type, 0, MKSUE(INT));
  537+                p->n_left = block(REG, NIL, NIL, p->n_type, 0, MKAP(INT));
538538                 p->n_left->n_rval = p->n_left->n_type == BOOL ?
 539539                     RETREG(CHAR) : RETREG(p->n_type);
 540540                 break;
     
 !
545545                 if (p->n_right->n_type == CHAR || p->n_right->n_type == UCHAR)
 546546                         break;
 547547                 p->n_right = block(SCONV, p->n_right, NIL,
<>548 -                    CHAR, 0, MKSUE(CHAR));
  548+                    CHAR, 0, MKAP(CHAR));
549549                 break;
 550550 
 551551         case STASG: /* Early conversion to memcpy */
 552552                 l = buildtree(ADDROF, p->n_left, NIL);
 553553                 r = p->n_right;
<>554 -                o = tsize(p->n_type, p->n_df, p->n_sue)/SZCHAR;
 555 -#define  cmop(x,y) block(CM, x, y, INT, 0, MKSUE(INT))
  554+                o = tsize(p->n_type, p->n_df, p->n_ap)/SZCHAR;
  555+#define  cmop(x,y) block(CM, x, y, INT, 0, MKAP(INT))
556556                 r = cmop(cmop(l, r), bcon(o));
 557557 
 558558                 q = lookup(addname("memcpy"), 0);
     
 !
637637 
 638638         sp = IALLOC(sizeof(struct symtab));
 639639         sp->sclass = STATIC;
<>640 -        sp->ssue = MKSUE(p->n_type);
  640+        sp->sap = MKAP(p->n_type);
641641         sp->slevel = 1; /* fake numeric label */
 642642         sp->soffset = getlab();
 643643         sp->sflags = 0;
 644644         sp->stype = p->n_type;
 645645         sp->squal = (CON >> TSHIFT);
 646646 
 647647         defloc(sp);
<>648 -        ninval(0, sp->ssue->suesize, p);
  648+        ninval(0, tsize(sp->stype, sp->sdf, sp->sap), p);
649649 
 650650         p->n_op = NAME;
 651651         p->n_lval = 0;
     
 !
690690  * indirections must be fullword.
 691691  */
 692692 NODE *
<>693 -offcon(OFFSZ off, TWORD t, union dimfun *d, struct suedef *sue)
  693+offcon(OFFSZ off, TWORD t, union dimfun *d, struct attr *ap)
694694 {
 695695         register NODE *p;
 696696 
 697697         if (xdebug)
 698698                 printf("offcon: OFFSZ %lld type %x dim %p siz %d\n",
<>699 -                    off, t, d, sue->suesize);
  699+                    off, t, d, (int)tsize(t, d, ap));
700700 
 701701         p = bcon(0);
 702702         p->n_lval = off/SZCHAR/* Default */
     
 !
717717         p = buildtree(MUL, p, bcon(off/SZCHAR)); /* XXX word alignment? */
 718718 
 719719         /* sub the size from sp */
<>720 -        sp = block(REG, NIL, NIL, p->n_type, 0, MKSUE(INT));
  720+        sp = block(REG, NIL, NIL, p->n_type, 0, MKAP(INT));
721721         sp->n_lval = 0;
 722722         sp->n_rval = STKREG;
 723723         ecomp(buildtree(MINUSEQ, sp, p));
 724724 
 725725         /* save the address of sp */
<>726 -        sp = block(REG, NIL, NIL, PTR+INT, t->n_df, t->n_sue);
  726+        sp = block(REG, NIL, NIL, PTR+INT, t->n_df, t->n_ap);
727727         sp->n_lval = 0;
 728728         sp->n_rval = STKREG;
 729729         t->n_type = sp->n_type;
     
 !
966966 
 967967         if ((name = sp->soname) == NULL)
 968968                 name = exname(sp->sname);
<>969 -        off = tsize(sp->stype, sp->sdf, sp->ssue);
  969+        off = tsize(sp->stype, sp->sdf, sp->sap);
970970         off = (off+(SZCHAR-1))/SZCHAR;
 971971 #ifdef GCC_COMPAT
 972972         {
<>973 -                struct gcc_attrib *ga;
 974 -                if ((ga = gcc_get_attr(sp->ssue, GCC_ATYP_VISIBILITY)) &&
 975 -                    strcmp(ga->a1.sarg, "default"))
 976 -                        printf("\t.%s %s\n", ga->a1.sarg, name);
  973+                struct attr *ga;
  974+                if ((ga = attr_find(sp->sap, GCC_ATYP_VISIBILITY)) &&
  975+                    strcmp(ga->sarg(0), "default"))
  976+                        printf("\t.%s %s\n", ga->sarg(0), name);
977977         }
 978978 #endif
 979979         printf("        .%scomm ", sp->sclass == STATIC ? "l" : "");
     
 !
10471047 void
 10481048 fixdef(struct symtab *sp)
 10491049 {
<>1050 -        struct gcc_attrib *ga;
  1050+        struct attr *ga;
10511051 #ifdef TLS
 10521052         /* may have sanity checks here */
 10531053         if (gottls)
     
 !
10561056 #endif
 10571057 #ifdef HAVE_WEAKREF
 10581058         /* not many as'es have this directive */
<>1059 -        if ((ga = gcc_get_attr(sp->ssue, GCC_ATYP_WEAKREF)) != NULL) {
  1059+        if ((ga = gcc_get_attr(sp->sap, GCC_ATYP_WEAKREF)) != NULL) {
10601060                 char *wr = ga->a1.sarg;
 10611061                 char *sn = sp->soname ? sp->soname : sp->sname;
 10621062                 if (wr == NULL) {
<>1063 -                        if ((ga = gcc_get_attr(sp->ssue, GCC_ATYP_ALIAS))) {
  1063+                        if ((ga = gcc_get_attr(sp->sap, GCC_ATYP_ALIAS))) {
10641064                                 wr = ga->a1.sarg;
 10651065                         }
 10661066                 }
     
 !
10701070                         printf("\t.weakref %s,%s\n", sn, wr);
 10711071         } else
 10721072 #endif
<>1073 -               if ((ga = gcc_get_attr(sp->ssue, GCC_ATYP_ALIAS)) != NULL) {
 1074 -                char *an = ga->a1.sarg;
  1073+               if ((ga = attr_find(sp->sap, GCC_ATYP_ALIAS)) != NULL) {
  1074+                char *an = ga->sarg(0);
10751075                 char *sn = sp->soname ? sp->soname : sp->sname;
 10761076                 char *v;
 10771077 
<>1078 -                v = gcc_get_attr(sp->ssue, GCC_ATYP_WEAK) ? "weak" : "globl";
  1078+                v = attr_find(sp->sap, GCC_ATYP_WEAK) ? "weak" : "globl";
10791079                 printf("\t.%s %s\n", v, sn);
 10801080                 printf("\t.set %s,%s\n", sn, an);
 10811081         }
     
 !
10911091                 p->n_op = NAME;
 10921092                 p->n_sp =
 10931093                   (struct symtab *)(constructor ? "constructor" : "destructor");
<>1094 -                sp->ssue = sueget(sp->ssue);
 1095 -                sp->ssue->suega = gcc_attr_parse(p);
  1094+                sp->sap = attr_add(sp->sap, gcc_attr_parse(p));
10961095                 constructor = destructor = 0;
 10971096         }
 10981097 }
     
 !
11101109         tfree(f);
 11111110         tfree(a);
 11121111 
<>1113 -        f = block(REG, NIL, NIL, PTR+VOID, 0, MKSUE(VOID));
  1112+        f = block(REG, NIL, NIL, PTR+VOID, 0, MKAP(VOID));
11141113         regno(f) = FPREG;
 11151114 
 11161115         while (nframes--)
<>1117 -                f = block(UMUL, f, NIL, PTR+VOID, 0, MKSUE(VOID));
  1116+                f = block(UMUL, f, NIL, PTR+VOID, 0, MKAP(VOID));
11181117 
<>1119 -        f = block(PLUS, f, bcon(4), INCREF(PTR+VOID), 0, MKSUE(VOID));
  1118+        f = block(PLUS, f, bcon(4), INCREF(PTR+VOID), 0, MKAP(VOID));
11201119         f = buildtree(UMUL, f, NIL);
 11211120 
 11221121         return f;
     
 !
11381137         tfree(f);
 11391138         tfree(a);
 11401139 
<>1141 -        f = block(REG, NIL, NIL, PTR+VOID, 0, MKSUE(VOID));
  1140+        f = block(REG, NIL, NIL, PTR+VOID, 0, MKAP(VOID));
11421141         regno(f) = FPREG;
 11431142 
 11441143         while (nframes--)
<>1145 -                f = block(UMUL, f, NIL, PTR+VOID, 0, MKSUE(VOID));
  1144+                f = block(UMUL, f, NIL, PTR+VOID, 0, MKAP(VOID));
<_11461145 
 11471146         return f;
 11481147 bad:
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-22 07:20 +0100