1 1.1 christos /* Assemble Matsushita MN10200 instructions. 2 1.10 christos Copyright (C) 1996-2025 Free Software Foundation, Inc. 3 1.1 christos 4 1.1 christos This file is part of the GNU opcodes library. 5 1.1 christos 6 1.1 christos This library is free software; you can redistribute it and/or modify 7 1.1 christos it under the terms of the GNU General Public License as published by 8 1.1 christos the Free Software Foundation; either version 3, or (at your option) 9 1.1 christos any later version. 10 1.1 christos 11 1.1 christos It is distributed in the hope that it will be useful, but WITHOUT 12 1.1 christos ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 1.1 christos or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 14 1.1 christos License for more details. 15 1.1 christos 16 1.1 christos You should have received a copy of the GNU General Public License 17 1.1 christos along with this program; if not, write to the Free Software 18 1.1 christos Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 19 1.1 christos MA 02110-1301, USA. */ 20 1.1 christos 21 1.1 christos #include "sysdep.h" 22 1.1 christos #include "opcode/mn10200.h" 23 1.1 christos 24 1.1 christos 25 1.1 christos const struct mn10200_operand mn10200_operands[] = { 27 1.3 christos #define UNUSED 0 28 1.1 christos {0, 0, 0}, 29 1.1 christos 30 1.1 christos /* dn register in the first register operand position. */ 31 1.1 christos #define DN0 (UNUSED+1) 32 1.1 christos {2, 0, MN10200_OPERAND_DREG}, 33 1.1 christos 34 1.1 christos /* dn register in the second register operand position. */ 35 1.1 christos #define DN1 (DN0+1) 36 1.1 christos {2, 2, MN10200_OPERAND_DREG}, 37 1.1 christos 38 1.1 christos /* dm register in the first register operand position. */ 39 1.1 christos #define DM0 (DN1+1) 40 1.1 christos {2, 0, MN10200_OPERAND_DREG}, 41 1.1 christos 42 1.1 christos /* dm register in the second register operand position. */ 43 1.1 christos #define DM1 (DM0+1) 44 1.1 christos {2, 2, MN10200_OPERAND_DREG}, 45 1.1 christos 46 1.1 christos /* an register in the first register operand position. */ 47 1.1 christos #define AN0 (DM1+1) 48 1.1 christos {2, 0, MN10200_OPERAND_AREG}, 49 1.1 christos 50 1.1 christos /* an register in the second register operand position. */ 51 1.1 christos #define AN1 (AN0+1) 52 1.1 christos {2, 2, MN10200_OPERAND_AREG}, 53 1.1 christos 54 1.1 christos /* am register in the first register operand position. */ 55 1.1 christos #define AM0 (AN1+1) 56 1.1 christos {2, 0, MN10200_OPERAND_AREG}, 57 1.1 christos 58 1.1 christos /* am register in the second register operand position. */ 59 1.1 christos #define AM1 (AM0+1) 60 1.1 christos {2, 2, MN10200_OPERAND_AREG}, 61 1.1 christos 62 1.1 christos /* 8 bit unsigned immediate which may promote to a 16bit 63 1.1 christos unsigned immediate. */ 64 1.1 christos #define IMM8 (AM1+1) 65 1.1 christos {8, 0, MN10200_OPERAND_PROMOTE}, 66 1.1 christos 67 1.1 christos /* 16 bit unsigned immediate which may promote to a 32bit 68 1.1 christos unsigned immediate. */ 69 1.1 christos #define IMM16 (IMM8+1) 70 1.1 christos {16, 0, MN10200_OPERAND_PROMOTE}, 71 1.1 christos 72 1.1 christos /* 16 bit pc-relative immediate which may promote to a 16bit 73 1.1 christos pc-relative immediate. */ 74 1.1 christos #define IMM16_PCREL (IMM16+1) 75 1.1 christos {16, 0, MN10200_OPERAND_PCREL | MN10200_OPERAND_RELAX | MN10200_OPERAND_SIGNED}, 76 1.1 christos 77 1.1 christos /* 16bit unsigned dispacement in a memory operation which 78 1.1 christos may promote to a 32bit displacement. */ 79 1.1 christos #define IMM16_MEM (IMM16_PCREL+1) 80 1.1 christos {16, 0, MN10200_OPERAND_PROMOTE | MN10200_OPERAND_MEMADDR}, 81 1.1 christos 82 1.1 christos /* 24 immediate, low 16 bits in the main instruction 83 1.1 christos word, 8 in the extension word. */ 84 1.1 christos 85 1.1 christos #define IMM24 (IMM16_MEM+1) 86 1.1 christos {24, 0, MN10200_OPERAND_EXTENDED}, 87 1.1 christos 88 1.1 christos /* 32bit pc-relative offset. */ 89 1.1 christos #define IMM24_PCREL (IMM24+1) 90 1.1 christos {24, 0, MN10200_OPERAND_EXTENDED | MN10200_OPERAND_PCREL | MN10200_OPERAND_SIGNED}, 91 1.1 christos 92 1.1 christos /* 32bit memory offset. */ 93 1.1 christos #define IMM24_MEM (IMM24_PCREL+1) 94 1.1 christos {24, 0, MN10200_OPERAND_EXTENDED | MN10200_OPERAND_MEMADDR}, 95 1.1 christos 96 1.1 christos /* Processor status word. */ 97 1.1 christos #define PSW (IMM24_MEM+1) 98 1.1 christos {0, 0, MN10200_OPERAND_PSW}, 99 1.1 christos 100 1.1 christos /* MDR register. */ 101 1.1 christos #define MDR (PSW+1) 102 1.1 christos {0, 0, MN10200_OPERAND_MDR}, 103 1.1 christos 104 1.1 christos /* Index register. */ 105 1.1 christos #define DI (MDR+1) 106 1.1 christos {2, 4, MN10200_OPERAND_DREG}, 107 1.1 christos 108 1.1 christos /* 8 bit signed displacement, may promote to 16bit signed dispacement. */ 109 1.1 christos #define SD8 (DI+1) 110 1.1 christos {8, 0, MN10200_OPERAND_SIGNED | MN10200_OPERAND_PROMOTE}, 111 1.1 christos 112 1.1 christos /* 16 bit signed displacement, may promote to 32bit dispacement. */ 113 1.1 christos #define SD16 (SD8+1) 114 1.1 christos {16, 0, MN10200_OPERAND_SIGNED | MN10200_OPERAND_PROMOTE}, 115 1.1 christos 116 1.1 christos /* 8 bit pc-relative displacement. */ 117 1.1 christos #define SD8N_PCREL (SD16+1) 118 1.1 christos {8, 0, MN10200_OPERAND_SIGNED | MN10200_OPERAND_PCREL | MN10200_OPERAND_RELAX}, 119 1.1 christos 120 1.1 christos /* 8 bit signed immediate which may promote to 16bit signed immediate. */ 121 1.1 christos #define SIMM8 (SD8N_PCREL+1) 122 1.1 christos {8, 0, MN10200_OPERAND_SIGNED | MN10200_OPERAND_PROMOTE}, 123 1.1 christos 124 1.1 christos /* 16 bit signed immediate which may promote to 32bit immediate. */ 125 1.1 christos #define SIMM16 (SIMM8+1) 126 1.1 christos {16, 0, MN10200_OPERAND_SIGNED | MN10200_OPERAND_PROMOTE}, 127 1.1 christos 128 1.1 christos /* 16 bit signed immediate which may not promote. */ 129 1.1 christos #define SIMM16N (SIMM16+1) 130 1.1 christos {16, 0, MN10200_OPERAND_SIGNED | MN10200_OPERAND_NOCHECK}, 131 1.1 christos 132 1.1 christos /* Either an open paren or close paren. */ 133 1.3 christos #define PAREN (SIMM16N+1) 134 1.1 christos {0, 0, MN10200_OPERAND_PAREN}, 135 1.1 christos 136 1.1 christos /* dn register that appears in the first and second register positions. */ 137 1.1 christos #define DN01 (PAREN+1) 138 1.1 christos {2, 0, MN10200_OPERAND_DREG | MN10200_OPERAND_REPEATED}, 139 1.1 christos 140 1.1 christos /* an register that appears in the first and second register positions. */ 141 1.1 christos #define AN01 (DN01+1) 142 1.3 christos {2, 0, MN10200_OPERAND_AREG | MN10200_OPERAND_REPEATED}, 143 1.1 christos } ; 144 1.3 christos 145 1.3 christos #define MEM(ADDR) PAREN, ADDR, PAREN 146 1.1 christos #define MEM2(ADDR1,ADDR2) PAREN, ADDR1, ADDR2, PAREN 147 1.1 christos 148 1.1 christos /* The opcode table. 150 1.1 christos 151 1.1 christos The format of the opcode table is: 152 1.1 christos 153 1.1 christos NAME OPCODE MASK { OPERANDS } 154 1.1 christos 155 1.1 christos NAME is the name of the instruction. 156 1.1 christos OPCODE is the instruction opcode. 157 1.1 christos MASK is the opcode mask; this is used to tell the disassembler 158 1.1 christos which bits in the actual opcode must match OPCODE. 159 1.1 christos OPERANDS is the list of operands. 160 1.1 christos 161 1.1 christos The disassembler reads the table in order and prints the first 162 1.1 christos instruction which matches, so this table is sorted to put more 163 1.1 christos specific instructions before more general instructions. It is also 164 1.1 christos sorted by major opcode. */ 165 1.1 christos 166 1.1 christos const struct mn10200_opcode mn10200_opcodes[] = { 167 1.1 christos { "mov", 0x8000, 0xf000, FMT_2, {SIMM8, DN01}}, 168 1.1 christos { "mov", 0x80, 0xf0, FMT_1, {DN1, DM0}}, 169 1.1 christos { "mov", 0xf230, 0xfff0, FMT_4, {DM1, AN0}}, 170 1.1 christos { "mov", 0xf2f0, 0xfff0, FMT_4, {AN1, DM0}}, 171 1.1 christos { "mov", 0xf270, 0xfff0, FMT_4, {AN1, AM0}}, 172 1.1 christos { "mov", 0xf3f0, 0xfffc, FMT_4, {PSW, DN0}}, 173 1.1 christos { "mov", 0xf3d0, 0xfff3, FMT_4, {DN1, PSW}}, 174 1.1 christos { "mov", 0xf3e0, 0xfffc, FMT_4, {MDR, DN0}}, 175 1.1 christos { "mov", 0xf3c0, 0xfff3, FMT_4, {DN1, MDR}}, 176 1.1 christos { "mov", 0x20, 0xf0, FMT_1, {MEM(AN1), DM0}}, 177 1.1 christos { "mov", 0x6000, 0xf000, FMT_2, {MEM2(SD8, AN1), DM0}}, 178 1.1 christos { "mov", 0xf7c00000, 0xfff00000, FMT_6, {MEM2(SD16, AN1), DM0}}, 179 1.1 christos { "mov", 0xf4800000, 0xfff00000, FMT_7, {MEM2(IMM24,AN1), DM0}}, 180 1.1 christos { "mov", 0xf140, 0xffc0, FMT_4, {MEM2(DI, AN1), DM0}}, 181 1.1 christos { "mov", 0xc80000, 0xfc0000, FMT_3, {MEM(IMM16_MEM), DN0}}, 182 1.1 christos { "mov", 0xf4c00000, 0xfffc0000, FMT_7, {MEM(IMM24_MEM), DN0}}, 183 1.1 christos { "mov", 0x7000, 0xf000, FMT_2, {MEM2(SD8,AN1), AM0}}, 184 1.1 christos { "mov", 0x7000, 0xf000, FMT_2, {MEM(AN1), AM0}}, 185 1.1 christos { "mov", 0xf7b00000, 0xfff00000, FMT_6, {MEM2(SD16, AN1), AM0}}, 186 1.1 christos { "mov", 0xf4f00000, 0xfff00000, FMT_7, {MEM2(IMM24,AN1), AM0}}, 187 1.1 christos { "mov", 0xf100, 0xffc0, FMT_4, {MEM2(DI, AN1), AM0}}, 188 1.1 christos { "mov", 0xf7300000, 0xfffc0000, FMT_6, {MEM(IMM16_MEM), AN0}}, 189 1.1 christos { "mov", 0xf4d00000, 0xfffc0000, FMT_7, {MEM(IMM24_MEM), AN0}}, 190 1.1 christos { "mov", 0x00, 0xf0, FMT_1, {DM0, MEM(AN1)}}, 191 1.1 christos { "mov", 0x4000, 0xf000, FMT_2, {DM0, MEM2(SD8, AN1)}}, 192 1.1 christos { "mov", 0xf7800000, 0xfff00000, FMT_6, {DM0, MEM2(SD16, AN1)}}, 193 1.1 christos { "mov", 0xf4000000, 0xfff00000, FMT_7, {DM0, MEM2(IMM24, AN1)}}, 194 1.1 christos { "mov", 0xf1c0, 0xffc0, FMT_4, {DM0, MEM2(DI, AN1)}}, 195 1.1 christos { "mov", 0xc00000, 0xfc0000, FMT_3, {DN0, MEM(IMM16_MEM)}}, 196 1.1 christos { "mov", 0xf4400000, 0xfffc0000, FMT_7, {DN0, MEM(IMM24_MEM)}}, 197 1.1 christos { "mov", 0x5000, 0xf000, FMT_2, {AM0, MEM2(SD8, AN1)}}, 198 1.1 christos { "mov", 0x5000, 0xf000, FMT_2, {AM0, MEM(AN1)}}, 199 1.1 christos { "mov", 0xf7a00000, 0xfff00000, FMT_6, {AM0, MEM2(SD16, AN1)}}, 200 1.1 christos { "mov", 0xf4100000, 0xfff00000, FMT_7, {AM0, MEM2(IMM24,AN1)}}, 201 1.1 christos { "mov", 0xf180, 0xffc0, FMT_4, {AM0, MEM2(DI, AN1)}}, 202 1.1 christos { "mov", 0xf7200000, 0xfffc0000, FMT_6, {AN0, MEM(IMM16_MEM)}}, 203 1.1 christos { "mov", 0xf4500000, 0xfffc0000, FMT_7, {AN0, MEM(IMM24_MEM)}}, 204 1.1 christos { "mov", 0xf80000, 0xfc0000, FMT_3, {SIMM16, DN0}}, 205 1.1 christos { "mov", 0xf4700000, 0xfffc0000, FMT_7, {IMM24, DN0}}, 206 1.1 christos { "mov", 0xdc0000, 0xfc0000, FMT_3, {IMM16, AN0}}, 207 1.1 christos { "mov", 0xf4740000, 0xfffc0000, FMT_7, {IMM24, AN0}}, 208 1.1 christos 209 1.1 christos { "movx", 0xf57000, 0xfff000, FMT_5, {MEM2(SD8, AN1), DM0}}, 210 1.1 christos { "movx", 0xf7700000, 0xfff00000, FMT_6, {MEM2(SD16, AN1), DM0}}, 211 1.1 christos { "movx", 0xf4b00000, 0xfff00000, FMT_7, {MEM2(IMM24,AN1), DM0}}, 212 1.1 christos { "movx", 0xf55000, 0xfff000, FMT_5, {DM0, MEM2(SD8, AN1)}}, 213 1.1 christos { "movx", 0xf7600000, 0xfff00000, FMT_6, {DM0, MEM2(SD16, AN1)}}, 214 1.1 christos { "movx", 0xf4300000, 0xfff00000, FMT_7, {DM0, MEM2(IMM24, AN1)}}, 215 1.1 christos 216 1.1 christos { "movb", 0xf52000, 0xfff000, FMT_5, {MEM2(SD8, AN1), DM0}}, 217 1.1 christos { "movb", 0xf7d00000, 0xfff00000, FMT_6, {MEM2(SD16, AN1), DM0}}, 218 1.1 christos { "movb", 0xf4a00000, 0xfff00000, FMT_7, {MEM2(IMM24,AN1), DM0}}, 219 1.1 christos { "movb", 0xf040, 0xffc0, FMT_4, {MEM2(DI, AN1), DM0}}, 220 1.1 christos { "movb", 0xf4c40000, 0xfffc0000, FMT_7, {MEM(IMM24_MEM), DN0}}, 221 1.1 christos { "movb", 0x10, 0xf0, FMT_1, {DM0, MEM(AN1)}}, 222 1.1 christos { "movb", 0xf51000, 0xfff000, FMT_5, {DM0, MEM2(SD8, AN1)}}, 223 1.1 christos { "movb", 0xf7900000, 0xfff00000, FMT_6, {DM0, MEM2(SD16, AN1)}}, 224 1.1 christos { "movb", 0xf4200000, 0xfff00000, FMT_7, {DM0, MEM2(IMM24, AN1)}}, 225 1.1 christos { "movb", 0xf0c0, 0xffc0, FMT_4, {DM0, MEM2(DI, AN1)}}, 226 1.1 christos { "movb", 0xc40000, 0xfc0000, FMT_3, {DN0, MEM(IMM16_MEM)}}, 227 1.1 christos { "movb", 0xf4440000, 0xfffc0000, FMT_7, {DN0, MEM(IMM24_MEM)}}, 228 1.1 christos 229 1.1 christos { "movbu", 0x30, 0xf0, FMT_1, {MEM(AN1), DM0}}, 230 1.1 christos { "movbu", 0xf53000, 0xfff000, FMT_5, {MEM2(SD8, AN1), DM0}}, 231 1.1 christos { "movbu", 0xf7500000, 0xfff00000, FMT_6, {MEM2(SD16, AN1), DM0}}, 232 1.1 christos { "movbu", 0xf4900000, 0xfff00000, FMT_7, {MEM2(IMM24,AN1), DM0}}, 233 1.1 christos { "movbu", 0xf080, 0xffc0, FMT_4, {MEM2(DI, AN1), DM0}}, 234 1.1 christos { "movbu", 0xcc0000, 0xfc0000, FMT_3, {MEM(IMM16_MEM), DN0}}, 235 1.1 christos { "movbu", 0xf4c80000, 0xfffc0000, FMT_7, {MEM(IMM24_MEM), DN0}}, 236 1.1 christos 237 1.1 christos { "ext", 0xf3c1, 0xfff3, FMT_4, {DN1}}, 238 1.1 christos { "extx", 0xb0, 0xfc, FMT_1, {DN0}}, 239 1.1 christos { "extxu", 0xb4, 0xfc, FMT_1, {DN0}}, 240 1.1 christos { "extxb", 0xb8, 0xfc, FMT_1, {DN0}}, 241 1.1 christos { "extxbu", 0xbc, 0xfc, FMT_1, {DN0}}, 242 1.1 christos 243 1.1 christos { "add", 0x90, 0xf0, FMT_1, {DN1, DM0}}, 244 1.1 christos { "add", 0xf200, 0xfff0, FMT_4, {DM1, AN0}}, 245 1.1 christos { "add", 0xf2c0, 0xfff0, FMT_4, {AN1, DM0}}, 246 1.1 christos { "add", 0xf240, 0xfff0, FMT_4, {AN1, AM0}}, 247 1.1 christos { "add", 0xd400, 0xfc00, FMT_2, {SIMM8, DN0}}, 248 1.1 christos { "add", 0xf7180000, 0xfffc0000, FMT_6, {SIMM16, DN0}}, 249 1.1 christos { "add", 0xf4600000, 0xfffc0000, FMT_7, {IMM24, DN0}}, 250 1.1 christos { "add", 0xd000, 0xfc00, FMT_2, {SIMM8, AN0}}, 251 1.1 christos { "add", 0xf7080000, 0xfffc0000, FMT_6, {SIMM16, AN0}}, 252 1.1 christos { "add", 0xf4640000, 0xfffc0000, FMT_7, {IMM24, AN0}}, 253 1.1 christos { "addc", 0xf280, 0xfff0, FMT_4, {DN1, DM0}}, 254 1.1 christos { "addnf", 0xf50c00, 0xfffc00, FMT_5, {SIMM8, AN0}}, 255 1.1 christos 256 1.1 christos { "sub", 0xa0, 0xf0, FMT_1, {DN1, DM0}}, 257 1.1 christos { "sub", 0xf210, 0xfff0, FMT_4, {DN1, AN0}}, 258 1.1 christos { "sub", 0xf2d0, 0xfff0, FMT_4, {AN1, DM0}}, 259 1.1 christos { "sub", 0xf250, 0xfff0, FMT_4, {AN1, AM0}}, 260 1.1 christos { "sub", 0xf71c0000, 0xfffc0000, FMT_6, {IMM16, DN0}}, 261 1.1 christos { "sub", 0xf4680000, 0xfffc0000, FMT_7, {IMM24, DN0}}, 262 1.1 christos { "sub", 0xf70c0000, 0xfffc0000, FMT_6, {IMM16, AN0}}, 263 1.1 christos { "sub", 0xf46c0000, 0xfffc0000, FMT_7, {IMM24, AN0}}, 264 1.1 christos { "subc", 0xf290, 0xfff0, FMT_4, {DN1, DM0}}, 265 1.1 christos 266 1.1 christos { "mul", 0xf340, 0xfff0, FMT_4, {DN1, DM0}}, 267 1.1 christos { "mulu", 0xf350, 0xfff0, FMT_4, {DN1, DM0}}, 268 1.1 christos 269 1.1 christos { "divu", 0xf360, 0xfff0, FMT_4, {DN1, DM0}}, 270 1.1 christos 271 1.1 christos { "cmp", 0xf390, 0xfff0, FMT_4, {DN1, DM0}}, 272 1.1 christos { "cmp", 0xf220, 0xfff0, FMT_4, {DM1, AN0}}, 273 1.1 christos { "cmp", 0xf2e0, 0xfff0, FMT_4, {AN1, DM0}}, 274 1.1 christos { "cmp", 0xf260, 0xfff0, FMT_4, {AN1, AM0}}, 275 1.1 christos { "cmp", 0xd800, 0xfc00, FMT_2, {SIMM8, DN0}}, 276 1.1 christos { "cmp", 0xf7480000, 0xfffc0000, FMT_6, {SIMM16, DN0}}, 277 1.1 christos { "cmp", 0xf4780000, 0xfffc0000, FMT_7, {IMM24, DN0}}, 278 1.1 christos { "cmp", 0xec0000, 0xfc0000, FMT_3, {IMM16, AN0}}, 279 1.1 christos { "cmp", 0xf47c0000, 0xfffc0000, FMT_7, {IMM24, AN0}}, 280 1.1 christos 281 1.1 christos { "and", 0xf300, 0xfff0, FMT_4, {DN1, DM0}}, 282 1.1 christos { "and", 0xf50000, 0xfffc00, FMT_5, {IMM8, DN0}}, 283 1.1 christos { "and", 0xf7000000, 0xfffc0000, FMT_6, {SIMM16N, DN0}}, 284 1.1 christos { "and", 0xf7100000, 0xffff0000, FMT_6, {SIMM16N, PSW}}, 285 1.1 christos { "or", 0xf310, 0xfff0, FMT_4, {DN1, DM0}}, 286 1.1 christos { "or", 0xf50800, 0xfffc00, FMT_5, {IMM8, DN0}}, 287 1.1 christos { "or", 0xf7400000, 0xfffc0000, FMT_6, {SIMM16N, DN0}}, 288 1.1 christos { "or", 0xf7140000, 0xffff0000, FMT_6, {SIMM16N, PSW}}, 289 1.1 christos { "xor", 0xf320, 0xfff0, FMT_4, {DN1, DM0}}, 290 1.1 christos { "xor", 0xf74c0000, 0xfffc0000, FMT_6, {SIMM16N, DN0}}, 291 1.1 christos { "not", 0xf3e4, 0xfffc, FMT_4, {DN0}}, 292 1.1 christos 293 1.1 christos { "asr", 0xf338, 0xfffc, FMT_4, {DN0}}, 294 1.1 christos { "lsr", 0xf33c, 0xfffc, FMT_4, {DN0}}, 295 1.1 christos { "ror", 0xf334, 0xfffc, FMT_4, {DN0}}, 296 1.1 christos { "rol", 0xf330, 0xfffc, FMT_4, {DN0}}, 297 1.1 christos 298 1.1 christos { "btst", 0xf50400, 0xfffc00, FMT_5, {IMM8, DN0}}, 299 1.1 christos { "btst", 0xf7040000, 0xfffc0000, FMT_6, {SIMM16N, DN0}}, 300 1.1 christos { "bset", 0xf020, 0xfff0, FMT_4, {DM0, MEM(AN1)}}, 301 1.1 christos { "bclr", 0xf030, 0xfff0, FMT_4, {DM0, MEM(AN1)}}, 302 1.1 christos 303 1.1 christos { "beq", 0xe800, 0xff00, FMT_2, {SD8N_PCREL}}, 304 1.1 christos { "bne", 0xe900, 0xff00, FMT_2, {SD8N_PCREL}}, 305 1.1 christos { "blt", 0xe000, 0xff00, FMT_2, {SD8N_PCREL}}, 306 1.1 christos { "ble", 0xe300, 0xff00, FMT_2, {SD8N_PCREL}}, 307 1.1 christos { "bge", 0xe200, 0xff00, FMT_2, {SD8N_PCREL}}, 308 1.1 christos { "bgt", 0xe100, 0xff00, FMT_2, {SD8N_PCREL}}, 309 1.1 christos { "bcs", 0xe400, 0xff00, FMT_2, {SD8N_PCREL}}, 310 1.1 christos { "bls", 0xe700, 0xff00, FMT_2, {SD8N_PCREL}}, 311 1.1 christos { "bcc", 0xe600, 0xff00, FMT_2, {SD8N_PCREL}}, 312 1.1 christos { "bhi", 0xe500, 0xff00, FMT_2, {SD8N_PCREL}}, 313 1.1 christos { "bvc", 0xf5fc00, 0xffff00, FMT_5, {SD8N_PCREL}}, 314 1.1 christos { "bvs", 0xf5fd00, 0xffff00, FMT_5, {SD8N_PCREL}}, 315 1.1 christos { "bnc", 0xf5fe00, 0xffff00, FMT_5, {SD8N_PCREL}}, 316 1.1 christos { "bns", 0xf5ff00, 0xffff00, FMT_5, {SD8N_PCREL}}, 317 1.1 christos { "bra", 0xea00, 0xff00, FMT_2, {SD8N_PCREL}}, 318 1.1 christos 319 1.1 christos { "beqx", 0xf5e800, 0xffff00, FMT_5, {SD8N_PCREL}}, 320 1.1 christos { "bnex", 0xf5e900, 0xffff00, FMT_5, {SD8N_PCREL}}, 321 1.1 christos { "bltx", 0xf5e000, 0xffff00, FMT_5, {SD8N_PCREL}}, 322 1.1 christos { "blex", 0xf5e300, 0xffff00, FMT_5, {SD8N_PCREL}}, 323 1.1 christos { "bgex", 0xf5e200, 0xffff00, FMT_5, {SD8N_PCREL}}, 324 1.1 christos { "bgtx", 0xf5e100, 0xffff00, FMT_5, {SD8N_PCREL}}, 325 1.1 christos { "bcsx", 0xf5e400, 0xffff00, FMT_5, {SD8N_PCREL}}, 326 1.1 christos { "blsx", 0xf5e700, 0xffff00, FMT_5, {SD8N_PCREL}}, 327 1.1 christos { "bccx", 0xf5e600, 0xffff00, FMT_5, {SD8N_PCREL}}, 328 1.1 christos { "bhix", 0xf5e500, 0xffff00, FMT_5, {SD8N_PCREL}}, 329 1.1 christos { "bvcx", 0xf5ec00, 0xffff00, FMT_5, {SD8N_PCREL}}, 330 1.1 christos { "bvsx", 0xf5ed00, 0xffff00, FMT_5, {SD8N_PCREL}}, 331 1.1 christos { "bncx", 0xf5ee00, 0xffff00, FMT_5, {SD8N_PCREL}}, 332 1.1 christos { "bnsx", 0xf5ef00, 0xffff00, FMT_5, {SD8N_PCREL}}, 333 1.1 christos 334 1.1 christos { "jmp", 0xfc0000, 0xff0000, FMT_3, {IMM16_PCREL}}, 335 1.1 christos { "jmp", 0xf4e00000, 0xffff0000, FMT_7, {IMM24_PCREL}}, 336 1.1 christos { "jmp", 0xf000, 0xfff3, FMT_4, {PAREN,AN1,PAREN}}, 337 1.1 christos { "jsr", 0xfd0000, 0xff0000, FMT_3, {IMM16_PCREL}}, 338 1.1 christos { "jsr", 0xf4e10000, 0xffff0000, FMT_7, {IMM24_PCREL}}, 339 1.1 christos { "jsr", 0xf001, 0xfff3, FMT_4, {PAREN,AN1,PAREN}}, 340 1.1 christos 341 1.1 christos { "nop", 0xf6, 0xff, FMT_1, {UNUSED}}, 342 1.1 christos 343 1.1 christos { "rts", 0xfe, 0xff, FMT_1, {UNUSED}}, 344 1.1 christos { "rti", 0xeb, 0xff, FMT_1, {UNUSED}}, 345 1.1 christos 346 1.1 christos /* Extension. We need some instruction to trigger "emulated syscalls" 347 1.1 christos for our simulator. */ 348 1.1 christos { "syscall", 0xf010, 0xffff, FMT_4, {UNUSED}}, 349 1.1 christos 350 1.1 christos /* Extension. When talking to the simulator, gdb requires some instruction 351 1.1 christos that will trigger a "breakpoint" (really just an instruction that isn't 352 1.1 christos otherwise used by the tools. This instruction must be the same size 353 1.1 christos as the smallest instruction on the target machine. In the case of the 354 1.1 christos mn10x00 the "break" instruction must be one byte. 0xff is available on 355 1.1 christos both mn10x00 architectures. */ 356 1.1 christos { "break", 0xff, 0xff, FMT_1, {UNUSED}}, 357 1.1 christos 358 1.1 christos { 0, 0, 0, 0, {0}}, 359 1.1 christos 360 1.1 christos } ; 361 1.1 christos 362 1.1 christos const int mn10200_num_opcodes = 363 1.1 christos sizeof (mn10200_opcodes) / sizeof (mn10200_opcodes[0]); 364 365 366