| 1 | /* Intel I860 opcde list for GDB, the GNU debugger. |
| 2 | Copyright (C) 1986, 1987 Free Software Foundation, Inc. |
| 3 | |
| 4 | GDB is distributed in the hope that it will be useful, but WITHOUT ANY |
| 5 | WARRANTY. No author or distributor accepts responsibility to anyone |
| 6 | for the consequences of using it or for whether it serves any |
| 7 | particular purpose or works at all, unless he says so in writing. |
| 8 | Refer to the GDB General Public License for full details. |
| 9 | |
| 10 | Everyone is granted permission to copy, modify and redistribute GDB, |
| 11 | but only under the conditions described in the GDB General Public |
| 12 | License. A copy of this license is supposed to have been given to you |
| 13 | along with GDB so you can know your rights and responsibilities. It |
| 14 | should be in a file named COPYING. Among other things, the copyright |
| 15 | notice and this notice must be preserved on all copies. |
| 16 | |
| 17 | In other words, go ahead and share GDB, but don't try to stop |
| 18 | anyone else from sharing it farther. Help stamp out software hoarding! |
| 19 | */ |
| 20 | |
| 21 | #ifdef BIG_ENDIAN |
| 22 | struct gen_fmt |
| 23 | { |
| 24 | unsigned op1 : 6; |
| 25 | unsigned src2 : 5; |
| 26 | unsigned dest : 5; |
| 27 | unsigned src1 : 5; |
| 28 | unsigned offset : 11; |
| 29 | }; |
| 30 | |
| 31 | struct geni_fmt |
| 32 | { |
| 33 | unsigned op1 : 6; |
| 34 | unsigned src2 : 5; |
| 35 | unsigned dest : 5; |
| 36 | unsigned offset : 16; |
| 37 | }; |
| 38 | |
| 39 | struct esc_fmt |
| 40 | { |
| 41 | unsigned op1 : 6; |
| 42 | unsigned res1 : 10; |
| 43 | unsigned src1 : 5; |
| 44 | unsigned res2 : 6; |
| 45 | unsigned op2 : 5; |
| 46 | }; |
| 47 | struct ctrl_fmt |
| 48 | { |
| 49 | unsigned op1 : 6; |
| 50 | unsigned int offset : 26; |
| 51 | }; |
| 52 | |
| 53 | struct fp_fmt |
| 54 | { |
| 55 | unsigned op1 : 6; |
| 56 | unsigned src2 : 5; |
| 57 | unsigned dest : 5; |
| 58 | unsigned src1 : 5; |
| 59 | unsigned p : 1; |
| 60 | unsigned d : 1; |
| 61 | unsigned s : 1; |
| 62 | unsigned r : 1; |
| 63 | unsigned op2 : 7; |
| 64 | }; |
| 65 | |
| 66 | union insn_fmt |
| 67 | { |
| 68 | struct gen_fmt gen; |
| 69 | struct geni_fmt geni; |
| 70 | struct esc_fmt esc; |
| 71 | struct ctrl_fmt ctrl; |
| 72 | struct fp_fmt fp; |
| 73 | long int_val; |
| 74 | }; |
| 75 | #else |
| 76 | struct gen_fmt |
| 77 | { |
| 78 | unsigned offset : 11; |
| 79 | unsigned src1 : 5; |
| 80 | unsigned dest : 5; |
| 81 | unsigned src2 : 5; |
| 82 | unsigned op1 : 6; |
| 83 | }; |
| 84 | |
| 85 | struct geni_fmt |
| 86 | { |
| 87 | unsigned offset : 16; |
| 88 | unsigned dest : 5; |
| 89 | unsigned src2 : 5; |
| 90 | unsigned op1 : 6; |
| 91 | }; |
| 92 | |
| 93 | struct esc_fmt |
| 94 | { |
| 95 | unsigned op2 : 5; |
| 96 | unsigned res2 : 6; |
| 97 | unsigned src1 : 5; |
| 98 | unsigned res1 : 10; |
| 99 | unsigned op1 : 6; |
| 100 | }; |
| 101 | struct ctrl_fmt |
| 102 | { |
| 103 | unsigned int offset : 26; |
| 104 | unsigned op1 : 6; |
| 105 | }; |
| 106 | |
| 107 | struct fp_fmt |
| 108 | { |
| 109 | unsigned op2 : 7; |
| 110 | unsigned r : 1; |
| 111 | unsigned s : 1; |
| 112 | unsigned d : 1; |
| 113 | unsigned p : 1; |
| 114 | unsigned src1 : 5; |
| 115 | unsigned dest : 5; |
| 116 | unsigned src2 : 5; |
| 117 | unsigned op1 : 6; |
| 118 | }; |
| 119 | |
| 120 | union insn_fmt |
| 121 | { |
| 122 | struct gen_fmt gen; |
| 123 | struct geni_fmt geni; |
| 124 | struct esc_fmt esc; |
| 125 | struct ctrl_fmt ctrl; |
| 126 | struct fp_fmt fp; |
| 127 | long int_val; |
| 128 | }; |
| 129 | #endif |
| 130 | |
| 131 | typedef enum |
| 132 | { |
| 133 | Error, not_branch, uncond, uncond_d, cond, cond_d |
| 134 | } branch_type; |