OLD | NEW |
1 /* Table of opcodes for the OpenRISC 1000 ISA. | 1 /* Table of opcodes for the OpenRISC 1000 ISA. |
2 Copyright 2002, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. | 2 Copyright 2002, 2004, 2005, 2007, 2008, 2009, 2012 |
| 3 Free Software Foundation, Inc. |
3 Contributed by Damjan Lampret (lampret@opencores.org). | 4 Contributed by Damjan Lampret (lampret@opencores.org). |
4 | 5 |
5 This file is part of the GNU opcodes library. | 6 This file is part of the GNU opcodes library. |
6 | 7 |
7 This library is free software; you can redistribute it and/or modify | 8 This library is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 3, or (at your option) | 10 the Free Software Foundation; either version 3, or (at your option) |
10 any later version. | 11 any later version. |
11 | 12 |
12 It is distributed in the hope that it will be useful, but WITHOUT | 13 It is distributed in the hope that it will be useful, but WITHOUT |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | 14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | 15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
15 License for more details. | 16 License for more details. |
16 | 17 |
17 You should have received a copy of the GNU General Public License | 18 You should have received a copy of the GNU General Public License |
18 along with this program; if not, write to the Free Software | 19 along with this program; if not, write to the Free Software |
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | 20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
20 MA 02110-1301, USA. */ | 21 MA 02110-1301, USA. */ |
21 | 22 |
22 /* We treat all letters the same in encode/decode routines so | 23 #include "sysdep.h" |
23 we need to assign some characteristics to them like signess etc. */ | |
24 #include <string.h> | 24 #include <string.h> |
25 #include <stdio.h> | 25 #include <stdio.h> |
26 #include <stdlib.h> | 26 #include <stdlib.h> |
27 #include "safe-ctype.h" | 27 #include "safe-ctype.h" |
28 #include "ansidecl.h" | 28 #include "ansidecl.h" |
29 #ifdef HAVE_CONFIG_H | |
30 # include "config.h" | |
31 #endif | |
32 #include "opcode/or32.h" | 29 #include "opcode/or32.h" |
33 | 30 |
| 31 /* We treat all letters the same in encode/decode routines so |
| 32 we need to assign some characteristics to them like signess etc. */ |
| 33 |
34 const struct or32_letter or32_letters[] = | 34 const struct or32_letter or32_letters[] = |
35 { | 35 { |
36 { 'A', NUM_UNSIGNED }, | 36 { 'A', NUM_UNSIGNED }, |
37 { 'B', NUM_UNSIGNED }, | 37 { 'B', NUM_UNSIGNED }, |
38 { 'D', NUM_UNSIGNED }, | 38 { 'D', NUM_UNSIGNED }, |
39 { 'I', NUM_SIGNED }, | 39 { 'I', NUM_SIGNED }, |
40 { 'K', NUM_UNSIGNED }, | 40 { 'K', NUM_UNSIGNED }, |
41 { 'L', NUM_UNSIGNED }, | 41 { 'L', NUM_UNSIGNED }, |
42 { 'N', NUM_SIGNED }, | 42 { 'N', NUM_SIGNED }, |
43 { '0', NUM_UNSIGNED }, | 43 { '0', NUM_UNSIGNED }, |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 { | 1022 { |
1023 char s_insn[20]; | 1023 char s_insn[20]; |
1024 | 1024 |
1025 /* This used to be %8x for binutils. */ | 1025 /* This used to be %8x for binutils. */ |
1026 sprintf (s_insn, ".word 0x%08lx", insn); | 1026 sprintf (s_insn, ".word 0x%08lx", insn); |
1027 strcat (disassembled, s_insn); | 1027 strcat (disassembled, s_insn); |
1028 } | 1028 } |
1029 | 1029 |
1030 return insn_len (insn); | 1030 return insn_len (insn); |
1031 } | 1031 } |
OLD | NEW |