2 Definitions for what a port must provide.
3 All ports are referenced in SDCCmain.c.
8 /* Processor specific names */
10 /** Target name used for -m */
13 /** Target name string, used for --help */
14 const char *target_name;
17 /** TRUE if all types of glue functions should be inseted into
18 the file that also defines main.
19 We dont want this in cases like the z80 where the startup
20 code is provided by a seperate module.
25 /* assembler related information */
27 /** Command to run and arguments (eg as-z80) */
29 /** Arguments for debug mode. PENDING: ignored */
30 const char *debug_opts;
31 /** Arguments for normal assembly mode. PENDING: ignored */
32 const char *plain_opts;
35 /* linker related info */
37 /** Command to run (eg link-z80) */
42 /** Default peephole rules */
46 /** Basic type sizes */
60 /** memory regions related stuff */
62 const char *xstack_name;
63 const char *istack_name;
64 const char *code_name;
65 const char *data_name;
66 const char *idata_name;
67 const char *xdata_name;
70 const char *static_name;
71 const char *overlay_name;
72 const char *post_static_name;
73 struct memmap *default_local_map ; /* default location for auto vars */
74 struct memmap *default_globl_map ; /* default location for globl vars*/
75 int code_ro; /* code space read-only 1=yes */
78 /* stack related information */
80 /** -1 for grows down (z80), +1 for grows up (mcs51) */
82 /** Extra overhead when calling between banks */
84 /** Extra overhead when the function is an ISR */
86 /** Standard overhead for a function call */
88 /** Re-enterant space */
93 /** One more than the smallest
94 mul/div operation the processor can do nativley
95 Eg if the processor has an 8 bit mul, nativebelow is 2 */
99 /** Called once the processor target has been selected.
100 First chance to initalise and set any port specific varibles.
101 'port' is set before calling this. May be NULL.
104 /** Parses one option + its arguments */
105 bool (*parseOption)(int *pargc, char **argv, int *i);
106 /** Called after all the options have been parsed. */
107 void (*finaliseOptions)(void);
108 /** Called after the port has been selected but before any
109 options are parsed. */
110 void (*setDefaultOptions)(void);
111 /** Does the dirty work. */
112 void (*assignRegisters)(eBBlock **, int);
114 /** Returns the register name of a symbol.
115 Used so that 'regs' can be an incomplete type. */
116 const char *(*getRegName)(struct regs *reg);
118 /* list of keywords that are used by this
119 target (used by lexer) */
122 /* Write any port specific assembler output. */
123 void (*genAssemblerPreamble)(FILE *of);
125 /* Write the port specific IVT. If genIVT is NULL or if
126 * it returns zero, default (8051) IVT generation code
129 int (*genIVT)(FILE *of, symbol **intTable, int intCount);
132 /* parameter passing in register related functions */
133 void (*reset_regparms)(); /* reset the register count */
134 int (*reg_parm)(struct link *); /* will return 1 if can be passed in register */
136 /** Process the pragma string 'sz'. Returns 0 if recognised and
137 processed, 1 otherwise. May be NULL.
139 int (*process_pragma)(const char *sz);