Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.1.1.1
 
1.2
 
MAIN:gmcgarry:20071105145703
 
code.c
_>7676 void
 7777 efcode()
 7878 {
<>79 -        NODE *p, *q;
 80 -        int sz;
 81 -
8279         if (cftnsp->stype != STRTY+FTN && cftnsp->stype != UNIONTY+FTN)
 8380                 return;
 8481 }
     
 !
117114         int i, m;
 118115 
 119116         /* Passed arguments start 64 bits above the framepointer. */
<>120 -        passedargoff = 64;
  117+        passedargoff = ARGINIT;
121118         
 122119         if (cftnsp->stype == STRTY+FTN || cftnsp->stype == UNIONTY+FTN) {
 123120                 /* Function returns struct, adjust arg offset */
     
 !
173170 void
 174171 bycode(int t, int i)
 175172 {
<>176 -        static  int     lastoctal = 0;
  173+        static int lastoctal = 0;
177174 
 178175         /* put byte i+1 in a string */
 179176 
     
 !
182179                         puts("\"");
 183180         } else {
 184181                 if (i == 0)
<>185 -                        printf("\t.ascii \"");
 186 -                if (t == '\\' || t == '"') {
  182+                        printf("\t.asciiz \"");
  183+                if (t == 0)
  184+                        return;
  185+                else if (t == '\\' || t == '"') {
187186                         lastoctal = 0;
 188187                         putchar('\\');
 189188                         putchar(t);
<> 189+                } else if (t == 012) {
  190+                        printf("\\n");
190191                 } else if (t < 040 || t >= 0177) {
 191192                         lastoctal++;
 192193                         printf("\\%o",t);
 193194                 } else if (lastoctal && '0' <= t && t <= '9') {
 194195                         lastoctal = 0;
<>195 -                        printf("\"\n\t.ascii \"%c", t);
  196+                        printf("\"\n\t.asciiz \"%c", t);
196197                 } else {        
 197198                         lastoctal = 0;
 198199                         putchar(t);
     
 !
207208 zecode(int n)
 208209 {
 209210         printf("        .zero %d\n", n * (SZINT/SZCHAR));
<>210 -        inoff += n * SZINT;
  211+//      inoff += n * SZINT;
211212 }
 212213 
 213214 /*
     
 !
234235  * XXX - fix genswitch.
 235236  */
 236237 void
<>237 -genswitch(struct swents **p, int n)
  238+genswitch(int num, struct swents **p, int n)
238239 {
<> 240+        NODE *r;
  241+        int i;
  242+
  243+        /* simple switch code */
  244+        for (i = 1; i <= n; ++i) {
  245+                /* already in 1 */
  246+                r = tempnode(num, INT, 0, MKSUE(INT));
  247+                r = buildtree(NE, r, bcon(p[i]->sval));
  248+                cbranch(buildtree(NOT, r, NIL), bcon(p[i]->slab));
  249+        }
  250+        if (p[0]->slab > 0)
  251+                branch(p[0]->slab);
<_239252 }
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-09-20 05:56 +0200