options.model specific fixes
[fw/sdcc] / src / SDCCmem.h
index 03961ad3d292087b7b589be72007af0840136b32..1f4a54dcb190d40786946452262fd820e30b7128 100644 (file)
@@ -7,20 +7,23 @@
 
 struct set ;
 struct value ;
+struct eBBlock;
+
 typedef  struct memmap{
-    unsigned char  pageno;/* page no for this variable  */
-    char     *sname;    /*   character prefix for map */
-    char     dbName ;   /* debugger address space name */
-    int      slbl ;    /* label counter for space    */
-    unsigned sloc    ;    /* starting location          */
-    unsigned fmap : 1;    /* 1 = 16bit addressing reqd  */
-    unsigned paged : 1;    /* this is a paged mem space  */
-    unsigned direct: 1;    /* 1= indirect access only    */
-    unsigned bitsp: 1;    /* 1 = bit addressable space  */
-    unsigned codesp:1;    /* 1 = code space             */
-    unsigned regsp: 1;    /* 1= sfr space               */
-    FILE    *oFile   ;    /* object file associated     */
-    struct  set *syms;   /* symbols defined in this segment */
+    unsigned char  pageno;    /* page no for this variable  */
+    const char     *sname;    /*   character prefix for map */
+    char     dbName ;         /* debugger address space name */
+    int      ptrType;         /* pointer Type for this space */
+    int      slbl ;           /* label counter for space    */
+    unsigned sloc    ;        /* starting location          */
+    unsigned fmap : 1;        /* 1 = 16bit addressing reqd  */
+    unsigned paged : 1;       /* this is a paged mem space  */
+    unsigned direct: 1;       /* 1= indirect access only    */
+    unsigned bitsp: 1;        /* 1 = bit addressable space  */
+    unsigned codesp:1;        /* 1 = code space             */
+    unsigned regsp: 1;        /* 1= sfr space               */
+    FILE    *oFile   ;        /* object file associated     */
+    struct  set *syms;        /* symbols defined in this segment */
 } memmap ;
 
 extern FILE    *junkFile ;     
@@ -35,6 +38,7 @@ extern FILE   *junkFile ;
 #define  BIT_NAME      port->mem.bit_name
 #define  REG_NAME      port->mem.reg_name
 #define  STATIC_NAME   port->mem.static_name
+#define         HOME_NAME     port->mem.home_name
  
 /* forward definition for variables */
 extern   memmap  *xstack;    /* xternal stack data         */
@@ -51,6 +55,9 @@ extern   memmap  *reg   ;    /* register space                   */
 extern   memmap  *_const;    /* constant segment           */
 extern   memmap  *generic;   /* unknown                    */
 extern   memmap  *overlay;   /* the overlay segment        */
+extern   memmap  *eeprom;    /* eepromp space              */
+extern   memmap  *eeprom;    /* eepromp space              */
+extern  memmap  *home;      /* Non-banked home space      */
 
 extern   struct  set     *ovrSetSets;
 
@@ -61,9 +68,12 @@ extern   struct  set     *ovrSetSets;
 #define IN_DIRSPACE(map)        (map && map->direct)
 #define IN_PAGEDSPACE(map)      (map && map->paged )
 #define IN_CODESPACE(map)       (map && map->codesp)
+#define IN_REGSP(map)          (map && map->regsp)
+#define PTR_TYPE(map)           (map ? (map->ptrType ? map->ptrType : POINTER)\
+                                     : GPOINTER)
 
 /* forward decls for functions    */
-memmap     *allocMap       (char,char,char,char,char,char,unsigned,char *,char );
+memmap     *allocMap       (char,char,char,char,char,char,unsigned, const char *,char,int );
 void        initMem        (                                );
 void        allocGlobal    (struct symbol  *                );
 void        allocLocal     (struct symbol  *                );
@@ -74,5 +84,6 @@ int         allocVariables (struct symbol  *                );
 void        overlay2Set    (                                );
 void        overlay2data   (                                );
 void        redoStackOffsets(                               );
-
+void        printAllocInfo (struct symbol *, FILE *         );
+void        doOverlays     (struct eBBlock **, int count    );
 #endif