Commit | Line | Data |
---|---|---|
c906108c SS |
1 | /* dbg_cp.h -- ARMulator debug interface: ARM6 Instruction Emulator. |
2 | Copyright (C) 1994 Advanced RISC Machines Ltd. | |
3 | ||
4 | This program is free software; you can redistribute it and/or modify | |
5 | it under the terms of the GNU General Public License as published by | |
6 | the Free Software Foundation; either version 2 of the License, or | |
7 | (at your option) any later version. | |
8 | ||
9 | This program is distributed in the hope that it will be useful, | |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | GNU General Public License for more details. | |
13 | ||
14 | You should have received a copy of the GNU General Public License | |
15 | along with this program; if not, write to the Free Software | |
16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | |
17 | ||
18 | #ifndef Dbg_CP__h | |
19 | ||
20 | #define Dbg_CP__h | |
21 | ||
22 | #define Dbg_Access_Readable 1 | |
23 | #define Dbg_Access_Writable 2 | |
dfcd3bfb | 24 | #define Dbg_Access_CPDT 4 /* else CPRT */ |
c906108c | 25 | |
dfcd3bfb JM |
26 | typedef struct |
27 | { | |
28 | unsigned short rmin, rmax; | |
29 | /* a single description can be used for a range of registers with | |
30 | the same properties *accessed via CPDT instructions* | |
31 | */ | |
32 | unsigned char nbytes; /* size of register */ | |
33 | unsigned char access; /* see above (Access_xxx) */ | |
34 | union | |
35 | { | |
36 | struct | |
37 | { | |
38 | /* CPDT instructions do not allow the coprocessor much freedom: | |
39 | only bit 22 ('N') and 12-15 ('CRd') are free for the | |
40 | coprocessor to use as it sees fit. */ | |
41 | unsigned char nbit; | |
42 | unsigned char rdbits; | |
43 | } | |
44 | cpdt; | |
45 | struct | |
46 | { | |
47 | /* CPRT instructions have much more latitude. The bits fixed | |
48 | by the ARM are 24..31 (condition mask & opcode) | |
49 | 20 (direction) | |
50 | 8..15 (cpnum, arm register) | |
51 | 4 (CPRT not CPDO) | |
52 | leaving 14 bits free to the coprocessor (fortunately | |
53 | falling within two bytes). */ | |
54 | unsigned char read_b0, read_b1, write_b0, write_b1; | |
55 | } | |
56 | cprt; | |
57 | } | |
58 | accessinst; | |
59 | } | |
60 | Dbg_CoProRegDesc; | |
c906108c | 61 | |
dfcd3bfb JM |
62 | struct Dbg_CoProDesc |
63 | { | |
64 | int entries; | |
65 | Dbg_CoProRegDesc regdesc[1 /* really nentries */ ]; | |
c906108c SS |
66 | }; |
67 | ||
68 | #define Dbg_CoProDesc_Size(n) (sizeof(struct Dbg_CoProDesc) + (n-1)*sizeof(Dbg_CoProRegDesc)) | |
69 | ||
70 | #endif |