cleaning; moved all extern's from .c to .h files for double check
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 30 Sep 2000 19:24:13 +0000 (19:24 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 30 Sep 2000 19:24:13 +0000 (19:24 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@428 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/ds390/Makefile
src/ds390/gen.c
src/ds390/ralloc.c
src/ds390/ralloc.h

index 41682edd4ffaaa8365ebfc15cce5255a104d8084..67002c4104ba2465738470aafcd1c7093d5e6fdb 100644 (file)
@@ -5,8 +5,8 @@ include $(PRJDIR)/Makefile.common
 OBJ = gen.o ralloc.o main.o
 LIB = port.a
 
-CFLAGS = -g -Wall -O2
-CFLAGS += -I.. -I. -I../..
+CFLAGS = -g -Wall -Werror -O2
+CFLAGS += -I.. -I.
 
 all: $(LIB)
 
index df3f50679f5ad100911353160f197c341bd50334..31f57e0f5c2b6eef071ecb40970c06f5415d3597 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
-#include "SDCCglobl.h"
+
+#include <common.h>
+#include "ralloc.h"
+#include "gen.h"
 
 #ifdef HAVE_SYS_ISA_DEFS_H
 #include <sys/isa_defs.h>
 #endif
 #endif
 
-#include "common.h"
-#include "SDCCpeeph.h"
-#include "ralloc.h"
-#include "gen.h"
-
 char *aopLiteral (value *val, int offset);
+#if 0
+//REMOVE ME!!!
 extern int allocInfo;
+#endif
 
 /* this is the down and dirty file with all kinds of 
    kludgy & hacky stuff. This is what it is all about
@@ -82,10 +83,8 @@ static struct {
     set *sendSet;
 } _G;
 
-extern int ds390_ptrRegReq ;
-extern int ds390_nRegs;
-extern FILE *codeOutFile;
 static void saverbank (int, iCode *,bool);
+
 #define RESULTONSTACK(x) \
                          (IC_RESULT(x) && IC_RESULT(x)->aop && \
                          IC_RESULT(x)->aop->type == AOP_STK )
@@ -8349,7 +8348,7 @@ static void genReceive (iCode *ic)
 }
 
 /*-----------------------------------------------------------------*/
-/* gen390Code - generate code for 8051 based controllers            */
+/* gen390Code - generate code for Dallas 390 based controllers     */
 /*-----------------------------------------------------------------*/
 void gen390Code (iCode *lic)
 {
@@ -8358,12 +8357,15 @@ void gen390Code (iCode *lic)
 
     lineHead = lineCurr = NULL;
 
+#if 0
+    //REMOVE ME!!!
     /* print the allocation information */
     if (allocInfo)
        printAllocInfo( currFunc, codeOutFile);
+#endif
     /* if debug information required */
-/*     if (options.debug && currFunc) { */
-    if (currFunc) {
+    if (options.debug && currFunc) {
+    //jwk if (currFunc) {
        cdbSymbol(currFunc,cdbFile,FALSE,TRUE);
        _G.debugLine = 1;
        if (IS_STATIC(currFunc->etype))
index ecec03eafef81194f653bf18ff7a3cebab333bdb..7555de4ed2310434c57650fd49afae8f7418a161 100644 (file)
@@ -36,8 +36,6 @@
 /* since the pack the registers depending strictly on the MCU      */
 /*-----------------------------------------------------------------*/
 
-extern void gen390Code(iCode *);
-
 /* Global data */
 static struct {
     bitVect *spiltSet;
@@ -2100,7 +2098,7 @@ static void packRegisters (eBBlock *ebp)
              bitVectnBitsOn(OP_DEFS(IC_RESULT(ic))) == 1 &&
             IS_OP_LITERAL(IC_RIGHT(ic))) ) {
 
-           int i = operandLitValue(IC_RIGHT(ic));
+           //int i = operandLitValue(IC_RIGHT(ic));
            OP_SYMBOL(IC_RESULT(ic))->remat = 1;
            OP_SYMBOL(IC_RESULT(ic))->rematiCode = ic;
            OP_SYMBOL(IC_RESULT(ic))->usl.spillLoc = NULL;
index 6b3a754d0ef841aca132a56a31855ef91b3ba9fd..dec059a64b5cdf36f862ade8a30cbc29413c6c48 100644 (file)
@@ -54,4 +54,7 @@ extern regs regs390[];
 
 regs  *ds390_regWithIdx (int);
 
+extern int ds390_ptrRegReq;
+extern int ds390_nRegs;
+
 #endif