]> git.gag.com Git - fw/sdcc/commitdiff
* src/pic16/pcode.h: added second memory operand to pCodeOpReg
authortecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 24 Jan 2005 00:18:44 +0000 (00:18 +0000)
committertecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 24 Jan 2005 00:18:44 +0000 (00:18 +0000)
  to enable upcast to pCodeOpReg2 (there is no type tag to
  differenciate the two and pic16_popGet2p casts into PCOR2)
* src/pic16/main.c (_process_pragma): fixed another malloc bug
  (sizeof(sectNames) changed to sizeof(sectName))
  Both patches fix segfaults under MinGW.

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

ChangeLog
src/pic16/main.c
src/pic16/pcode.h

index a8f0d5b31417fdff62f837c34dd9b30d1626866e..8c3654485c0dd5e08ecc771831b8ba78b5112781 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-01-24 Raphael Neider <rneider AT web.de>
+
+       * src/pic16/pcode.h: added second memory operand to pCodeOpReg
+         to enable upcast to pCodeOpReg2 (there is no type tag to
+         differenciate the two and pic16_popGet2p cast into PCOR2)
+       * src/pic16/main.c (_process_pragma): fixed another malloc bug
+         (sizeof(sectNames) changed to sizeof(sectName))
+         Both patches fix segfaults under MinGW.
+
 2005-01-23 Raphael Neider <rneider AT web.de>
 
        * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
index 9d72e646981b8d1ca78befea8e56c6d6dbdd935e..ac4e22e1afc775151e96e34013d830ae1d550cf1 100644 (file)
@@ -275,7 +275,7 @@ _process_pragma(const char *sz)
                        }
                        
                        if(!found) {
-                               snam = Safe_calloc(1, sizeof(sectNames));
+                               snam = Safe_calloc(1, sizeof(sectName));
                                snam->name = Safe_strdup( sectname );
                                snam->regsSet = NULL;
                                
index 73ba1f35ff3242ec32b177dc3c436195789552f7..43657a5d949d55082718bca950be0de0c73a2f5a 100644 (file)
@@ -445,6 +445,8 @@ typedef struct pCodeOpReg
   struct regs *r;
   int instance;    // byte # of Multi-byte registers
   struct pBlock *pb;
+
+  pCodeOp *pcop2;      // second memory operand (NEEDED IN gen.c:pic16_popGet2p (pCodeOpReg casted into pCodeOpReg2) 
 } pCodeOpReg;
 
 typedef struct pCodeOpReg2