Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.122
 
1.123
 
MAIN:ragge:20100811143627
 
local.c
_>9797         strlcpy(sp->soname, p, len);
 9898         strlcat(sp->soname, s, len);
 9999         strlcat(sp->soname, s2, len);
<>100 -        sp->ssue = NULL;
  100+        sp->sap = NULL;
101101         sp->sclass = EXTERN;
 102102         sp->sflags = sp->slevel = 0;
 103103         return sp;
     
 !
141141         struct symtab *sp;
 142142         char *name;
 143143 
<>144 -        q = tempnode(gotnr, PTR|VOID, 0, MKSUE(VOID));
  144+        q = tempnode(gotnr, PTR|VOID, 0, MKAP(VOID));
145145         if ((name = p->n_sp->soname) == NULL)
 146146                 name = p->n_sp->sname;
 147147         sp = picsymtab("", name, "@GOT");
 148148 #ifdef GCC_COMPAT
<>149 -        if (gcc_get_attr(p->n_sp->ssue, GCC_ATYP_STDCALL) != NULL)
  149+        if (attr_find(p->n_sp->sap, GCC_ATYP_STDCALL) != NULL)
150150                 p->n_sp->sflags |= SSTDCALL;
 151151 #endif
 152152         sp->sflags = p->n_sp->sflags & SSTDCALL;
 153153         r = xbcon(0, sp, INT);
 154154         q = buildtree(PLUS, q, r);
<>155 -        q = block(UMUL, q, 0, PTR|VOID, 0, MKSUE(VOID));
 156 -        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_sue);
  155+        q = block(UMUL, q, 0, PTR|VOID, 0, MKAP(VOID));
  156+        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_ap);
157157         q->n_sp = p->n_sp; /* for init */
 158158         nfree(p);
 159159         return q;
     
 !
176176                 sp = picsymtab("L", pspn, buf2);
 177177                 addstub(&nlplist, pspn);
 178178         }
<>179 -        q = tempnode(gotnr, PTR+VOID, 0, MKSUE(VOID));
  179+        q = tempnode(gotnr, PTR+VOID, 0, MKAP(VOID));
180180         r = xbcon(0, sp, INT);
 181181         q = buildtree(PLUS, q, r);
 182182 
 183183         if (p->n_sp->sclass != EXTDEF)
<>184 -                q = block(UMUL, q, 0, PTR+VOID, 0, MKSUE(VOID));
 185 -        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_sue);
  184+                q = block(UMUL, q, 0, PTR+VOID, 0, MKAP(VOID));
  185+        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_ap);
186186         q->n_sp = p->n_sp; /* for init */
 187187         nfree(p);
 188188         return q;
     
 !
207207         NODE *q, *r;
 208208         struct symtab *sp;
 209209 
<>210 -        q = tempnode(gotnr, PTR|VOID, 0, MKSUE(VOID));
  210+        q = tempnode(gotnr, PTR|VOID, 0, MKAP(VOID));
211211         if (p->n_sp->slevel > 0) {
 212212                 char buf[32];
 213213                 snprintf(buf, 32, LABFMT, (int)p->n_sp->soffset);
     
 !
223223         sp->stype = p->n_sp->stype;
 224224         r = xbcon(0, sp, INT);
 225225         q = buildtree(PLUS, q, r);
<>226 -        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_sue);
  226+        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_ap);
227227         q->n_sp = p->n_sp; /* for init */
 228228         nfree(p);
 229229         return q;
     
 !
249249         }
 250250         sp->sclass = STATIC;
 251251         sp->stype = p->n_sp->stype;
<>252 -        q = tempnode(gotnr, PTR+VOID, 0, MKSUE(VOID));
  252+        q = tempnode(gotnr, PTR+VOID, 0, MKAP(VOID));
253253         r = xbcon(0, sp, INT);
 254254         q = buildtree(PLUS, q, r);
<>255 -        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_sue);
  255+        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_ap);
256256         q->n_sp = p->n_sp;
 257257         nfree(p);
 258258         return q;
     
 !
283283          */
 284284 
 285285         /* calc address of var@TLSGD */
<>286 -        q = tempnode(gotnr, PTR|VOID, 0, MKSUE(VOID));
  286+        q = tempnode(gotnr, PTR|VOID, 0, MKAP(VOID));
287287         if ((name = p->n_sp->soname) == NULL)
 288288                 name = p->n_sp->sname;
 289289         sp = picsymtab("", name, "@TLSGD");
 290290         r = xbcon(0, sp, INT);
 291291         q = buildtree(PLUS, q, r);
 292292 
 293293         /* assign to %eax */
<>294 -        r = block(REG, NIL, NIL, PTR|VOID, 0, MKSUE(VOID));
  294+        r = block(REG, NIL, NIL, PTR|VOID, 0, MKAP(VOID));
295295         r->n_rval = EAX;
 296296         q = buildtree(ASSIGN, r, q);
 297297 
     
 !
300300         sp2->stype = EXTERN|INT|FTN;
 301301         r = nametree(sp2);
 302302         r = buildtree(ADDROF, r, NIL);
<>303 -        r = block(UCALL, r, NIL, INT, 0, MKSUE(INT));
  303+        r = block(UCALL, r, NIL, INT, 0, MKAP(INT));
304304 
 305305         /* fusion both parts together */
 306306         q = buildtree(COMOP, q, r);
<>307 -        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_sue);
  307+        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_ap);
308308         q->n_sp = p->n_sp; /* for init */
 309309 
 310310         nfree(p);
     
 !
325325             ext == EXTERN ? "@INDNTPOFF" : "@NTPOFF");
 326326         q = xbcon(0, sp, INT);
 327327         if (ext == EXTERN)
<>328 -                q = block(UMUL, q, NIL, PTR|VOID, 0, MKSUE(VOID));
  328+                q = block(UMUL, q, NIL, PTR|VOID, 0, MKAP(VOID));
329329 
 330330         sp2 = lookup("%gs:0", 0);
 331331         sp2->stype = EXTERN|INT;
 332332         r = nametree(sp2);
 333333 
 334334         q = buildtree(PLUS, q, r);
<>335 -        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_sue);
  335+        q = block(UMUL, q, 0, p->n_type, p->n_df, p->n_ap);
336336         q->n_sp = p->n_sp; /* for init */
 337337 
 338338         nfree(p);
     
 !
466466                         break;
 467467 #if defined(ELFABI)
 468468                 /* Change to CALL node with ebx as argument */
<>469 -                l = block(REG, NIL, NIL, INT, 0, MKSUE(INT));
  469+                l = block(REG, NIL, NIL, INT, 0, MKAP(INT));
470470                 l->n_rval = EBX;
 471471                 p->n_right = buildtree(ASSIGN, l,
<>472 -                    tempnode(gotnr, INT, 0, MKSUE(INT)));
  472+                    tempnode(gotnr, INT, 0, MKAP(INT)));
473473                 p->n_op -= (UCALL-CALL);
 474474 #endif
 475475         
     
 !
480480                 if (p->n_type == VOID)
 481481                         break;
 482482 
<>483 -                r = tempnode(0, p->n_type, p->n_df, p->n_sue);
  483+                r = tempnode(0, p->n_type, p->n_df, p->n_ap);
484484                 l = tcopy(r);
 485485                 p = buildtree(COMOP, buildtree(ASSIGN, r, p), l);
 486486 #endif
     
 !
525525                     l->n_type == ULONGLONG) {
 526526                         /* float etc? */
 527527                         p->n_left = block(SCONV, l, NIL,
<>528 -                            UNSIGNED, 0, MKSUE(UNSIGNED));
  528+                            UNSIGNED, 0, MKAP(UNSIGNED));
529529                         break;
 530530                 }
 531531                 /* if left is SCONV, cannot remove */
     
 !
544544         delp:   l->n_type = p->n_type;
 545545                 l->n_qual = p->n_qual;
 546546                 l->n_df = p->n_df;
<>547 -                l->n_sue = p->n_sue;
  547+                l->n_ap = p->n_ap;
548548                 nfree(p);
 549549                 p = l;
 550550                 break;
     
 !
560560                 }
 561561 
 562562                 if ((p->n_type & TMASK) == 0 && (l->n_type & TMASK) == 0 &&
<>563 -                    btdims[p->n_type].suesize == btdims[l->n_type].suesize) {
  563+                    btattr[p->n_type].atypsz == btattr[l->n_type].atypsz) {
564564                         if (p->n_type != FLOAT && p->n_type != DOUBLE &&
 565565                             l->n_type != FLOAT && l->n_type != DOUBLE &&
 566566                             l->n_type != LDOUBLE && p->n_type != LDOUBLE) {
     
 !
629629                                 cerror("unknown type %d", m);
 630630                         }
 631631                         l->n_type = m;
<>632 -                        l->n_sue = MKSUE(m);
  632+                        l->n_ap = MKAP(m);
633633                         nfree(p);
 634634                         return l;
 635635                 } else if (l->n_op == FCON) {
 636636                         l->n_lval = (CONSZ)l->n_dcon;
 637637                         l->n_sp = NULL;
 638638                         l->n_op = ICON;
 639639                         l->n_type = m;
<>640 -                        l->n_sue = MKSUE(m);
  640+                        l->n_ap = MKAP(m);
641641                         nfree(p);
 642642                         return clocal(l);
 643643                 }
     
 !
650650                     p->n_type == SHORT || p->n_type == USHORT) &&
 651651                     (l->n_type == FLOAT || l->n_type == DOUBLE ||
 652652                     l->n_type == LDOUBLE)) {
<>653 -                        p = block(SCONV, p, NIL, p->n_type, p->n_df, p->n_sue);
  653+                        p = block(SCONV, p, NIL, p->n_type, p->n_df, p->n_ap);
654654                         p->n_left->n_type = INT;
 655655                         return p;
 656656                 }
     
 !
663663                 if (o == MOD && p->n_type != CHAR && p->n_type != SHORT)
 664664                         break;
 665665                 /* make it an int division by inserting conversions */
<>666 -                p->n_left = block(SCONV, p->n_left, NIL, INT, 0, MKSUE(INT));
 667 -                p->n_right = block(SCONV, p->n_right, NIL, INT, 0, MKSUE(INT));
 668 -                p = block(SCONV, p, NIL, p->n_type, 0, MKSUE(p->n_type));
  666+                p->n_left = block(SCONV, p->n_left, NIL, INT, 0, MKAP(INT));
  667+                p->n_right = block(SCONV, p->n_right, NIL, INT, 0, MKAP(INT));
  668+                p = block(SCONV, p, NIL, p->n_type, 0, MKAP(p->n_type));
669669                 p->n_left->n_type = INT;
 670670                 break;
 671671 
     
 !
680680                 /* put return value in return reg */
 681681                 p->n_op = ASSIGN;
 682682                 p->n_right = p->n_left;
<>683 -                p->n_left = block(REG, NIL, NIL, p->n_type, 0, MKSUE(INT));
  683+                p->n_left = block(REG, NIL, NIL, p->n_type, 0, MKAP(INT));
684684                 p->n_left->n_rval = p->n_left->n_type == BOOL ?
 685685                     RETREG(CHAR) : RETREG(p->n_type);
 686686                 break;
     
 !
692692                 if (p->n_type == LONGLONG || p->n_type == ULONGLONG) {
 693693                         if (p->n_right->n_type != INT)
 694694                                 p->n_right = block(SCONV, p->n_right, NIL,
<>695 -                                    INT, 0, MKSUE(INT));
  695+                                    INT, 0, MKAP(INT));
696696                         break;
 697697                 }
 698698                 if (p->n_right->n_type == CHAR || p->n_right->n_type == UCHAR)
 699699                         break;
 700700                 p->n_right = block(SCONV, p->n_right, NIL,
<>701 -                    CHAR, 0, MKSUE(CHAR));
  701+                    CHAR, 0, MKAP(CHAR));
702702                 break;
 703703 #if defined(os_openbsd)
 704704                 /* If not using pcc struct return */
 705705         case STASG:
 706706                 r = p->n_right;
 707707                 if (r->n_op != STCALL && r->n_op != USTCALL)
 708708                         break;
<>709 -                m = tsize(BTYPE(r->n_type), r->n_df, r->n_sue);
  709+                m = tsize(BTYPE(r->n_type), r->n_df, r->n_ap);
710710                 if (m == SZCHAR)
 711711                         m = CHAR;
 712712                 else if (m == SZSHORT)
     
 !
726726 
 727727                 /* r = long, l = &struct */
 728728 
<>729 -                n = tempnode(0, m, r->n_df, r->n_sue);
  729+                n = tempnode(0, m, r->n_df, r->n_ap);
730730                 r = buildtree(ASSIGN, ccopy(n), r);
 731731 
<>732 -                s = tempnode(0, l->n_type, l->n_df, l->n_sue);
  732+                s = tempnode(0, l->n_type, l->n_df, l->n_ap);
733733                 l = buildtree(ASSIGN, ccopy(s), l);
 734734 
 735735                 p = buildtree(COMOP, r, l);
 736736 
 737737                 l = buildtree(CAST,
<>738 -                    block(NAME, NIL, NIL, m|PTR, 0, MKSUE(m)), ccopy(s));
  738+                    block(NAME, NIL, NIL, m|PTR, 0, MKAP(m)), ccopy(s));
739739                 r = l->n_right;
 740740                 nfree(l->n_left);
 741741                 nfree(l);
     
 !
764764 #if !defined(PECOFFABI)
 765765 
 766766         struct symtab *sp;
<>767 -        struct suedef *sue;
  767+        struct attr *ap;
768768         NODE *q;
 769769         char *c;
 770770         int isu;
     
 !
773773                 return;
 774774         isu = 0;
 775775         q = p->n_left;
<>776 -        sue = q->n_sue;
  776+        ap = q->n_ap;
777777         if (q->n_op == UMUL)
 778778                 q = q->n_left, isu = 1;
 779779 
     
 !
821821                         nfree(p->n_left->n_left);
 822822                 nfree(p->n_left);
 823823                 p->n_left = q;
<>824 -                q->n_sue = sue;
  824+                q->n_ap = ap;
825825         }
 826826 #endif
 827827 }
     
 !
843843 
 844844         sp = IALLOC(sizeof(struct symtab));
 845845         sp->sclass = STATIC;
<>846 -        sp->ssue = MKSUE(p->n_type);
  846+        sp->sap = MKAP(p->n_type);
847847         sp->slevel = 1; /* fake numeric label */
 848848         sp->soffset = getlab();
 849849         sp->sflags = 0;
 850850         sp->stype = p->n_type;
 851851         sp->squal = (CON >> TSHIFT);
 852852 
 853853         defloc(sp);
<>854 -        ninval(0, sp->ssue->suesize, p);
  854+        ninval(0, sp->sap->atypsz, p);
855855 
 856856         p->n_op = NAME;
 857857         p->n_lval = 0;
     
 !
896896  * indirections must be fullword.
 897897  */
 898898 NODE *
<>899 -offcon(OFFSZ off, TWORD t, union dimfun *d, struct suedef *sue)
  899+offcon(OFFSZ off, TWORD t, union dimfun *d, struct attr *ap)
900900 {
 901901         register NODE *p;
 902902 
 903903         if (xdebug)
 904904                 printf("offcon: OFFSZ %lld type %x dim %p siz %d\n",
<>905 -                    off, t, d, sue->suesize);
  905+                    off, t, d, 0);
906906 
 907907         p = bcon(0);
 908908         p->n_lval = off/SZCHAR/* Default */
     
 !
922922         p = buildtree(MUL, p, bcon(off/SZCHAR)); /* XXX word alignment? */
 923923 
 924924         /* sub the size from sp */
<>925 -        sp = block(REG, NIL, NIL, p->n_type, 0, MKSUE(INT));
  925+        sp = block(REG, NIL, NIL, p->n_type, 0, MKAP(INT));
926926         sp->n_lval = 0;
 927927         sp->n_rval = STKREG;
 928928         ecomp(buildtree(MINUSEQ, sp, p));
 929929 
 930930 #ifdef MACHOABI 
 931931         /* align to 16 bytes */
<>932 -        sp = block(REG, NIL, NIL, p->n_type, 0, MKSUE(INT));
  932+        sp = block(REG, NIL, NIL, p->n_type, 0, MKAP(INT));
933933         sp->n_lval = 0;
 934934         sp->n_rval = STKREG;
 935935         ecomp(buildtree(PLUSEQ, sp, bcon(15)));
 936936         
<>937 -        sp = block(REG, NIL, NIL, p->n_type, 0, MKSUE(INT));
  937+        sp = block(REG, NIL, NIL, p->n_type, 0, MKAP(INT));
938938         sp->n_lval = 0;
 939939         sp->n_rval = STKREG;
 940940         ecomp(buildtree(RSEQ, sp, bcon(4)));
 941941         
<>942 -        sp = block(REG, NIL, NIL, p->n_type, 0, MKSUE(INT));
  942+        sp = block(REG, NIL, NIL, p->n_type, 0, MKAP(INT));
943943         sp->n_lval = 0;
 944944         sp->n_rval = STKREG;
 945945         ecomp(buildtree(LSEQ, sp, bcon(4)));
 946946 #endif
 947947         
 948948 
 949949         /* save the address of sp */
<>950 -        sp = block(REG, NIL, NIL, PTR+INT, t->n_df, t->n_sue);
  950+        sp = block(REG, NIL, NIL, PTR+INT, t->n_df, t->n_ap);
951951         sp->n_lval = 0;
 952952         sp->n_rval = STKREG;
 953953         t->n_type = sp->n_type;
     
 !
12541254 
 12551255         if ((name = sp->soname) == NULL)
 12561256                 name = exname(sp->sname);
<>1257 -        al = talign(sp->stype, sp->ssue)/SZCHAR;
 1258 -        off = (int)tsize(sp->stype, sp->sdf, sp->ssue);
  1257+        al = talign(sp->stype, sp->sap)/SZCHAR;
  1258+        off = (int)tsize(sp->stype, sp->sdf, sp->sap);
12591259         off = (off+(SZCHAR-1))/SZCHAR;
 12601260 #ifdef GCC_COMPAT
 12611261         {
<>1262 -                struct gcc_attrib *ga;
 1263 -                if ((ga = gcc_get_attr(sp->ssue, GCC_ATYP_VISIBILITY)) &&
 1264 -                    strcmp(ga->a1.sarg, "default"))
 1265 -                        printf("\t.%s %s\n", ga->a1.sarg, name);
  1262+                struct attr *ap;
  1263+                if ((ap = attr_find(sp->sap, GCC_ATYP_VISIBILITY)) &&
  1264+                    strcmp(ap->sarg(0), "default"))
  1265+                        printf("\t.%s %s\n", ap->sarg(0), name);
12661266         }
 12671267 #endif
 12681268         printf("        .%scomm ", sp->sclass == STATIC ? "l" : "");
     
 !
13741374 void
 13751375 fixdef(struct symtab *sp)
 13761376 {
<>1377 -        struct gcc_attrib *ga;
  1377+        struct attr *ap;
13781378 #ifdef TLS
 13791379         /* may have sanity checks here */
 13801380         if (gottls)
 13811381                 sp->sflags |= STLS;
 13821382         gottls = 0;
 13831383 #endif
<>1384 -        if ((ga = gcc_get_attr(sp->ssue, GCC_ATYP_ALIAS)) != NULL) {
 1385 -                char *an = ga->a1.sarg
  1384+        if ((ap = attr_find(sp->sap, GCC_ATYP_ALIAS)) != NULL) {
  1385+                char *an = ap->sarg(0)
13861386                 char *sn = sp->soname ? sp->soname : sp->sname;
 13871387                 char *v;
 13881388 
<>1389 -                v = gcc_get_attr(sp->ssue, GCC_ATYP_WEAK) ? "weak" : "globl";
  1389+                v = attr_find(sp->sap, GCC_ATYP_WEAK) ? "weak" : "globl";
13901390                 printf("\t.%s %s\n", v, sn);
 13911391                 printf("\t.set %s,%s\n", sn, an);
 13921392         }       
     
 !
14541454         tfree(f);
 14551455         tfree(a);
 14561456 
<>1457 -        f = block(REG, NIL, NIL, PTR+VOID, 0, MKSUE(VOID));
  1457+        f = block(REG, NIL, NIL, PTR+VOID, 0, MKAP(VOID));
14581458         regno(f) = FPREG;
 14591459 
 14601460         while (nframes--)
<>1461 -                f = block(UMUL, f, NIL, PTR+VOID, 0, MKSUE(VOID));
  1461+                f = block(UMUL, f, NIL, PTR+VOID, 0, MKAP(VOID));
14621462 
<>1463 -        f = block(PLUS, f, bcon(4), INCREF(PTR+VOID), 0, MKSUE(VOID));
  1463+        f = block(PLUS, f, bcon(4), INCREF(PTR+VOID), 0, MKAP(VOID));
14641464         f = buildtree(UMUL, f, NIL);
 14651465 
 14661466         return f;
     
 !
14821482         tfree(f);
 14831483         tfree(a);
 14841484 
<>1485 -        f = block(REG, NIL, NIL, PTR+VOID, 0, MKSUE(VOID));
  1485+        f = block(REG, NIL, NIL, PTR+VOID, 0, MKAP(VOID));
14861486         regno(f) = FPREG;
 14871487 
 14881488         while (nframes--)
<>1489 -                f = block(UMUL, f, NIL, PTR+VOID, 0, MKSUE(VOID));
  1489+                f = block(UMUL, f, NIL, PTR+VOID, 0, MKAP(VOID));
14901490 
 14911491         return f;
 14921492 bad:
     
 !
15181518         p->n_flags = 0;
 15191519 
 15201520         l = p->n_left;
<> 1521+        while (cdope(l->n_op) & CALLFLG)
  1522+                l = l->n_left;
15211523         if (l->n_op == TEMP)
 15221524                 return;
 15231525         if (l->n_op == ADDROF)
 15241526                 l = l->n_left;
 15251527         if (l->n_sp == NULL)
 15261528                 return;
 15271529 #ifdef GCC_COMPAT
<>1528 -        if (gcc_get_attr(l->n_sp->ssue, GCC_ATYP_STDCALL) != NULL)
  1530+        if (attr_find(l->n_sp->sap, GCC_ATYP_STDCALL) != NULL)
15291531                 l->n_sp->sflags |= SSTDCALL;
 15301532 #endif
 15311533 #ifdef os_win32
     
 !
15471549                                 }
 15481550                                 t = r->n_type;
 15491551                                 if (t == STRTY || t == UNIONTY)
<>1550 -                                        size += r->n_sue->suesize;
  1552+                                        size += r->n_sue->suesize; /* XXX */
<_15511553                                 else
 15521554                                         size += szty(t) * SZINT / SZCHAR;
 15531555                         }
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-08-30 06:13 +0200