Commit | Line | Data |
---|---|---|
c906108c SS |
1 | /* dbg_cp.h -- ARMulator debug interface: ARM6 Instruction Emulator. |
2 | Copyright (C) 1994 Advanced RISC Machines Ltd. | |
454de2ee | 3 | |
c906108c SS |
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 | |
3fd725ef | 6 | the Free Software Foundation; either version 3 of the License, or |
c906108c | 7 | (at your option) any later version. |
454de2ee | 8 | |
c906108c SS |
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. | |
454de2ee | 13 | |
c906108c | 14 | You should have received a copy of the GNU General Public License |
51b318de | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
c906108c SS |
16 | |
17 | #ifndef Dbg_CP__h | |
18 | ||
19 | #define Dbg_CP__h | |
20 | ||
21 | #define Dbg_Access_Readable 1 | |
22 | #define Dbg_Access_Writable 2 | |
dfcd3bfb | 23 | #define Dbg_Access_CPDT 4 /* else CPRT */ |
c906108c | 24 | |
dfcd3bfb JM |
25 | typedef struct |
26 | { | |
27 | unsigned short rmin, rmax; | |
28 | /* a single description can be used for a range of registers with | |
29 | the same properties *accessed via CPDT instructions* | |
30 | */ | |
31 | unsigned char nbytes; /* size of register */ | |
32 | unsigned char access; /* see above (Access_xxx) */ | |
33 | union | |
34 | { | |
35 | struct | |
36 | { | |
37 | /* CPDT instructions do not allow the coprocessor much freedom: | |
38 | only bit 22 ('N') and 12-15 ('CRd') are free for the | |
39 | coprocessor to use as it sees fit. */ | |
40 | unsigned char nbit; | |
41 | unsigned char rdbits; | |
42 | } | |
43 | cpdt; | |
44 | struct | |
45 | { | |
46 | /* CPRT instructions have much more latitude. The bits fixed | |
47 | by the ARM are 24..31 (condition mask & opcode) | |
48 | 20 (direction) | |
49 | 8..15 (cpnum, arm register) | |
50 | 4 (CPRT not CPDO) | |
51 | leaving 14 bits free to the coprocessor (fortunately | |
52 | falling within two bytes). */ | |
53 | unsigned char read_b0, read_b1, write_b0, write_b1; | |
54 | } | |
55 | cprt; | |
56 | } | |
57 | accessinst; | |
58 | } | |
59 | Dbg_CoProRegDesc; | |
c906108c | 60 | |
dfcd3bfb JM |
61 | struct Dbg_CoProDesc |
62 | { | |
63 | int entries; | |
64 | Dbg_CoProRegDesc regdesc[1 /* really nentries */ ]; | |
c906108c SS |
65 | }; |
66 | ||
67 | #define Dbg_CoProDesc_Size(n) (sizeof(struct Dbg_CoProDesc) + (n-1)*sizeof(Dbg_CoProRegDesc)) | |
68 | ||
69 | #endif |