Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.152
 
1.153
 
MAIN:ragge:20110623133926
 
local.c
_>881881 }
 882882 
 883883 /*
<>884 - * Print out a string of characters.
 885 - * Assume that the assembler understands C-style escape
 886 - * sequences.
 887 - */
 888 -void
 889 -instring(struct symtab *sp)
 890 -{
 891 -        char *s, *str = sp->sname;
 892 -
 893 -#if !defined(MACHOABI)
 894 -
 895 -        defloc(sp);
 896 -
 897 -#else
 898 -
 899 -        extern int lastloc;
 900 -        if (lastloc != STRNG)
 901 -                printf("        .cstring\n");
 902 -        lastloc = STRNG;
 903 -        printf("\t.p2align 2\n");
 904 -        printf(LABFMT ":\n", sp->soffset);
 905 -
 906 -#endif
 907 -
 908 -        /* be kind to assemblers and avoid long strings */
 909 -        printf("\t.ascii \"");
 910 -        for (s = str; *s != 0; ) {
 911 -                if (*s++ == '\\') {
 912 -                        (void)esccon(&s);
 913 -                }
 914 -                if (s - str > 60) {
 915 -                        fwrite(str, 1, s - str, stdout);
 916 -                        printf("\"\n\t.ascii \"");
 917 -                        str = s;
 918 -                }
 919 -        }
 920 -        fwrite(str, 1, s - str, stdout);
 921 -        printf("\\0\"\n");
 922 -}
 923 -
 924 -/*
925884  * print out a constant node, may be associated with a label.
 926885  * Do not free the node after use.
 927886  * off is bit offset from the beginning of the aggregate
     
 !
1036995         int al;
 1037996         char *name;
 1038997 
<>1039 -#ifdef TLS
 1040 -        if (sp->sflags & STLS) {
 1041 -                if (sp->sclass == EXTERN)
 1042 -                        sp->sclass = EXTDEF;
 1043 -                simpleinit(sp, bcon(0));
 1044 -                return;
 1045 -        }
 1046 -#endif
 1047 -
1048998         if ((name = sp->soname) == NULL)
 1049999                 name = exname(sp->sname);
 10501000         al = talign(sp->stype, sp->sap)/SZCHAR;
 10511001         off = (int)tsize(sp->stype, sp->sdf, sp->sap);
<>1052 -        off = (off+(SZCHAR-1))/SZCHAR;
 1053 -        if (attr_find(sp->sap, GCC_ATYP_SECTION)) {
 1054 -                /* let the "other" code handle sections */
 1055 -                if (sp->sclass != STATIC)
 1056 -                        printf("        .globl %s\n", name);
 1057 -                defloc(sp);
 1058 -#ifdef os_darwin
 1059 -                printf("\t.space %d\n", off);
 1060 -#else
 1061 -                printf("\t.zero %d\n", off);
  1002+        SETOFF(off,SZCHAR);
  1003+        off /= SZCHAR;
  1004+#if defined(MACHOABI)
  1005+        al = ispow2(al);
10621006 #endif
<>1063 -                return;
 1064 -        }
10651007 
<>1066 -#ifdef GCC_COMPAT
 1067 -        {
 1068 -                struct attr *ap;
 1069 -                if ((ap = attr_find(sp->sap, GCC_ATYP_VISIBILITY)) &&
 1070 -                    strcmp(ap->sarg(0), "default"))
 1071 -                        printf("\t.%s %s\n", ap->sarg(0), name);
 1072 -        }
 1073 -#endif
 1074 -        printf("        .%scomm ", sp->sclass == STATIC ? "l" : "");
  1008+        if (sp->sclass == STATIC)
  1009+                printf("\t.local %s\n", name);
10751010         if (sp->slevel == 0)
<>1076 -                printf("%s,0%o", name, off);
  1011+                printf("\t.comm %s,0%o,%d\n", name, off, al);
10771012         else
<>1078 -                printf(LABFMT ",0%o", sp->soffset, off);
 1079 -        if (sp->sclass != STATIC) {
 1080 -#if defined(ELFABI)
 1081 -                printf(",%d", al);
 1082 -#elif defined(MACHOABI)
 1083 -                printf(",%d", ispow2(al));
 1084 -#endif
 1085 -        }
 1086 -        printf("\n");
  1013+                printf("\t.comm  " LABFMT ",0%o,%d\n", sp->soffset, off, al);
<_10871014 }
 10881015 
 10891016 static char *
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-22 10:55 +0100