Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.16
 
1.17
 
MAIN:ragge:20041002080115
 
local.c
_>110110                                 r = l->n_left->n_left;
 111111                                 nfree(l->n_left);
 112112                                 l->n_left = r;
<>113 -                        } else if (l->n_right->n_op == SCONV &&
  113+                        }
  114+#if 0
  115+                          else if (l->n_right->n_op == SCONV &&
114116                             l->n_left->n_type == l->n_right->n_type) {
 115117                                 r = l->n_left->n_left;
 116118                                 nfree(l->n_left);
     
 !
119121                                 nfree(l->n_right);
 120122                                 l->n_right = r;
 121123                         }
<> 124+#endif
122125                 }
 123126                 break;
 124127 
     
 !
210213                         nfree(p);
 211214                         return l;
 212215                 }
<> 216+                if (DEUNSIGN(p->n_type) == SHORT &&
  217+                    DEUNSIGN(l->n_type) == SHORT) {
  218+                        nfree(p);
  219+                        p = l;
  220+                }
213221                 break;
 214222 
 215223         case MOD:
     
 !
329337         ecomp(buildtree(PLUSEQ, sp, p));
 330338 }
 331339 
<>332 -static int inwd;        /* current bit offsed in word */
 333 -static CONSZ word;      /* word being built from fields */
 334 -
335340 /*
<>336 - * Generate initialization code for assigning a constant c
 337 - * to a field of width sz
 338 - * we assume that the proper alignment has been obtained
 339 - * inoff is updated to have the proper final value
 340 - * we also assume sz  < SZINT
  341+ * print out an integer.
341342  */
 342343 void
<>343 -incode(NODE *p, int sz)
  344+inval(CONSZ word)
344345 {
<>345 -        inoff += sz;
 346 -        if ((sz + inwd) > SZINT)
 347 -                cerror("incode: field > int");
 348 -
 349 -        word |= ((unsigned)(p->n_lval<<(32-sz))) >> (32-sz-inwd);
 350 -
 351 -        inwd += sz;
 352 -        if (inoff % SZINT == 0) {
 353 -                printf("        .long 0x%llx\n", word);
 354 -                word = inwd = 0;
 355 -        }
  346+        word &= 0xffffffff;
  347+        printf("        .long 0x%llx\n", word);
356348 }
 357349 
<>358 -/* output code to initialize space of size sz to the value d */
  350+/* output code to initialize a floating point value */
359351 /* the proper alignment has been obtained */
<>360 -/* inoff is updated to have the proper final value */
 361 -/* on the target machine, write it out in octal! */
362352 void
<>363 -fincode(NODE *p, int sz)
  353+finval(NODE *p)
364354 {
<>365 -        double d = p->n_dcon;
 366 -        int c;
 367 -        char *n;
 368 -
 369 -        inoff += sz;
 370 -        if(nerrors)
 371 -                return;
 372 -        switch (sz) {
 373 -        case SZLDOUBLE:
 374 -                n = ".tfloat";
 375 -                c = 't';
  355+        switch (p->n_type) {
  356+        case LDOUBLE:
  357+                printf("\t.tfloat\t0t%.20Le\n", p->n_dcon);
376358                 break;
<>377 -        case SZDOUBLE:
 378 -                n = ".dfloat";
 379 -                c = 'd';
  359+        case DOUBLE:
  360+                printf("\t.dfloat\t0d%.20e\n", (double)p->n_dcon);
380361                 break;
<>381 -        case SZFLOAT:
 382 -                n = ".ffloat";
 383 -                c = 'f';
  362+        case FLOAT:
  363+                printf("\t.ffloat\t0f%.20e\n", (float)p->n_dcon);
384364                 break;
 385365         }
<>386 -        printf("        %s      0%c%.20e\n", n, c, d);
387366 }
 388367 
<>389 -void
 390 -cinit(NODE *p, int sz)
 391 -{
 392 -        NODE *l;
 393 -
 394 -        /*
 395 -         * as a favor (?) to people who want to write
 396 -         *     int i = 9600/134.5;
 397 -         * we will, under the proper circumstances, do
 398 -         * a coercion here.
 399 -         */
 400 -        switch (p->n_type) {
 401 -        case INT:
 402 -        case UNSIGNED:
 403 -                l = p->n_left;
 404 -                if (l->n_op != SCONV || l->n_left->n_op != FCON)
 405 -                        break;
 406 -                nfree(l);
 407 -                l = l->n_left;
 408 -                l->n_lval = (long)(l->n_dcon);
 409 -                l->n_sp = NULL;
 410 -                l->n_op = ICON;
 411 -                l->n_type = INT;
 412 -                p->n_left = l;
 413 -                break;
 414 -        }
 415 -        /* arrange for the initialization of p into a space of size sz */
 416 -        /* the proper alignment has been opbtained */
 417 -        /* inoff is updated to have the proper final value */
 418 -        ecode( p );
 419 -        inoff += sz;
 420 -}
 421 -
 422 -/*
 423 - * define n bits of zeros in a vfd
 424 - */
 425 -void
 426 -vfdzero(int n)
 427 -{
 428 -        inoff += n;
 429 -        inwd += n;
 430 -        if (inoff%ALINT ==0) {
 431 -                printf("        .long 0%llo\n", word);
 432 -                word = inwd = 0;
 433 -        }
 434 -}
 435 -
436368 /* make a name look like an external name in the local machine */
 437369 char *
 438370 exname(char *p)
     
 !
462394 
 463395 /* curid is a variable which is defined but
 464396  * is not initialized (and not a function );
<>465 - * This routine returns the stroage class for an uninitialized declaration
  397+ * This routine returns the storage class for an uninitialized declaration
<_466398  */
 467399 int
 468400 noinit()
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-30 19:59 +0200