X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fport.h;h=fd32518bf9da274a454b3494b2a67903a0fcb47d;hb=039830aac4fa9f1baeab120d07fadebc8a5b1b6c;hp=a52bed1b806cae20954ab7262787db0397706b7f;hpb=4c527a8dc0a11d9bb33bebfe2fafa42e34b2895b;p=fw%2Fsdcc diff --git a/src/port.h b/src/port.h index a52bed1b..fd32518b 100644 --- a/src/port.h +++ b/src/port.h @@ -25,17 +25,18 @@ /* Macro to test the target we are compiling for. Can only be used after SDCCmain has defined the port */ -#define TARGET_IS_MCS51 (port->id==TARGET_ID_MCS51) -#define TARGET_IS_GBZ80 (port->id==TARGET_ID_GBZ80) -#define TARGET_IS_Z80 (port->id==TARGET_ID_Z80) -#define TARGET_Z80_LIKE ((port->id==TARGET_ID_Z80) || (port->id==TARGET_ID_GBZ80)) -#define TARGET_IS_AVR (port->id==TARGET_ID_AVR) -#define TARGET_IS_DS390 (port->id==TARGET_ID_DS390) -#define TARGET_IS_DS400 (port->id==TARGET_ID_DS400) -#define TARGET_IS_PIC (port->id==TARGET_ID_PIC) -#define TARGET_IS_PIC16 (port->id==TARGET_ID_PIC16) -#define TARGET_IS_XA51 (port->id==TARGET_ID_XA51) -#define TARGET_IS_HC08 (port->id==TARGET_ID_HC08) +#define TARGET_IS_MCS51 (port->id==TARGET_ID_MCS51) +#define TARGET_IS_GBZ80 (port->id==TARGET_ID_GBZ80) +#define TARGET_IS_Z80 (port->id==TARGET_ID_Z80) +#define TARGET_Z80_LIKE (TARGET_IS_Z80 || TARGET_IS_GBZ80) +#define TARGET_IS_AVR (port->id==TARGET_ID_AVR) +#define TARGET_IS_DS390 (port->id==TARGET_ID_DS390) +#define TARGET_IS_DS400 (port->id==TARGET_ID_DS400) +#define TARGET_IS_PIC (port->id==TARGET_ID_PIC) +#define TARGET_IS_PIC16 (port->id==TARGET_ID_PIC16) +#define TARGET_IS_XA51 (port->id==TARGET_ID_XA51) +#define TARGET_IS_HC08 (port->id==TARGET_ID_HC08) +#define TARGET_MCS51_LIKE (TARGET_IS_MCS51 || TARGET_IS_DS390 || TARGET_IS_DS400) #define MAX_BUILTIN_ARGS 16 /* definition of builtin functions */ @@ -67,10 +68,10 @@ typedef struct /** Unique id for this target */ const int id; /** Target name used for -m */ - const char *target; + const char * const target; /** Target name string, used for --help */ - const char *target_name; + const char * const target_name; /** Specific processor for the given target family. specified by -p */ char *processor; @@ -167,25 +168,30 @@ typedef struct /** memory regions related stuff */ struct { - const char *xstack_name; - const char *istack_name; + const char * const xstack_name; + const char * const istack_name; + /* + * The following 2 items can't be const pointers + * due to ugly implementation in z80 target; + * this should be fixed in src/z80/main.c (borutr) + */ const char *code_name; const char *data_name; - const char *idata_name; - const char *pdata_name; - const char *xdata_name; - const char *bit_name; - const char *reg_name; - const char *static_name; - const char *overlay_name; - const char *post_static_name; - const char *home_name; - const char *xidata_name; // initialized xdata - const char *xinit_name; // a code copy of xidata - const char *const_name; // const data (code or not) - const char *cabs_name; // const absolute data (code or not) - const char *xabs_name; // absolute xdata/pdata - const char *iabs_name; // absolute idata/data + const char * const idata_name; + const char * const pdata_name; + const char * const xdata_name; + const char * const bit_name; + const char * const reg_name; + const char * const static_name; + const char * const overlay_name; + const char * const post_static_name; + const char * const home_name; + const char * const xidata_name; // initialized xdata + const char * const xinit_name; // a code copy of xidata + const char * const const_name; // const data (code or not) + const char * const cabs_name; // const absolute data (code or not) + const char * const xabs_name; // absolute xdata/pdata + const char * const iabs_name; // absolute idata/data 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 */