Pristine Ack-5.5
[Ack-5.5.git] / mach / i86 / ce / as.h
1 #define UNKNOWN         0
2 #define IS_REG          0x1
3 #define IS_ACCU         0x2
4 #define IS_DATA         0x4
5 #define IS_LABEL        0x8
6 #define IS_MEM          0x10
7 #define IS_ADDR         0x20
8 #define IS_ILB          0x40
9
10 #define AX              0
11 #define BX              3
12 #define CL              1
13 #define SP              4
14 #define BP              5
15 #define SI              6
16 #define DI              7
17
18 #define REG( op)        ( op->type & IS_REG)
19 #define ACCU( op)       ( op->type & IS_REG  &&  op->reg == AX)
20 #define REG_CL( op)     ( op->type & IS_REG  &&  op->reg == CL)
21 #define DATA( op)       ( op->type & IS_DATA)
22 #define lABEL( op)      ( op->type & IS_LABEL)
23 #define ILB( op)        ( op->type & IS_ILB)
24 #define MEM( op)        ( op->type & IS_MEM)
25 #define ADDR( op)       ( op->type & IS_ADDR)
26 #define EADDR( op)      ( op->type & ( IS_ADDR | IS_MEM | IS_REG))
27 #define CONST1( op)     ( op->type & IS_DATA  && strcmp( "1", op->expr) == 0)
28 #define MOVS( op)       ( op->type & IS_LABEL&&strcmp("\"movs\"", op->lab) == 0)
29 #define IMMEDIATE( op)  ( op->type & ( IS_DATA | IS_LABEL))
30
31 #define TRUE            1
32 #define FALSE           0
33
34 struct t_operand {
35         unsigned type;
36         int reg;
37         char *expr, *lab, *off;
38        };
39
40 extern struct t_operand saved_op, *AX_oper;