Pristine Ack-5.5
[Ack-5.5.git] / mach / m68k2 / as / mach1.c
1 /* $Id: mach1.c,v 2.8 1994/06/24 13:02:42 ceriel Exp $ */
2 /*
3  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4  * See the copyright notice in the ACK home directory, in the file "Copyright".
5  */
6 /* @(#)mach1.c  1.8 */
7 /*
8  * Motorola 68000/68010 dependent C declarations
9  */
10
11 #define low3(z)         ((short)(z) & 07)
12 #define low4(z)         ((short)(z) & 017)
13 #define low7(z)         ((short)(z) & 0177)
14
15 #define fit3(z)         ((((z)-1) & ~((int)07)) == 0)
16 #define fit4(z)         (((z) & ~((int)017)) == 0)
17 #define fit7(z)         (((z) & ~((int)0177)) == 0)
18 #define sfit7(z)        (fit7((z)+64))
19 #define fit8(z)         (((z) & ~((int)0xFF)) == 0)
20 #define fit16(z)        (((z) & ~(0xFFFFL)) == 0)
21
22 #define SIZE_B          0000
23 #define SIZE_W          0100
24 #define SIZE_L          0200
25 #define SIZE_NON        0300
26 #define SIZE_DEF        SIZE_W
27
28 #define FSIZE_L         00
29 #define FSIZE_S         01
30 #define FSIZE_X         02
31 #define FSIZE_P         03
32 #define FSIZE_W         04
33 #define FSIZE_D         05
34 #define FSIZE_B         06
35
36 #define DEF_FP          01000   /* default floating point processor */
37 extern int      co_id;
38
39 extern int      mrg_1,mrg_2;
40 extern expr_t   exp_1,exp_2;
41 #ifndef ASLD
42 extern valu_t   rel_1,rel_2;
43 #endif
44 extern int      model;          /* 68000/68010 */
45 extern int      curr_instr;
46
47 /* addressing mode bits */
48 #define DTA             0x01
49 #define MEM             0x02
50 #define CTR             0x04
51 #define ALT             0x08
52 #define FITB            0x10
53 #define FITW            0x20
54 #define PUTW            0x40
55 #define PUTL            0x80
56
57 #ifndef extern
58 extern short    eamode[];
59 #else
60 short   eamode[] = {
61 /* 00A */       DTA        |ALT,
62 /* 01A */                   ALT,
63 /* 02A */       DTA|MEM|CTR|ALT,
64 /* 03A */       DTA|MEM    |ALT,
65 /* 04A */       DTA|MEM    |ALT,
66 /* 05A */       DTA|MEM|CTR|ALT|FITW|PUTW | (RELO2      )<<8,
67 /* 06A */       DTA|MEM|CTR|ALT     |PUTW | (RELO1      )<<8,
68 /* 07x */       0,
69 /* 070 */       DTA|MEM|CTR|ALT|FITW|PUTW | (RELO2      )<<8,
70 /* 071 */       DTA|MEM|CTR|ALT     |PUTL | (RELO4      )<<8,
71 /* 072 */       DTA|MEM|CTR    |FITW|PUTW | (RELO2|RELPC)<<8,
72 /* 073 */       DTA|MEM|CTR         |PUTW | (RELO1|RELPC)<<8,
73 /* 074x */      0,
74 /* 074B */      DTA|MEM        |FITB|PUTW | (RELO1      )<<8,
75 /* 074W */      DTA|MEM        |FITW|PUTW | (RELO2      )<<8,
76 /* 074L */      DTA|MEM             |PUTL | (RELO4      )<<8,
77 };
78 #endif