Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.205
 
1.206
 
MAIN:gmcgarry:20080620055426
 
pftn.c
_>25762576         return( ccnames[c] );
 25772577         }
 25782578 #endif
<_ 2579+
  2580+void
  2581+sspinit()
  2582+{
  2583+        NODE *p;
  2584+
  2585+        p = block(NAME, NIL, NIL, FTN+VOID, 0, MKSUE(VOID));
  2586+        p->n_sp = lookup("__stack_chk_fail", SNORMAL);
  2587+        defid(p, EXTERN);
  2588+        nfree(p);
  2589+
  2590+        p = block(NAME, NIL, NIL, INT, 0, MKSUE(INT));
  2591+        p->n_sp = lookup("__stack_chk_guard", SNORMAL);
  2592+        defid(p, EXTERN);
  2593+        nfree(p);
  2594+}
  2595+
  2596+void
  2597+sspstart()
  2598+{
  2599+        NODE *p, *q;
  2600+
  2601+        q = block(NAME, NIL, NIL, INT, 0, MKSUE(INT));
  2602+        q->n_sp = lookup("__stack_chk_guard", SNORMAL);
  2603+        q = clocal(q);
  2604+
  2605+        p = block(REG, NIL, NIL, INT, 0, 0);
  2606+        p->n_lval = 0;
  2607+        p->n_rval = FPREG;
  2608+        q = block(ER, p, q, INT, 0, MKSUE(INT));
  2609+        q = clocal(q);
  2610+
  2611+        p = block(NAME, NIL, NIL, INT, 0, MKSUE(INT));
  2612+        p->n_sp = lookup("__stack_chk_canary", SNORMAL);
  2613+        defid(p, AUTO);
  2614+        p = clocal(p);
  2615+
  2616+        ecomp(buildtree(ASSIGN, p, q));
  2617+}
  2618+
  2619+void
  2620+sspend()
  2621+{
  2622+        NODE *p, *q;
  2623+        int tmpnr = 0;
  2624+        int lab;
  2625+
  2626+        if (retlab != NOLAB) {
  2627+                plabel(retlab);
  2628+                retlab = getlab();
  2629+        }
  2630+
  2631+        if (DECREF(cftnsp->stype) != VOID) {
  2632+                p = tempnode(0, DECREF(cftnsp->stype), cftnsp->sdf, cftnsp->ssue);
  2633+                tmpnr = regno(p);
  2634+                q = block(REG, NIL, NIL, DECREF(cftnsp->stype),
  2635+                        cftnsp->sdf, cftnsp->ssue);
  2636+                q->n_rval = RETREG(DECREF(cftnsp->stype));
  2637+                ecomp(buildtree(ASSIGN, p, q));
  2638+        }
  2639+
  2640+        p = block(NAME, NIL, NIL, INT, 0, MKSUE(INT));
  2641+        p->n_sp = lookup("__stack_chk_canary", SNORMAL);
  2642+        p = clocal(p);
  2643+
  2644+        q = block(REG, NIL, NIL, INT, 0, 0);
  2645+        q->n_lval = 0;
  2646+        q->n_rval = FPREG;
  2647+        q = block(ER, p, q, INT, 0, MKSUE(INT));
  2648+
  2649+        p = block(NAME, NIL, NIL, INT, 0, MKSUE(INT));
  2650+        p->n_sp = lookup("__stack_chk_guard", SNORMAL);
  2651+        p = clocal(p);
  2652+
  2653+        lab = getlab();
  2654+        cbranch(buildtree(EQ, p, q), bcon(lab));
  2655+
  2656+        p = block(NAME, NIL, NIL, FTN+VOID, 0, MKSUE(VOID));
  2657+        p->n_sp = lookup("__stack_chk_fail", SNORMAL);
  2658+        p = clocal(p);
  2659+
  2660+        ecomp(buildtree(UCALL, p, NIL));
  2661+
  2662+        plabel(lab);
  2663+
  2664+        if (DECREF(cftnsp->stype) != VOID) {
  2665+                p = tempnode(tmpnr, DECREF(cftnsp->stype), cftnsp->sdf, cftnsp->ssue);
  2666+                q = block(REG, NIL, NIL, DECREF(cftnsp->stype),
  2667+                        cftnsp->sdf, cftnsp->ssue);
  2668+                q->n_rval = RETREG(DECREF(cftnsp->stype));
  2669+                ecomp(buildtree(ASSIGN, q, p));
  2670+        }
  2671+}
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-27 16:53 +0200