]> git.gag.com Git - fw/sdcc/commitdiff
* src/SDCCicode.c (piCode): applied patch from Raphael Neider,
authorvrokas <vrokas@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 15 Sep 2004 00:17:07 +0000 (00:17 +0000)
committervrokas <vrokas@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 15 Sep 2004 00:17:07 +0000 (00:17 +0000)
* src/pic16/device.c (pic16_assignConfigWordValues): wrong
configuration values no more rejected by compiler, they are assigned
to configuration registers with a warning message instead,
* src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
the for-loop so last conf register is emitted too,
* (_pic16_initPaths): link library libsdcc.lib by default,
* (_hasNativeMulFor): modified test for multiplication according to
Raphael Neider's remarks. Integer multiplication is also done with
support functions,
* device/include/pic16/pic18fregs.h: corrected type error in while
testing and including 18f6720 header file

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3496 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
device/include/pic16/pic18fregs.h
src/SDCCicode.c
src/pic16/gen.c
src/pic16/main.c

index d2a1ebd2d96ab1379479aa12c84bef2d07383133..5a2c761f91c90d31c3c13085132e2f88edb14c8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
+
+       * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
+       * src/pic16/device.c (pic16_assignConfigWordValues): wrong
+       configuration values no more rejected by compiler, they are assigned
+       to configuration registers with a warning message instead,
+       * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
+       the for-loop so last conf register is emitted too,
+       * (_pic16_initPaths): link library libsdcc.lib by default,
+       * (_hasNativeMulFor): modified test for multiplication according to
+       Raphael Neider's remarks. Integer multiplication is also done with
+       support functions,
+       * device/include/pic16/pic18fregs.h: corrected type error in while
+       testing and including 18f6720 header file
+
 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
 
        * src/pic16/device.h (pic16_options): removed field use_crt,
index 9cf4a1f1345625e394173d4d395a9837395be2aa..717ecb5f1422de39ca12117b5e4f75b23e65595d 100644 (file)
@@ -56,7 +56,7 @@
 #  include <pic18f6680.h>
 
 #elif defined(pic18f6720)
-#  include <pic18f6780.h>
+#  include <pic18f6720.h>
 
 #elif defined(pic18f8520)
 #  include <pic18f8520.h>
index 01bf6e6c232326da5db0bf8c6b5af430f9fc9256..6c217d45e877fdd39153fae05a377de9aef4d8d5 100644 (file)
@@ -514,7 +514,7 @@ piCode (void *item, FILE * of)
     of = stdout;
 
   icTab = getTableEntry (ic->op);
-  fprintf (stdout, "%s(%d:%d:%d:%d:%d)\t",
+  fprintf (of, "%s(%d:%d:%d:%d:%d)\t",
           ic->filename, ic->lineno,
           ic->seq, ic->key, ic->depth, ic->supportRtn);
   icTab->iCodePrint (of, ic, icTab->printName);
index 1d4021ffa20c56194ec35d41b4f261f46dd6ca9b..6ec83ba7ec7a4879fbfaa8ecadb5b8ea860a4bda 100644 (file)
@@ -1122,10 +1122,13 @@ void pic16_aopOp (operand *op, iCode *ic, bool result)
            /* force a new aop if sizes differ */
            sym->usl.spillLoc->aop = NULL;
        }
+
+#if 0
        DEBUGpic16_emitcode(";","%s %d %s sym->rname = %s, offset %d",
                            __FUNCTION__,__LINE__,
                            sym->usl.spillLoc->rname,
                            sym->rname, sym->usl.spillLoc->offset);
+#endif
 
        sym->aop = op->aop = aop = newAsmop(AOP_PCODE);
        //aop->aopu.pcop = pic16_popGetImmd(sym->usl.spillLoc->rname,0,sym->usl.spillLoc->offset);
@@ -6618,6 +6621,7 @@ static void genAnd (iCode *ic, iCode *ifx)
                                                 (posbit-1),0, PO_GPR_REGISTER));
 
               pic16_emitpcode(POC_BRA, pic16_popGetLabel(tlbl->key));
+//              pic16_emitpcode(POC_BRA, pic16_popGetLabel(rIfx.lbl->key));
           } else {
               if (bytelit == 0xff) {
                   /* Aaron had a MOVF instruction here, changed to MOVFW cause
index dcea7acb3d0df1dad7c5feae895069814c70062e..c62ea9dd8d3add63899395b774372279860ef620 100644 (file)
@@ -420,29 +420,32 @@ static void _pic16_initPaths(void)
   set *pic16libDirsSet;
   char devlib[512];
 
-       setMainValue("mcu", pic16->name[2] );
-       addSet(&preArgvSet, Safe_strdup("-D{mcu}"));
+    setMainValue("mcu", pic16->name[2] );
+    addSet(&preArgvSet, Safe_strdup("-D{mcu}"));
 
-       sprintf(pic16incDir, "%s%cpic16", INCLUDE_DIR_SUFFIX, DIR_SEPARATOR_CHAR);
-       sprintf(pic16libDir, "%s%cpic16", LIB_DIR_SUFFIX, DIR_SEPARATOR_CHAR);
+    sprintf(pic16incDir, "%s%cpic16", INCLUDE_DIR_SUFFIX, DIR_SEPARATOR_CHAR);
+    sprintf(pic16libDir, "%s%cpic16", LIB_DIR_SUFFIX, DIR_SEPARATOR_CHAR);
 
-       if(!options.nostdinc) {
-               /* setup pic16 include directory */
-               pic16incDirsSet = appendStrSet(dataDirsSet, NULL, pic16incDir);
-               mergeSets(&includeDirsSet, pic16incDirsSet);
-       }
-       
-       if(!options.nostdlib) {
-               /* setup pic16 library directory */
-               pic16libDirsSet = appendStrSet(dataDirsSet, NULL, pic16libDir);
-               mergeSets(&libDirsSet, pic16libDirsSet);
-       }
-       
-       if(!pic16_options.nodefaultlibs) {
-               /* now add the library for the device */
-               sprintf(devlib, "%s.lib", pic16->name[2]);
-               addSet(&libFilesSet, Safe_strdup(devlib));
-       }
+    if(!options.nostdinc) {
+      /* setup pic16 include directory */
+      pic16incDirsSet = appendStrSet(dataDirsSet, NULL, pic16incDir);
+      mergeSets(&includeDirsSet, pic16incDirsSet);
+    }
+
+    if(!options.nostdlib) {
+      /* setup pic16 library directory */
+      pic16libDirsSet = appendStrSet(dataDirsSet, NULL, pic16libDir);
+      mergeSets(&libDirsSet, pic16libDirsSet);
+    }
+
+    if(!pic16_options.nodefaultlibs) {
+      /* now add the library for the device */
+      sprintf(devlib, "%s.lib", pic16->name[2]);
+      addSet(&libFilesSet, Safe_strdup(devlib));
+
+      /* add the internal SDCC library */
+      addSet(&libFilesSet, Safe_strdup( "libsdcc.lib" ));
+    }
 }
 
 extern set *linkOptionsSet;
@@ -673,13 +676,13 @@ static bool _hasNativeMulFor (iCode *ic, sym_link *left, sym_link *right)
 #if 1
        /* multiplication is fixed */
        /* support mul for char/int/long */
-       if((getSize(OP_SYMBOL(IC_LEFT(ic))->type ) <= 4)
-               && (ic->op == '*'))return TRUE;
+       if((ic->op == '*')
+         && (getSize(OP_SYMBOL(IC_LEFT(ic))->type ) < 2))return TRUE;
 #endif
 
 #if 0
        /* support div for char/int/long */
-       if((getSize(OP_SYMBOL(IC_LEFT(ic))->type ) <= 0)
+       if((getSize(OP_SYMBOL(IC_LEFT(ic))->type ) < 0)
                && (ic->op == '/'))return TRUE;
 #endif