Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.3
 
1.4
 
MAIN:gmcgarry:20090521093459
 
code.c
_>111111  * indices in symtab for the arguments; n is the number
 112112  */
 113113 void
<>114 -bfcode(struct symtab **a, int cnt)
  114+bfcode(struct symtab **sp, int cnt)
115115 {
<>116 -        struct symtab *sp2;
117116         extern int gotnr;
<>118 -        NODE *n, *p;
 119 -        int i;
  117+        NODE *n, *p, *q;
  118+        int i, k;
120119 
 121120         if (cftnsp->stype == STRTY+FTN || cftnsp->stype == UNIONTY+FTN) {
 122121                 /* Function returns struct, adjust arg offset */
     
 !
134133         }
 135134 
 136135         /* recalculate the arg offset and create TEMP moves */
<>137 -        for (n = 0, i = 0; i < cnt; i++) {
 138 -                sp = a[i];
  136+        for (k = 0, i = 0; i < cnt; i++) {
139137 
<>140 -                if (n < 6) {
 141 -                        p = tempnode(0, sp->stype, sp->sdf, sp->ssue);
 142 -                        q = block(REG, NIL, NIL, sp->stype, sp->sdf, sp->ssue);
 143 -                        q->n_rval = argreg(sp->stype, &n);
  138+                if (sp[i] == NULL)
  139+                        continue;
  140+
  141+                if (k < 6) {
  142+                        p = tempnode(0, sp[i]->stype, sp[i]->sdf, sp[i]->ssue);
  143+                        q = block(REG, NIL, NIL, sp[i]->stype, sp[i]->sdf, sp[i]->ssue);
  144+                        q->n_rval = argreg(sp[i]->stype, &k);
144145                         p = buildtree(ASSIGN, p, q);
<>145 -                        sp->soffset = regno(p->n_left);
 146 -                        sp->sflags |= STNODE;
  146+                        sp[i]->soffset = regno(p->n_left);
  147+                        sp[i]->sflags |= STNODE;
147148                         ecomp(p);
 148149                 } else {
<>149 -                        sp->soffset += SZLONG * n;
  150+                        sp[i]->soffset += SZLONG * k;
150151                         if (xtemps) {
 151152                                 /* put stack args in temps if optimizing */
<>152 -                                p = tempnode(0, sp->stype, sp->sdf, sp->ssue);
  153+                                p = tempnode(0, sp[i]->stype, sp[i]->sdf, sp[i]->ssue);
153154                                 p = buildtree(ASSIGN, p, buildtree(NAME, 0, 0));
<>154 -                                sp->soffset = regno(p->n_left);
 155 -                                sp->sflags |= STNODE;
  155+                                sp[i]->soffset = regno(p->n_left);
  156+                                sp[i]->sflags |= STNODE;
156157                                 ecomp(p);
 157158                         }
 158159                 }
     
 !
174175 void
 175176 ejobcode(int flag )
 176177 {
<>177 -        if (errors)
 178 -                return;
 179 -
180178 #define _MKSTR(x) #x
 181179 #define MKSTR(x) _MKSTR(x)
 182180 #define OS MKSTR(TARGOS)
     
 !
197195         case FLOAT:
 198196         case DOUBLE:
 199197         case LDOUBLE:
<>200 -                return FR6 - *n - 2;
  198+                /* return FR6 - *n - 2; */
  199+                cerror("argreg");
  200+                return 0;
201201         case LONGLONG:
 202202         case ULONGLONG:
 203203                 /* TODO */;
     
 !
210210 funarg(NODE *p, int *n)
 211211 {
 212212         NODE *r;
<>213 -        int sz;
<_214213 
 215214         if (p->n_op == CM) {
 216215                 p->n_left = funarg(p->n_left, n);
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 04:21 +0100