]>
Commit | Line | Data |
---|---|---|
2494eaf6 SC |
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., 675 Mass Ave, Cambridge, MA 02139, 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 | |
24 | #define Dbg_Access_CPDT 4 /* else CPRT */ | |
25 | ||
26 | typedef struct { | |
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 | struct { /* CPDT instructions do not allow the coprocessor much freedom: | |
35 | only bit 22 ('N') and 12-15 ('CRd') are free for the | |
36 | coprocessor to use as it sees fit. | |
37 | */ | |
38 | unsigned char nbit; | |
39 | unsigned char rdbits; | |
40 | } cpdt; | |
41 | struct { /* CPRT instructions have much more latitude. The bits fixed | |
42 | by the ARM are 24..31 (condition mask & opcode) | |
43 | 20 (direction) | |
44 | 8..15 (cpnum, arm register) | |
45 | 4 (CPRT not CPDO) | |
46 | leaving 14 bits free to the coprocessor (fortunately | |
47 | falling within two bytes). | |
48 | */ | |
49 | unsigned char read_b0, read_b1, | |
50 | write_b0, write_b1; | |
51 | } cprt; | |
52 | } accessinst; | |
53 | } Dbg_CoProRegDesc; | |
54 | ||
55 | struct Dbg_CoProDesc { | |
56 | int entries; | |
57 | Dbg_CoProRegDesc regdesc[1/* really nentries */]; | |
58 | }; | |
59 | ||
60 | #define Dbg_CoProDesc_Size(n) (sizeof(struct Dbg_CoProDesc) + (n-1)*sizeof(Dbg_CoProRegDesc)) | |
61 | ||
62 | #endif |