/** 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) */
const char **cmd;
} linker;
+ struct {
+ /** Default peephole rules */
+ char *default_rules;
+ } peep;
+
/** Basic type sizes */
struct {
int char_size;
int max_base_size;
} s;
- /** Names for all the memory regions */
+ /** memory regions related stuff */
struct {
const char *xstack_name;
const char *istack_name;
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 */
/** 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. */
* 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
-