added DUMMY_READ_VOLATILE:
[fw/sdcc] / src / pic16 / gen.c
index 405bbbe529c1f2a6c26931c91a1a67ac35c646a0..35eebd89c4a0358db87a6b734875e77861824951 100644 (file)
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
-  SDCCgen51.c - source file for code generation for 8051
-  
+  gen.c - source file for code generation for pic16
+
   Written By -  Sandeep Dutta . sandeep.dutta@usa.net (1998)
          and -  Jean-Louis VERN.jlvern@writeme.com (1999)
   Bug Fixes  -  Wojciech Stryjewski  wstryj1@tiger.lsu.edu (1999 v2.1.9a)
@@ -9963,6 +9963,18 @@ static void genReceive (iCode *ic)
   pic16_freeAsmop(IC_RESULT(ic),NULL,ic,TRUE);
 }
 
+/*-----------------------------------------------------------------*/
+/* genDummyRead - generate code for dummy read of volatiles        */
+/*-----------------------------------------------------------------*/
+static void
+genDummyRead (iCode * ic)
+{
+  pic16_emitcode ("; genDummyRead","");
+  pic16_emitcode ("; not implemented","");
+
+  ic;
+}
+
 /*-----------------------------------------------------------------*/
 /* genpic16Code - generate code for pic16 based controllers        */
 /*-----------------------------------------------------------------*/
@@ -9987,7 +9999,7 @@ void genpic16Code (iCode *lic)
 
 #if 0
     /* if debug information required */
-    if (options.debug && currFunc) { 
+    if (options.debug && currFunc) {
       if (currFunc) {
        cdbSymbol(currFunc,cdbFile,FALSE,TRUE);
        _G.debugLine = 1;
@@ -10220,13 +10232,17 @@ void genpic16Code (iCode *lic)
            addSet(&_G.sendSet,ic);
            break;
 
+       case DUMMY_READ_VOLATILE:
+         genDummyRead (ic);
+         break;
+
        default :
            ic = ic;
         }
     }
-    
 
-    /* now we are ready to call the 
+
+    /* now we are ready to call the
        peep hole optimizer */
     if (!options.nopeep) {
       peepHole (&lineHead);