Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.13
 
1.14
 
MAIN:ragge:20090621081031
 
code.c
_>3131 # include "pass1.h"
 3232 
 3333 static int nsse, ngpr, nrsp, rsaoff;
<> 34+static int thissse, thisgpr, thisrsp;
3435 enum { INTEGER = 1, INTMEM, SSE, SSEMEM, X87, STRREG, STRMEM };
 3536 static const int argregsi[] = { RDI, RSI, RDX, RCX, R08, R09 };
 3637 /*
     
 !
5455 int lastloc = -1;
 5556 
 5657 static int argtyp(TWORD t, union dimfun *df, struct suedef *sue);
<>57 -static NODE *movtomem(NODE *p, int off);
  58+static NODE *movtomem(NODE *p, int off, int reg);
5859 
 5960 /*
 6061  * Define everything needed to print out some data (or text).
     
 !
224225         for (i = ngpr; i < 6; i++) {
 225226                 r = block(REG, NIL, NIL, LONG, 0, MKSUE(LONG));
 226227                 regno(r) = argregsi[i];
<>227 -                r = movtomem(r, -RSALONGOFF(i)-autooff);
  228+                r = movtomem(r, -RSALONGOFF(i)-autooff, FPREG);
228229                 p = (p == NIL ? r : block(COMOP, p, r, INT, 0, MKSUE(INT)));
 229230         }
 230231         for (i = nsse; i < 8; i++) {
 231232                 r = block(REG, NIL, NIL, DOUBLE, 0, MKSUE(DOUBLE));
 232233                 regno(r) = i + XMM0;
<>233 -                r = movtomem(r, -RSADBLOFF(i)-autooff);
  234+                r = movtomem(r, -RSADBLOFF(i)-autooff, FPREG);
234235                 p = (p == NIL ? r : block(COMOP, p, r, INT, 0, MKSUE(INT)));
 235236         }
 236237         autooff += RSASZ;
 237238         rsaoff = autooff;
<> 239+        thissse = nsse;
  240+        thisgpr = ngpr;
  241+        thisrsp = nrsp;
238242 
 239243         ecomp(p);
 240244 }
     
 !
332336             mkstkref(-rsaoff, VOID));
 333337         r = buildtree(COMOP, r,
 334338             buildtree(ASSIGN, structref(ccopy(p), STREF, overflow_arg_area),
<>335 -            mkstkref(ARGINIT, VOID)));
  339+            mkstkref(thisrsp, VOID)));
336340         r = buildtree(COMOP, r,
 337341             buildtree(ASSIGN, structref(ccopy(p), STREF, gp_offset),
<>338 -            bcon(ngpr*(SZLONG/SZCHAR))));
  342+            bcon(thisgpr*(SZLONG/SZCHAR))));
339343         r = buildtree(COMOP, r,
 340344             buildtree(ASSIGN, structref(ccopy(p), STREF, fp_offset),
<>341 -            bcon(nsse*(SZDOUBLE*2/SZCHAR)+48)));
  345+            bcon(thissse*(SZDOUBLE*2/SZCHAR)+48)));
342346 
 343347         tfree(f);
 344348         tfree(a);
     
 !
380384         nfree(l1->n_left);
 381385         nfree(l1);
 382386 
<> 387+        /* qc has now a real type, for indexing */
  388+        addto = dt == DOUBLE ? 2 : 1;
383389         qc = buildtree(UMUL, buildtree(PLUS, qc, bcon(-addto)), NIL);
 384390 
 385391         l1 = block(NAME, NIL, NIL, dt, 0, MKSUE(BTYPE(dt)));
     
 !
446452 
 447453 
 448454 static NODE *
<>449 -movtomem(NODE *p, int off)
  455+movtomem(NODE *p, int off, int reg)
450456 {
 451457         struct symtab s;
 452458         NODE *r, *l;
     
 !
459465 
 460466         l = block(REG, NIL, NIL, PTR+STRTY, 0, 0);
 461467         l->n_lval = 0;
<>462 -        regno(l) = FPREG;
  468+        regno(l) = reg;
463469 
 464470         r = block(NAME, NIL, NIL, p->n_type, p->n_df, p->n_sue);
 465471         r->n_sp = &s;
     
 !
523529                 *q = *p;
 524530                 r = nrsp;
 525531                 nrsp += SZLONG;
<>526 -                q = movtomem(q, r);
  532+                q = movtomem(q, r, STKREG);
<_527533                 *p = *q;
 528534                 nfree(q);
 529535                 break;
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-02 12:28 +0200