Commit | Line | Data |
---|---|---|
2fbad815 | 1 | /* Disassembler definitions for ARM. |
252b5132 | 2 | |
0dd132b6 | 3 | Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004 |
060d22b0 | 4 | Free Software Foundation, Inc. |
252b5132 RH |
5 | |
6 | This program is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2, or (at your option) | |
9 | any later version. | |
10 | ||
11 | This program is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with this program; if not, write to the Free Software | |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | |
19 | ||
20 | ||
0dd132b6 NC |
21 | struct arm_opcode |
22 | { | |
2fbad815 RE |
23 | unsigned long arch; /* Architecture defining this insn. */ |
24 | unsigned long value, mask; /* Recognise insn if (op&mask)==value. */ | |
25 | char *assembler; /* How to disassemble this insn. */ | |
252b5132 RH |
26 | }; |
27 | ||
28 | struct thumb_opcode | |
29 | { | |
2fbad815 RE |
30 | unsigned long arch; /* Architecture defining this insn. */ |
31 | unsigned short value, mask; /* Recognise insn if (op&mask)==value. */ | |
32 | char * assembler; /* How to disassemble this insn. */ | |
252b5132 RH |
33 | }; |
34 | ||
252b5132 RH |
35 | |
36 | #define BDISP(x) ((((x) & 0xffffff) ^ 0x800000) - 0x800000) /* 26 bit */ | |
37 | ||
252b5132 RH |
38 | #define BDISP23(x) ((((((x) & 0x07ff) << 11) | (((x) & 0x07ff0000) >> 16)) \ |
39 | ^ 0x200000) - 0x200000) /* 23bit */ | |
40 |