Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.116
 
1.117
 
MAIN:ragge:20100501124156
 
local.c
_>144144         if ((name = p->n_sp->soname) == NULL)
 145145                 name = p->n_sp->sname;
 146146         sp = picsymtab("", name, "@GOT");
<> 147+#ifdef GCC_COMPAT
  148+        if (gcc_get_attr(p->n_sp->ssue, GCC_ATYP_STDCALL) != NULL)
  149+                p->n_sp->sflags |= SSTDCALL;
  150+#endif
  151+        sp->sflags = p->n_sp->sflags & (FSTDCALL|FFPPOP);
147152         r = xbcon(0, sp, INT);
 148153         q = buildtree(PLUS, q, r);
 149154         q = block(UMUL, q, 0, PTR|VOID, 0, MKSUE(VOID));
     
 !
820825 #endif
 821826 }
 822827 
<> 828+static void mangle(NODE *p);
  829+
823830 void
 824831 myp2tree(NODE *p)
 825832 {
 826833         struct symtab *sp;
 827834 
 828835         if (kflag)
<>829 -                walkf(p, fixnames, 0); /* XXX walkf not needed */
  836+                fixnames(p, 0);
  837+
  838+        mangle(p);
  839+
830840         if (p->n_op != FCON)
 831841                 return;
 832842 
<>833 -#if 0
 834 -        /* put floating constants in memory */
 835 -        setloc1(RDATA);
 836 -        defalign(ALLDOUBLE);
 837 -        deflab1(i = getlab());
 838 -        ninval(0, btdims[p->n_type].suesize, p);
 839 -#endif
 840 -
841843         sp = IALLOC(sizeof(struct symtab));
 842844         sp->sclass = STATIC;
 843845         sp->ssue = MKSUE(p->n_type);
     
 !
14841486  *  Postfix external functions with the arguments size.
 14851487  */
 14861488 static void
<>1487 -mangle(NODE *p, void *arg)
  1489+mangle(NODE *p)
14881490 {
 14891491         NODE *l;
 14901492 
<> 1493+        if (p->n_op == NAME || p->n_op == ICON) {
  1494+                p->n_flags = 0; /* for later setting of STDCALL */
  1495+                if (p->n_sp) {
  1496+                         if (p->n_sp->sflags & SSTDCALL)
  1497+                                p->n_flags = FSTDCALL;
  1498+                }
  1499+        }
  1500+
14911501         if (p->n_op != CALL && p->n_op != STCALL &&
 14921502             p->n_op != UCALL && p->n_op != USTCALL)
 14931503                 return;
 14941504 
<> 1505+        p->n_flags = 0; /* Fixed for ST(U)CALL in p2tree */
  1506+        if (ISFTY(p->n_type))
  1507+                p->n_flags |= FFPPOP;
  1508+
14951509         l = p->n_left;
 14961510         if (l->n_op == TEMP)
 14971511                 return;
     
 !
15031517         if (gcc_get_attr(l->n_sp->ssue, GCC_ATYP_STDCALL) != NULL)
 15041518                 l->n_sp->sflags |= SSTDCALL;
 15051519 #endif
<>1506 -        if (l->n_sp->sflags & SSTDCALL) {
15071520 #ifdef os_win32
<> 1521+        if (l->n_sp->sflags & SSTDCALL) {
15081522                 if (strchr(l->n_name, '@') == NULL) {
 15091523                         int size = 0;
 15101524                         char buf[256];
     
 !
15301544                         l->n_name = IALLOC(strlen(buf) + 1);
 15311545                         strcpy(l->n_name, buf);
 15321546                 }
<>1533 -#endif
 1534 -                l->n_flags |= FSTDCALL;
15351547         }
<> 1548+#endif
15361549 }
 15371550 
 15381551 void
     
 !
15421555                 struct interpass_prolog *ipp = (struct interpass_prolog *)ip;
 15431556                 ipp->ipp_argstacksize = argstacksize;
 15441557         }
<>1545 -
 1546 -        if (ip->type == IP_NODE) {
 1547 -                walkf(ip->ip_node, mangle, 0);
 1548 -                /* pop float stack if return value ignored */
 1549 -                if (ip->ip_node->n_op == CALL || ip->ip_node->n_op == UCALL) {
 1550 -                        if (ip->ip_node->n_type == FLOAT ||
 1551 -                            ip->ip_node->n_type == DOUBLE ||
 1552 -                            ip->ip_node->n_type == LDOUBLE)
 1553 -                                ip->ip_node->n_flags |= FFPPOP;
 1554 -                }
 1555 -        }
 1556 -        
<_15571558 }
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-10-31 21:03 +0100