Some more AVR
[fw/sdcc] / src / SDCCmem.c
index 435c317181f057cb17d75a1a39ac5491002fa029..d410f0140fc9423d168fe22ec2c4112968cc62d0 100644 (file)
@@ -370,6 +370,12 @@ void allocGlobal ( symbol *sym )
        allocIntoSeg (sym)  ;
        return ;
     }
+
+    if ( SPEC_SCLS(sym->etype) == S_EEPROM  )    {
+       SPEC_OCLS(sym->etype) = eeprom ;
+       allocIntoSeg (sym)  ;
+       return ;
+    }
     
     return ;
 }
@@ -604,11 +610,17 @@ void allocLocal ( symbol *sym  )
        return  ;
     }
 
-    if ( SPEC_SCLS(sym->etype) == S_DATA  )    {
+    if ( SPEC_SCLS(sym->etype) == S_DATA  ) {
        SPEC_OCLS(sym->etype) = (options.noOverlay ? data : overlay );
        allocIntoSeg(sym)  ;
        return ;
     }
+
+    if ( SPEC_SCLS(sym->etype) == S_EEPROM  ) {
+       SPEC_OCLS(sym->etype) = eeprom;
+       allocIntoSeg(sym)  ;
+       return ;
+    }
     
     /* again note that we have put it into the overlay segment
        will remove and put into the 'data' segment if required after