lrh
[fw/sdcc] / src / pic / glue.c
index e0f73fb7c1b42c958143df29235f2be4b69b1c93..3afb569211505d0744539b104ce2e0ef0484368f 100644 (file)
@@ -29,7 +29,7 @@
 #include "newalloc.h"
 
 
-#ifdef _BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
   #define _ENDIAN(x)  (3-x)
 #else
   #define _ENDIAN(x)  (x)
@@ -86,7 +86,7 @@ int pic14aopLiteral (value *val, int offset)
 
   /* it is type float */
   fl.f = (float) floatFromVal(val);
-#ifdef _BIG_ENDIAN    
+#ifdef WORDS_BIGENDIAN
   return fl.c[3-offset];
 #else
   return fl.c[offset];
@@ -140,9 +140,6 @@ pic14emitRegularMap (memmap * map, bool addPublics, bool arFlag)
       /* print extra debug info if required */
       if (options.debug || sym->level == 0)
        {
-
-         cdbSymbol (sym, cdbFile, FALSE, FALSE);
-
          if (!sym->level)      /* global */
            if (IS_STATIC (sym->etype))
              fprintf (map->oFile, "F%s_", moduleName);         /* scope is file */
@@ -447,11 +444,6 @@ pic14emitStaticSeg (memmap * map)
       /* print extra debug info if required */
       if (options.debug || sym->level == 0)
        {
-         /* NOTE to me - cdbFile may be null in which case,
-          * the sym name will be printed to stdout. oh well */
-         if(cdbFile)
-           cdbSymbol (sym, cdbFile, FALSE, FALSE);
-
          if (!sym->level)
            {                   /* global */
              if (IS_STATIC (sym->etype))
@@ -680,9 +672,6 @@ pic14emitOverlay (FILE * afile)
          /* print extra debug info if required */
          if (options.debug || sym->level == 0)
            {
-
-             cdbSymbol (sym, cdbFile, FALSE, FALSE);
-
              if (!sym->level)
                {               /* global */
                  if (IS_STATIC (sym->etype))
@@ -774,7 +763,7 @@ picglue ()
 
   /* print the global struct definitions */
   if (options.debug)
-    cdbStructBlock (0,cdbFile);
+    cdbStructBlock (0);
 
   vFile = tempfile();
   /* PENDING: this isnt the best place but it will do */
@@ -807,13 +796,15 @@ picglue ()
   /* now put it all together into the assembler file */
   /* create the assembler file name */
     
-  if (!options.c1mode) {
-    sprintf (buffer, srcFileName);
-    strcat (buffer, ".asm");
-  }
-  else {
-    strcpy(buffer, options.out_name);
-  }
+  if ((noAssemble || options.c1mode) && fullDstFileName)
+    {
+      sprintf (buffer, fullDstFileName);
+    }
+  else
+    {
+      sprintf (buffer, dstFileName);
+      strcat (buffer, ".asm");
+    }
 
   if (!(asmFile = fopen (buffer, "w"))) {
     werror (E_FILE_OPEN_ERR, buffer);