More AVR stuff
[fw/sdcc] / src / port.h
index 6c9983720dc69cb4f6d3bfca139a6855f8448d66..65d4ba2b6d340d67d5dfa50711724f0d0653c820 100644 (file)
@@ -13,6 +13,15 @@ typedef struct {
     /** Target name string, used for --help */
     const char *target_name;
 
+    struct {
+       /** TRUE if all types of glue functions should be inseted into
+           the file that also defines main.
+           We dont want this in cases like the z80 where the startup
+           code is provided by a seperate module.
+       */
+       bool glue_up_main;
+    } general;
+
     /* assembler related information */
     struct {
        /** Command to run and arguments (eg as-z80) */
@@ -29,6 +38,11 @@ typedef struct {
        const char **cmd;
     } linker;
 
+    struct {
+       /** Default peephole rules */
+       char *default_rules;
+    } peep;
+
     /** Basic type sizes */
     struct {
        int char_size;
@@ -43,7 +57,7 @@ typedef struct {
        int max_base_size;
     } s;
 
-    /** Names for all the memory regions */
+    /** memory regions related stuff */
     struct {
        const char *xstack_name;
        const char *istack_name;
@@ -55,6 +69,10 @@ typedef struct {
        const char *reg_name;
        const char *static_name;
        const char *overlay_name;
+       const char *post_static_name;
+       struct memmap *default_local_map ; /* default location for auto vars */
+       struct memmap *default_globl_map ; /* default location for globl vars*/
+       int         code_ro;               /* code space read-only 1=yes */
     } mem;
     
     /* stack related information */
@@ -75,9 +93,14 @@ typedef struct {
        /** One more than the smallest 
            mul/div operation the processor can do nativley 
            Eg if the processor has an 8 bit mul, nativebelow is 2 */
-       int nativebelow;
+       int native_below;
     } muldiv;
 
+    /** Called once the processor target has been selected.
+       First chance to initalise and set any port specific varibles.
+       'port' is set before calling this.  May be NULL.
+    */
+    void (*init)(void);
     /** Parses one option + its arguments */
     bool (*parseOption)(int *pargc, char **argv, int *i);
     /** Called after all the options have been parsed. */
@@ -104,9 +127,14 @@ typedef struct {
      * will be used. 
      */
     int (*genIVT)(FILE *of, symbol **intTable, int intCount); 
+
+
+    /* parameter passing in register related functions */
+    void (*reset_regparms)();          /* reset the register count */
+    int  (*reg_parm)(struct link *);   /* will return 1 if can be passed in register */
+   
 } PORT;
 
 extern PORT *port;
 
 #endif
-