Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.54
 
1.55
 
MAIN:ragge:20110604152202
 
local.c
_>846846  * off is bit offset from the beginning of the aggregate
 847847  * fsz is the number of bits this is referring to
 848848  */
<>849 -void
  849+int
850850 ninval(CONSZ off, int fsz, NODE *p)
 851851 {
 852852         union { float f; double d; long double l; int i[3]; } u;
<>853 -        struct symtab *q;
 854 -        NODE *op = NIL;
 855 -        TWORD t;
856853 
<>857 -        t = p->n_type;
 858 -        if (t > BTMASK)
 859 -                t = LONG; /* pointer */
 860 -
 861 -        if (p->n_op != ICON && p->n_op != FCON)
 862 -                cerror("ninval: init node not constant");
 863 -
 864 -        if (p->n_op == ICON && p->n_sp != NULL && DEUNSIGN(t) != LONG)
 865 -                uerror("element not constant");
 866 -
 867 -        switch (t) {
 868 -        case LONG:
 869 -        case ULONG:
 870 -                printf("\t.quad 0x%llx", p->n_lval);
 871 -                if ((q = p->n_sp) != NULL) {
 872 -                        if ((q->sclass == STATIC && q->slevel > 0)) {
 873 -                                printf("+" LABFMT, q->soffset);
 874 -                        } else {
 875 -                                char *name;
 876 -                                if ((name = q->soname) == NULL)
 877 -                                        name = q->sname;
 878 -                                /* Never any PIC stuff in static init */
 879 -                                if (strchr(name, '@')) {
 880 -                                        name = tmpstrdup(name);
 881 -                                        *strchr(name, '@') = 0;
 882 -                                }
 883 -                                printf("+%s", name);
 884 -                        }
 885 -                }
 886 -                printf("\n");
 887 -                break;
 888 -        case INT:
 889 -        case UNSIGNED:
 890 -                printf("\t.long 0x%x\n", (int)p->n_lval & 0xffffffff);
 891 -                break;
 892 -        case SHORT:
 893 -        case USHORT:
 894 -                printf("\t.short 0x%x\n", (int)p->n_lval & 0xffff);
 895 -                break;
 896 -        case BOOL:
 897 -                if (p->n_lval > 1)
 898 -                        p->n_lval = p->n_lval != 0;
 899 -                /* FALLTHROUGH */
 900 -        case CHAR:
 901 -        case UCHAR:
 902 -                printf("\t.byte %d\n", (int)p->n_lval & 0xff);
 903 -                break;
  854+        switch (p->n_type) {
904855         case LDOUBLE:
 905856                 u.i[2] = 0;
 906857                 u.l = (long double)p->n_dcon;
     
 !
924875                 printf("\t.long\t0x%x\n", u.i[0]);
 925876                 break;
 926877         default:
<>927 -                cerror("ninval");
  878+                return 0;
928879         }
<>929 -        if (op)
 930 -                tfree(op);
  880+        return 1;
<_931881 }
 932882 
 933883 /* make a name look like an external name in the local machine */
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-20 14:42 +0100