]> git.gag.com Git - fw/sdcc/blobdiff - src/pic/gen.c
* src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
[fw/sdcc] / src / pic / gen.c
index 7370a3bace7d2812b1c364c66efc2f0431355aa1..51e51cc5ca240645629bd71649f2f8f536d1f330 100644 (file)
@@ -59,6 +59,7 @@ extern void printpBlock(FILE *of, pBlock *pb);
 
 static int labelOffset=0;
 extern int debug_verbose;
+extern int pic14_hasInterrupt;
 //static int optimized_for_speed = 0;
 
 /* max_key keeps track of the largest label number used in 
@@ -2925,6 +2926,7 @@ static void genFunction (iCode *ic)
                emitpcode(POC_CLRF,   popCopyReg(&pc_pclath));/* during an interrupt PCLATH must be cleared before a goto or call statement */
                
                pBlockConvert2ISR(pb);
+               pic14_hasInterrupt = 1;
 #if 0  
                if (!inExcludeList("acc"))              
                        pic14_emitcode ("push","acc");