Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.12
 
1.13
 
MAIN:ragge:20080106160559
 
code.c
_>3636 #include "pass1.h"
 3737 
 3838 /*
<> 39+ * Define everything needed to print out some data (or text).
  40+ * This means segment, alignment, visibility, etc.
  41+ */
  42+void
  43+defloc(struct symtab *sp)
  44+{
  45+        static char *loctbl[] = { "text", "data", "section .rodata" };
  46+        static int lastloc = -1;
  47+        TWORD t;
  48+        int s;
  49+
  50+        if (sp == NULL) {
  51+                lastloc = -1;
  52+                return;
  53+        }
  54+        t = sp->stype;
  55+        s = ISFTN(t) ? PROG : ISCON(cqual(t, sp->squal)) ? RDATA : DATA;
  56+        lastloc = s;
  57+        if (s == PROG)
  58+                return; /* text is written in prologue() */
  59+        if (s != lastloc)
  60+                printf("        .%s\n", loctbl[s]);
  61+        printf("        .p2align %d\n", ispow2(talign(t, sp->ssue)));
  62+        if (sp->sclass == EXTDEF)
  63+                printf("        .globl %s\n", sp->soname);
  64+        if (sp->slevel == 0) {
  65+#ifdef USE_GAS
  66+                printf("\t.type %s,@object\n", sp->soname);
  67+                printf("\t.size %s," CONFMT "\n", sp->soname,
  68+                    tsize(sp->stype, sp->sdf, sp->ssue));
  69+#endif
  70+                printf("%s:\n", sp->soname);
  71+        } else
  72+                printf(LABFMT ":\n", sp->soffset);
  73+}
  74+
  75+
  76+#ifdef notdef
  77+/*
3978  * cause the alignment to become a multiple of n
 4079  * never called for text segment.
 4180  */
     
 !
65104 #endif
 66105         printf("%s:\n", c);
 67106 }
<> 107+#endif
68108 
 69109 static int rvnr;
 70110 
     
 !
403443         printf("\t.abicalls\n");
 404444 }
 405445 
<> 446+#ifdef notdef
406447 /*
 407448  * Print character t at position i in one string, until t == -1.
 408449  * Locctr & label is already defined.
     
 !
442483                 }
 443484         }
 444485 }
<> 486+#endif
<_445487 
 446488 /*
 447489  * return the alignment of field of type t
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-16 06:54 +0200