Imported Upstream version 2.9.0
[debian/cc1111] / src / z80 / z80.h
1 /** @file z80/z80.h
2     Common definitions between the z80 and gbz80 parts.
3 */
4 #include "common.h"
5 #include "ralloc.h"
6 #include "gen.h"
7 #include "peep.h"
8 #include "support.h"
9
10 typedef enum
11   {
12     SUB_Z80,
13     SUB_GBZ80
14   }
15 Z80_SUB_PORT;
16
17 typedef struct
18   {
19     Z80_SUB_PORT sub;
20     int calleeSavesBC;
21     int port_mode;
22     int port_back;
23   }
24 Z80_OPTS;
25
26 extern Z80_OPTS z80_opts;
27
28 #define IS_GB  (z80_opts.sub == SUB_GBZ80)
29 #define IS_Z80 (z80_opts.sub == SUB_Z80)
30
31 enum
32   {
33     ACCUSE_A = 1,
34     ACCUSE_SCRATCH,
35     ACCUSE_IY
36   };