while emitting maps, we are inInitMode
[fw/sdcc] / src / SDCC.lex
index 414d44a88cf142e37cb32e009dcd8df04036f4ea..23ee5a102f2bdba229f7acf7b93a1c03a0ba1100 100644 (file)
@@ -100,8 +100,10 @@ struct options  save_options  ;
 <asm>.         { 
   if (asmp-asmbuff >= asmbuffSize-2) {
     // increase the buffersize with 50%
+    int size=asmp-asmbuff;
     asmbuffSize=asmbuffSize*3/2;
     asmbuff = Safe_realloc (asmbuff, asmbuffSize); 
+    asmp=asmbuff+size;
   }
   *asmp++ = yytext[0];
 }
@@ -109,8 +111,10 @@ struct options  save_options  ;
   count(); 
   if (asmp-asmbuff >= asmbuffSize-3) {
     // increase the buffersize with 50%
+    int size=asmp-asmbuff;
     asmbuffSize=asmbuffSize*3/2;
     asmbuff = Safe_realloc (asmbuff, asmbuffSize); 
+    asmp=asmbuff+size;
   }
   *asmp++ = '\n' ;
 }
@@ -165,6 +169,7 @@ struct options  save_options  ;
 "void"         { count(); return(VOID); }
 "volatile"     { count(); return(VOLATILE); }
 "using"        { count(); TKEYWORD(USING); }
+"_naked"       { count(); TKEYWORD(NAKED); }
 "while"        { count(); return(WHILE); }
 "xdata"        { count(); TKEYWORD(XDATA); }
 "_data"               { count(); TKEYWORD(_NEAR); }