X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fz80%2Fz80.h;h=0be5418ae559468c2a6192a71c3ca9d90f7a3eee;hb=fd94924a3d743c1c82f4b370d9401d7239172789;hp=31116900072cf7f99a8d180ebd7df2df2d942c76;hpb=642a343b925965aa06211d624dc4cb0063c2bcfb;p=fw%2Fsdcc diff --git a/src/z80/z80.h b/src/z80/z80.h index 31116900..0be5418a 100644 --- a/src/z80/z80.h +++ b/src/z80/z80.h @@ -3,22 +3,34 @@ */ #include "common.h" #include "ralloc.h" +#include "gen.h" +#include "peep.h" +#include "support.h" -typedef enum { +typedef enum + { SUB_Z80, SUB_GBZ80 -} Z80_SUB_PORT; + } +Z80_SUB_PORT; -typedef struct { +typedef struct + { Z80_SUB_PORT sub; -} Z80_OPTS; + int calleeSavesBC; + int port_mode; + int port_back; + } +Z80_OPTS; extern Z80_OPTS z80_opts; -#define wassertl(a,s) (a) ? 0 : \ - werror (E_INTERNAL_ERROR,__FILE__,__LINE__, s) - -#define wassert(a) wassertl(a,"code generator internal error") - #define IS_GB (z80_opts.sub == SUB_GBZ80) +#define IS_Z80 (z80_opts.sub == SUB_Z80) +enum + { + ACCUSE_A = 1, + ACCUSE_SCRATCH, + ACCUSE_IY + };