1 /* Information for instruction disassembly on the Convex. 2 Copyright (C) 1989-2014 Free Software Foundation, Inc. 3 4 This file is part of GDB. 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 3 of the License, or 9 (at your option) 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., 51 Franklin Street - Fifth Floor, Boston, 19 MA 02110-1301, USA. */ 20 21 #define xxx 0 22 #define rrr 1 23 #define rr 2 24 #define rxr 3 25 #define r 4 26 #define nops 5 27 #define nr 6 28 #define pcrel 7 29 #define lr 8 30 #define rxl 9 31 #define rlr 10 32 #define rrl 11 33 #define iml 12 34 #define imr 13 35 #define a1r 14 36 #define a1l 15 37 #define a2r 16 38 #define a2l 17 39 #define a3 18 40 #define a4 19 41 #define a5 20 42 #define V 1 43 #define S 2 44 #define VM 3 45 #define A 4 46 #define VL 5 47 #define VS 6 48 #define VLS 7 49 #define PSW 8 50 /* Prevent an error during "make depend". */ 51 #if !defined (PC) 52 #define PC 9 53 #endif 54 #define ITR 10 55 #define VV 11 56 #define ITSR 12 57 #define TOC 13 58 #define CIR 14 59 #define TTR 15 60 #define VMU 16 61 #define VML 17 62 #define ICR 18 63 #define TCPU 19 64 #define CPUID 20 65 #define TID 21 66 67 const char *op[] = { 68 "", 69 "v0\0v1\0v2\0v3\0v4\0v5\0v6\0v7", 70 "s0\0s1\0s2\0s3\0s4\0s5\0s6\0s7", 71 "vm", 72 "sp\0a1\0a2\0a3\0a4\0a5\0ap\0fp", 73 "vl", 74 "vs", 75 "vls", 76 "psw", 77 "pc", 78 "itr", 79 "vv", 80 "itsr", 81 "toc", 82 "cir", 83 "ttr", 84 "vmu", 85 "vml", 86 "icr", 87 "tcpu", 88 "cpuid", 89 "tid", 90 }; 91 92 const struct formstr format0[] = { 93 {0,0,rrr,V,S,S}, /* mov */ 94 {0,0,rrr,S,S,V}, /* mov */ 95 {1,1,rrr,V,V,V}, /* merg.t */ 96 {2,1,rrr,V,V,V}, /* mask.t */ 97 {1,2,rrr,V,S,V}, /* merg.f */ 98 {2,2,rrr,V,S,V}, /* mask.f */ 99 {1,1,rrr,V,S,V}, /* merg.t */ 100 {2,1,rrr,V,S,V}, /* mask.t */ 101 {3,3,rrr,V,V,V}, /* mul.s */ 102 {3,4,rrr,V,V,V}, /* mul.d */ 103 {4,3,rrr,V,V,V}, /* div.s */ 104 {4,4,rrr,V,V,V}, /* div.d */ 105 {3,3,rrr,V,S,V}, /* mul.s */ 106 {3,4,rrr,V,S,V}, /* mul.d */ 107 {4,3,rrr,V,S,V}, /* div.s */ 108 {4,4,rrr,V,S,V}, /* div.d */ 109 {5,0,rrr,V,V,V}, /* and */ 110 {6,0,rrr,V,V,V}, /* or */ 111 {7,0,rrr,V,V,V}, /* xor */ 112 {8,0,rrr,V,V,V}, /* shf */ 113 {5,0,rrr,V,S,V}, /* and */ 114 {6,0,rrr,V,S,V}, /* or */ 115 {7,0,rrr,V,S,V}, /* xor */ 116 {8,0,rrr,V,S,V}, /* shf */ 117 {9,3,rrr,V,V,V}, /* add.s */ 118 {9,4,rrr,V,V,V}, /* add.d */ 119 {10,3,rrr,V,V,V}, /* sub.s */ 120 {10,4,rrr,V,V,V}, /* sub.d */ 121 {9,3,rrr,V,S,V}, /* add.s */ 122 {9,4,rrr,V,S,V}, /* add.d */ 123 {10,3,rrr,V,S,V}, /* sub.s */ 124 {10,4,rrr,V,S,V}, /* sub.d */ 125 {9,5,rrr,V,V,V}, /* add.b */ 126 {9,6,rrr,V,V,V}, /* add.h */ 127 {9,7,rrr,V,V,V}, /* add.w */ 128 {9,8,rrr,V,V,V}, /* add.l */ 129 {9,5,rrr,V,S,V}, /* add.b */ 130 {9,6,rrr,V,S,V}, /* add.h */ 131 {9,7,rrr,V,S,V}, /* add.w */ 132 {9,8,rrr,V,S,V}, /* add.l */ 133 {10,5,rrr,V,V,V}, /* sub.b */ 134 {10,6,rrr,V,V,V}, /* sub.h */ 135 {10,7,rrr,V,V,V}, /* sub.w */ 136 {10,8,rrr,V,V,V}, /* sub.l */ 137 {10,5,rrr,V,S,V}, /* sub.b */ 138 {10,6,rrr,V,S,V}, /* sub.h */ 139 {10,7,rrr,V,S,V}, /* sub.w */ 140 {10,8,rrr,V,S,V}, /* sub.l */ 141 {3,5,rrr,V,V,V}, /* mul.b */ 142 {3,6,rrr,V,V,V}, /* mul.h */ 143 {3,7,rrr,V,V,V}, /* mul.w */ 144 {3,8,rrr,V,V,V}, /* mul.l */ 145 {3,5,rrr,V,S,V}, /* mul.b */ 146 {3,6,rrr,V,S,V}, /* mul.h */ 147 {3,7,rrr,V,S,V}, /* mul.w */ 148 {3,8,rrr,V,S,V}, /* mul.l */ 149 {4,5,rrr,V,V,V}, /* div.b */ 150 {4,6,rrr,V,V,V}, /* div.h */ 151 {4,7,rrr,V,V,V}, /* div.w */ 152 {4,8,rrr,V,V,V}, /* div.l */ 153 {4,5,rrr,V,S,V}, /* div.b */ 154 {4,6,rrr,V,S,V}, /* div.h */ 155 {4,7,rrr,V,S,V}, /* div.w */ 156 {4,8,rrr,V,S,V}, /* div.l */ 157 }; 158 159 const struct formstr format1[] = { 160 {11,0,xxx,0,0,0}, /* exit */ 161 {12,0,a3,0,0,0}, /* jmp */ 162 {13,2,a3,0,0,0}, /* jmpi.f */ 163 {13,1,a3,0,0,0}, /* jmpi.t */ 164 {14,2,a3,0,0,0}, /* jmpa.f */ 165 {14,1,a3,0,0,0}, /* jmpa.t */ 166 {15,2,a3,0,0,0}, /* jmps.f */ 167 {15,1,a3,0,0,0}, /* jmps.t */ 168 {16,0,a3,0,0,0}, /* tac */ 169 {17,0,a1r,A,0,0}, /* ldea */ 170 {18,8,a1l,VLS,0,0}, /* ld.l */ 171 {18,9,a1l,VM,0,0}, /* ld.x */ 172 {19,0,a3,0,0,0}, /* tas */ 173 {20,0,a3,0,0,0}, /* pshea */ 174 {21,8,a2l,VLS,0,0}, /* st.l */ 175 {21,9,a2l,VM,0,0}, /* st.x */ 176 {0,0,0,0,0,0}, 177 {0,0,0,0,0,0}, 178 {0,0,0,0,0,0}, 179 {0,0,0,0,0,0}, 180 {0,0,0,0,0,0}, 181 {0,0,0,0,0,0}, 182 {0,0,0,0,0,0}, 183 {0,0,0,0,0,0}, 184 {0,0,0,0,0,0}, 185 {0,0,0,0,0,0}, 186 {0,0,0,0,0,0}, 187 {0,0,0,0,0,0}, 188 {0,0,0,0,0,0}, 189 {0,0,0,0,0,0}, 190 {0,0,0,0,0,0}, 191 {0,0,0,0,0,0}, 192 {22,0,a3,0,0,0}, /* call */ 193 {23,0,a3,0,0,0}, /* calls */ 194 {24,0,a3,0,0,0}, /* callq */ 195 {25,0,a1r,A,0,0}, /* pfork */ 196 {26,5,a2r,S,0,0}, /* ste.b */ 197 {26,6,a2r,S,0,0}, /* ste.h */ 198 {26,7,a2r,S,0,0}, /* ste.w */ 199 {26,8,a2r,S,0,0}, /* ste.l */ 200 {18,5,a1r,A,0,0}, /* ld.b */ 201 {18,6,a1r,A,0,0}, /* ld.h */ 202 {18,7,a1r,A,0,0}, /* ld.w */ 203 {27,7,a1r,A,0,0}, /* incr.w */ 204 {21,5,a2r,A,0,0}, /* st.b */ 205 {21,6,a2r,A,0,0}, /* st.h */ 206 {21,7,a2r,A,0,0}, /* st.w */ 207 {27,8,a1r,S,0,0}, /* incr.l */ 208 {18,5,a1r,S,0,0}, /* ld.b */ 209 {18,6,a1r,S,0,0}, /* ld.h */ 210 {18,7,a1r,S,0,0}, /* ld.w */ 211 {18,8,a1r,S,0,0}, /* ld.l */ 212 {21,5,a2r,S,0,0}, /* st.b */ 213 {21,6,a2r,S,0,0}, /* st.h */ 214 {21,7,a2r,S,0,0}, /* st.w */ 215 {21,8,a2r,S,0,0}, /* st.l */ 216 {18,5,a1r,V,0,0}, /* ld.b */ 217 {18,6,a1r,V,0,0}, /* ld.h */ 218 {18,7,a1r,V,0,0}, /* ld.w */ 219 {18,8,a1r,V,0,0}, /* ld.l */ 220 {21,5,a2r,V,0,0}, /* st.b */ 221 {21,6,a2r,V,0,0}, /* st.h */ 222 {21,7,a2r,V,0,0}, /* st.w */ 223 {21,8,a2r,V,0,0}, /* st.l */ 224 }; 225 226 const struct formstr format2[] = { 227 {28,5,rr,A,A,0}, /* cvtw.b */ 228 {28,6,rr,A,A,0}, /* cvtw.h */ 229 {29,7,rr,A,A,0}, /* cvtb.w */ 230 {30,7,rr,A,A,0}, /* cvth.w */ 231 {28,5,rr,S,S,0}, /* cvtw.b */ 232 {28,6,rr,S,S,0}, /* cvtw.h */ 233 {29,7,rr,S,S,0}, /* cvtb.w */ 234 {30,7,rr,S,S,0}, /* cvth.w */ 235 {28,3,rr,S,S,0}, /* cvtw.s */ 236 {31,7,rr,S,S,0}, /* cvts.w */ 237 {32,3,rr,S,S,0}, /* cvtd.s */ 238 {31,4,rr,S,S,0}, /* cvts.d */ 239 {31,8,rr,S,S,0}, /* cvts.l */ 240 {32,8,rr,S,S,0}, /* cvtd.l */ 241 {33,3,rr,S,S,0}, /* cvtl.s */ 242 {33,4,rr,S,S,0}, /* cvtl.d */ 243 {34,0,rr,A,A,0}, /* ldpa */ 244 {8,0,nr,A,0,0}, /* shf */ 245 {18,6,nr,A,0,0}, /* ld.h */ 246 {18,7,nr,A,0,0}, /* ld.w */ 247 {33,7,rr,S,S,0}, /* cvtl.w */ 248 {28,8,rr,S,S,0}, /* cvtw.l */ 249 {35,1,rr,S,S,0}, /* plc.t */ 250 {36,0,rr,S,S,0}, /* tzc */ 251 {37,6,rr,A,A,0}, /* eq.h */ 252 {37,7,rr,A,A,0}, /* eq.w */ 253 {37,6,nr,A,0,0}, /* eq.h */ 254 {37,7,nr,A,0,0}, /* eq.w */ 255 {37,5,rr,S,S,0}, /* eq.b */ 256 {37,6,rr,S,S,0}, /* eq.h */ 257 {37,7,rr,S,S,0}, /* eq.w */ 258 {37,8,rr,S,S,0}, /* eq.l */ 259 {38,6,rr,A,A,0}, /* leu.h */ 260 {38,7,rr,A,A,0}, /* leu.w */ 261 {38,6,nr,A,0,0}, /* leu.h */ 262 {38,7,nr,A,0,0}, /* leu.w */ 263 {38,5,rr,S,S,0}, /* leu.b */ 264 {38,6,rr,S,S,0}, /* leu.h */ 265 {38,7,rr,S,S,0}, /* leu.w */ 266 {38,8,rr,S,S,0}, /* leu.l */ 267 {39,6,rr,A,A,0}, /* ltu.h */ 268 {39,7,rr,A,A,0}, /* ltu.w */ 269 {39,6,nr,A,0,0}, /* ltu.h */ 270 {39,7,nr,A,0,0}, /* ltu.w */ 271 {39,5,rr,S,S,0}, /* ltu.b */ 272 {39,6,rr,S,S,0}, /* ltu.h */ 273 {39,7,rr,S,S,0}, /* ltu.w */ 274 {39,8,rr,S,S,0}, /* ltu.l */ 275 {40,6,rr,A,A,0}, /* le.h */ 276 {40,7,rr,A,A,0}, /* le.w */ 277 {40,6,nr,A,0,0}, /* le.h */ 278 {40,7,nr,A,0,0}, /* le.w */ 279 {40,5,rr,S,S,0}, /* le.b */ 280 {40,6,rr,S,S,0}, /* le.h */ 281 {40,7,rr,S,S,0}, /* le.w */ 282 {40,8,rr,S,S,0}, /* le.l */ 283 {41,6,rr,A,A,0}, /* lt.h */ 284 {41,7,rr,A,A,0}, /* lt.w */ 285 {41,6,nr,A,0,0}, /* lt.h */ 286 {41,7,nr,A,0,0}, /* lt.w */ 287 {41,5,rr,S,S,0}, /* lt.b */ 288 {41,6,rr,S,S,0}, /* lt.h */ 289 {41,7,rr,S,S,0}, /* lt.w */ 290 {41,8,rr,S,S,0}, /* lt.l */ 291 {9,7,rr,S,A,0}, /* add.w */ 292 {8,0,rr,A,A,0}, /* shf */ 293 {0,0,rr,A,A,0}, /* mov */ 294 {0,0,rr,S,A,0}, /* mov */ 295 {0,7,rr,S,S,0}, /* mov.w */ 296 {8,0,rr,S,S,0}, /* shf */ 297 {0,0,rr,S,S,0}, /* mov */ 298 {0,0,rr,A,S,0}, /* mov */ 299 {5,0,rr,A,A,0}, /* and */ 300 {6,0,rr,A,A,0}, /* or */ 301 {7,0,rr,A,A,0}, /* xor */ 302 {42,0,rr,A,A,0}, /* not */ 303 {5,0,rr,S,S,0}, /* and */ 304 {6,0,rr,S,S,0}, /* or */ 305 {7,0,rr,S,S,0}, /* xor */ 306 {42,0,rr,S,S,0}, /* not */ 307 {40,3,rr,S,S,0}, /* le.s */ 308 {40,4,rr,S,S,0}, /* le.d */ 309 {41,3,rr,S,S,0}, /* lt.s */ 310 {41,4,rr,S,S,0}, /* lt.d */ 311 {9,3,rr,S,S,0}, /* add.s */ 312 {9,4,rr,S,S,0}, /* add.d */ 313 {10,3,rr,S,S,0}, /* sub.s */ 314 {10,4,rr,S,S,0}, /* sub.d */ 315 {37,3,rr,S,S,0}, /* eq.s */ 316 {37,4,rr,S,S,0}, /* eq.d */ 317 {43,6,rr,A,A,0}, /* neg.h */ 318 {43,7,rr,A,A,0}, /* neg.w */ 319 {3,3,rr,S,S,0}, /* mul.s */ 320 {3,4,rr,S,S,0}, /* mul.d */ 321 {4,3,rr,S,S,0}, /* div.s */ 322 {4,4,rr,S,S,0}, /* div.d */ 323 {9,6,rr,A,A,0}, /* add.h */ 324 {9,7,rr,A,A,0}, /* add.w */ 325 {9,6,nr,A,0,0}, /* add.h */ 326 {9,7,nr,A,0,0}, /* add.w */ 327 {9,5,rr,S,S,0}, /* add.b */ 328 {9,6,rr,S,S,0}, /* add.h */ 329 {9,7,rr,S,S,0}, /* add.w */ 330 {9,8,rr,S,S,0}, /* add.l */ 331 {10,6,rr,A,A,0}, /* sub.h */ 332 {10,7,rr,A,A,0}, /* sub.w */ 333 {10,6,nr,A,0,0}, /* sub.h */ 334 {10,7,nr,A,0,0}, /* sub.w */ 335 {10,5,rr,S,S,0}, /* sub.b */ 336 {10,6,rr,S,S,0}, /* sub.h */ 337 {10,7,rr,S,S,0}, /* sub.w */ 338 {10,8,rr,S,S,0}, /* sub.l */ 339 {3,6,rr,A,A,0}, /* mul.h */ 340 {3,7,rr,A,A,0}, /* mul.w */ 341 {3,6,nr,A,0,0}, /* mul.h */ 342 {3,7,nr,A,0,0}, /* mul.w */ 343 {3,5,rr,S,S,0}, /* mul.b */ 344 {3,6,rr,S,S,0}, /* mul.h */ 345 {3,7,rr,S,S,0}, /* mul.w */ 346 {3,8,rr,S,S,0}, /* mul.l */ 347 {4,6,rr,A,A,0}, /* div.h */ 348 {4,7,rr,A,A,0}, /* div.w */ 349 {4,6,nr,A,0,0}, /* div.h */ 350 {4,7,nr,A,0,0}, /* div.w */ 351 {4,5,rr,S,S,0}, /* div.b */ 352 {4,6,rr,S,S,0}, /* div.h */ 353 {4,7,rr,S,S,0}, /* div.w */ 354 {4,8,rr,S,S,0}, /* div.l */ 355 }; 356 357 const struct formstr format3[] = { 358 {32,3,rr,V,V,0}, /* cvtd.s */ 359 {31,4,rr,V,V,0}, /* cvts.d */ 360 {33,4,rr,V,V,0}, /* cvtl.d */ 361 {32,8,rr,V,V,0}, /* cvtd.l */ 362 {0,0,rrl,S,S,VM}, /* mov */ 363 {0,0,rlr,S,VM,S}, /* mov */ 364 {0,0,0,0,0,0}, 365 {44,0,rr,S,S,0}, /* lop */ 366 {36,0,rr,V,V,0}, /* tzc */ 367 {44,0,rr,V,V,0}, /* lop */ 368 {0,0,0,0,0,0}, 369 {42,0,rr,V,V,0}, /* not */ 370 {8,0,rr,S,V,0}, /* shf */ 371 {35,1,rr,V,V,0}, /* plc.t */ 372 {45,2,rr,V,V,0}, /* cprs.f */ 373 {45,1,rr,V,V,0}, /* cprs.t */ 374 {37,3,rr,V,V,0}, /* eq.s */ 375 {37,4,rr,V,V,0}, /* eq.d */ 376 {43,3,rr,V,V,0}, /* neg.s */ 377 {43,4,rr,V,V,0}, /* neg.d */ 378 {37,3,rr,S,V,0}, /* eq.s */ 379 {37,4,rr,S,V,0}, /* eq.d */ 380 {43,3,rr,S,S,0}, /* neg.s */ 381 {43,4,rr,S,S,0}, /* neg.d */ 382 {40,3,rr,V,V,0}, /* le.s */ 383 {40,4,rr,V,V,0}, /* le.d */ 384 {41,3,rr,V,V,0}, /* lt.s */ 385 {41,4,rr,V,V,0}, /* lt.d */ 386 {40,3,rr,S,V,0}, /* le.s */ 387 {40,4,rr,S,V,0}, /* le.d */ 388 {41,3,rr,S,V,0}, /* lt.s */ 389 {41,4,rr,S,V,0}, /* lt.d */ 390 {37,5,rr,V,V,0}, /* eq.b */ 391 {37,6,rr,V,V,0}, /* eq.h */ 392 {37,7,rr,V,V,0}, /* eq.w */ 393 {37,8,rr,V,V,0}, /* eq.l */ 394 {37,5,rr,S,V,0}, /* eq.b */ 395 {37,6,rr,S,V,0}, /* eq.h */ 396 {37,7,rr,S,V,0}, /* eq.w */ 397 {37,8,rr,S,V,0}, /* eq.l */ 398 {40,5,rr,V,V,0}, /* le.b */ 399 {40,6,rr,V,V,0}, /* le.h */ 400 {40,7,rr,V,V,0}, /* le.w */ 401 {40,8,rr,V,V,0}, /* le.l */ 402 {40,5,rr,S,V,0}, /* le.b */ 403 {40,6,rr,S,V,0}, /* le.h */ 404 {40,7,rr,S,V,0}, /* le.w */ 405 {40,8,rr,S,V,0}, /* le.l */ 406 {41,5,rr,V,V,0}, /* lt.b */ 407 {41,6,rr,V,V,0}, /* lt.h */ 408 {41,7,rr,V,V,0}, /* lt.w */ 409 {41,8,rr,V,V,0}, /* lt.l */ 410 {41,5,rr,S,V,0}, /* lt.b */ 411 {41,6,rr,S,V,0}, /* lt.h */ 412 {41,7,rr,S,V,0}, /* lt.w */ 413 {41,8,rr,S,V,0}, /* lt.l */ 414 {43,5,rr,V,V,0}, /* neg.b */ 415 {43,6,rr,V,V,0}, /* neg.h */ 416 {43,7,rr,V,V,0}, /* neg.w */ 417 {43,8,rr,V,V,0}, /* neg.l */ 418 {43,5,rr,S,S,0}, /* neg.b */ 419 {43,6,rr,S,S,0}, /* neg.h */ 420 {43,7,rr,S,S,0}, /* neg.w */ 421 {43,8,rr,S,S,0}, /* neg.l */ 422 }; 423 424 const struct formstr format4[] = { 425 {46,0,nops,0,0,0}, /* nop */ 426 {47,0,pcrel,0,0,0}, /* br */ 427 {48,2,pcrel,0,0,0}, /* bri.f */ 428 {48,1,pcrel,0,0,0}, /* bri.t */ 429 {49,2,pcrel,0,0,0}, /* bra.f */ 430 {49,1,pcrel,0,0,0}, /* bra.t */ 431 {50,2,pcrel,0,0,0}, /* brs.f */ 432 {50,1,pcrel,0,0,0}, /* brs.t */ 433 }; 434 435 const struct formstr format5[] = { 436 {51,5,rr,V,V,0}, /* ldvi.b */ 437 {51,6,rr,V,V,0}, /* ldvi.h */ 438 {51,7,rr,V,V,0}, /* ldvi.w */ 439 {51,8,rr,V,V,0}, /* ldvi.l */ 440 {28,3,rr,V,V,0}, /* cvtw.s */ 441 {31,7,rr,V,V,0}, /* cvts.w */ 442 {28,8,rr,V,V,0}, /* cvtw.l */ 443 {33,7,rr,V,V,0}, /* cvtl.w */ 444 {52,5,rxr,V,V,0}, /* stvi.b */ 445 {52,6,rxr,V,V,0}, /* stvi.h */ 446 {52,7,rxr,V,V,0}, /* stvi.w */ 447 {52,8,rxr,V,V,0}, /* stvi.l */ 448 {52,5,rxr,S,V,0}, /* stvi.b */ 449 {52,6,rxr,S,V,0}, /* stvi.h */ 450 {52,7,rxr,S,V,0}, /* stvi.w */ 451 {52,8,rxr,S,V,0}, /* stvi.l */ 452 }; 453 454 const struct formstr format6[] = { 455 {53,0,r,A,0,0}, /* ldsdr */ 456 {54,0,r,A,0,0}, /* ldkdr */ 457 {55,3,r,S,0,0}, /* ln.s */ 458 {55,4,r,S,0,0}, /* ln.d */ 459 {56,0,nops,0,0,0}, /* patu */ 460 {57,0,r,A,0,0}, /* pate */ 461 {58,0,nops,0,0,0}, /* pich */ 462 {59,0,nops,0,0,0}, /* plch */ 463 {0,0,lr,PSW,A,0}, /* mov */ 464 {0,0,rxl,A,PSW,0}, /* mov */ 465 {0,0,lr,PC,A,0}, /* mov */ 466 {60,0,r,S,0,0}, /* idle */ 467 {0,0,lr,ITR,S,0}, /* mov */ 468 {0,0,rxl,S,ITR,0}, /* mov */ 469 {0,0,0,0,0,0}, 470 {0,0,rxl,S,ITSR,0}, /* mov */ 471 {61,0,nops,0,0,0}, /* rtnq */ 472 {62,0,nops,0,0,0}, /* cfork */ 473 {63,0,nops,0,0,0}, /* rtn */ 474 {64,0,nops,0,0,0}, /* wfork */ 475 {65,0,nops,0,0,0}, /* join */ 476 {66,0,nops,0,0,0}, /* rtnc */ 477 {67,3,r,S,0,0}, /* exp.s */ 478 {67,4,r,S,0,0}, /* exp.d */ 479 {68,3,r,S,0,0}, /* sin.s */ 480 {68,4,r,S,0,0}, /* sin.d */ 481 {0,0,0,0,0,0}, 482 {0,0,0,0,0,0}, 483 {69,3,r,S,0,0}, /* cos.s */ 484 {69,4,r,S,0,0}, /* cos.d */ 485 {0,0,0,0,0,0}, 486 {0,0,0,0,0,0}, 487 {70,7,r,A,0,0}, /* psh.w */ 488 {0,0,0,0,0,0}, 489 {71,7,r,A,0,0}, /* pop.w */ 490 {0,0,0,0,0,0}, 491 {70,7,r,S,0,0}, /* psh.w */ 492 {70,8,r,S,0,0}, /* psh.l */ 493 {71,7,r,S,0,0}, /* pop.w */ 494 {71,8,r,S,0,0}, /* pop.l */ 495 {72,0,nops,0,0,0}, /* eni */ 496 {73,0,nops,0,0,0}, /* dsi */ 497 {74,0,nops,0,0,0}, /* bkpt */ 498 {75,0,nops,0,0,0}, /* msync */ 499 {76,0,r,S,0,0}, /* mski */ 500 {77,0,r,S,0,0}, /* xmti */ 501 {0,0,rxl,S,VV,0}, /* mov */ 502 {78,0,nops,0,0,0}, /* tstvv */ 503 {0,0,lr,VS,A,0}, /* mov */ 504 {0,0,rxl,A,VS,0}, /* mov */ 505 {0,0,lr,VL,A,0}, /* mov */ 506 {0,0,rxl,A,VL,0}, /* mov */ 507 {0,7,lr,VS,S,0}, /* mov.w */ 508 {0,7,rxl,S,VS,0}, /* mov.w */ 509 {0,7,lr,VL,S,0}, /* mov.w */ 510 {0,7,rxl,S,VL,0}, /* mov.w */ 511 {79,0,r,A,0,0}, /* diag */ 512 {80,0,nops,0,0,0}, /* pbkpt */ 513 {81,3,r,S,0,0}, /* sqrt.s */ 514 {81,4,r,S,0,0}, /* sqrt.d */ 515 {82,0,nops,0,0,0}, /* casr */ 516 {0,0,0,0,0,0}, 517 {83,3,r,S,0,0}, /* atan.s */ 518 {83,4,r,S,0,0}, /* atan.d */ 519 }; 520 521 const struct formstr format7[] = { 522 {84,5,r,V,0,0}, /* sum.b */ 523 {84,6,r,V,0,0}, /* sum.h */ 524 {84,7,r,V,0,0}, /* sum.w */ 525 {84,8,r,V,0,0}, /* sum.l */ 526 {85,0,r,V,0,0}, /* all */ 527 {86,0,r,V,0,0}, /* any */ 528 {87,0,r,V,0,0}, /* parity */ 529 {0,0,0,0,0,0}, 530 {88,5,r,V,0,0}, /* max.b */ 531 {88,6,r,V,0,0}, /* max.h */ 532 {88,7,r,V,0,0}, /* max.w */ 533 {88,8,r,V,0,0}, /* max.l */ 534 {89,5,r,V,0,0}, /* min.b */ 535 {89,6,r,V,0,0}, /* min.h */ 536 {89,7,r,V,0,0}, /* min.w */ 537 {89,8,r,V,0,0}, /* min.l */ 538 {84,3,r,V,0,0}, /* sum.s */ 539 {84,4,r,V,0,0}, /* sum.d */ 540 {90,3,r,V,0,0}, /* prod.s */ 541 {90,4,r,V,0,0}, /* prod.d */ 542 {88,3,r,V,0,0}, /* max.s */ 543 {88,4,r,V,0,0}, /* max.d */ 544 {89,3,r,V,0,0}, /* min.s */ 545 {89,4,r,V,0,0}, /* min.d */ 546 {90,5,r,V,0,0}, /* prod.b */ 547 {90,6,r,V,0,0}, /* prod.h */ 548 {90,7,r,V,0,0}, /* prod.w */ 549 {90,8,r,V,0,0}, /* prod.l */ 550 {35,2,lr,VM,S,0}, /* plc.f */ 551 {35,1,lr,VM,S,0}, /* plc.t */ 552 {0,0,0,0,0,0}, 553 {0,0,0,0,0,0}, 554 }; 555 556 const struct formstr formatx[] = { 557 {0,0,0,0,0,0}, 558 }; 559 560 const struct formstr format1a[] = { 561 {91,0,imr,A,0,0}, /* halt */ 562 {92,0,a4,0,0,0}, /* sysc */ 563 {18,6,imr,A,0,0}, /* ld.h */ 564 {18,7,imr,A,0,0}, /* ld.w */ 565 {5,0,imr,A,0,0}, /* and */ 566 {6,0,imr,A,0,0}, /* or */ 567 {7,0,imr,A,0,0}, /* xor */ 568 {8,0,imr,A,0,0}, /* shf */ 569 {9,6,imr,A,0,0}, /* add.h */ 570 {9,7,imr,A,0,0}, /* add.w */ 571 {10,6,imr,A,0,0}, /* sub.h */ 572 {10,7,imr,A,0,0}, /* sub.w */ 573 {3,6,imr,A,0,0}, /* mul.h */ 574 {3,7,imr,A,0,0}, /* mul.w */ 575 {4,6,imr,A,0,0}, /* div.h */ 576 {4,7,imr,A,0,0}, /* div.w */ 577 {18,7,iml,VL,0,0}, /* ld.w */ 578 {18,7,iml,VS,0,0}, /* ld.w */ 579 {0,0,0,0,0,0}, 580 {8,7,imr,S,0,0}, /* shf.w */ 581 {93,0,a5,0,0,0}, /* trap */ 582 {0,0,0,0,0,0}, 583 {37,6,imr,A,0,0}, /* eq.h */ 584 {37,7,imr,A,0,0}, /* eq.w */ 585 {38,6,imr,A,0,0}, /* leu.h */ 586 {38,7,imr,A,0,0}, /* leu.w */ 587 {39,6,imr,A,0,0}, /* ltu.h */ 588 {39,7,imr,A,0,0}, /* ltu.w */ 589 {40,6,imr,A,0,0}, /* le.h */ 590 {40,7,imr,A,0,0}, /* le.w */ 591 {41,6,imr,A,0,0}, /* lt.h */ 592 {41,7,imr,A,0,0}, /* lt.w */ 593 }; 594 595 const struct formstr format1b[] = { 596 {18,4,imr,S,0,0}, /* ld.d */ 597 {18,10,imr,S,0,0}, /* ld.u */ 598 {18,8,imr,S,0,0}, /* ld.l */ 599 {18,7,imr,S,0,0}, /* ld.w */ 600 {5,0,imr,S,0,0}, /* and */ 601 {6,0,imr,S,0,0}, /* or */ 602 {7,0,imr,S,0,0}, /* xor */ 603 {8,0,imr,S,0,0}, /* shf */ 604 {9,6,imr,S,0,0}, /* add.h */ 605 {9,7,imr,S,0,0}, /* add.w */ 606 {10,6,imr,S,0,0}, /* sub.h */ 607 {10,7,imr,S,0,0}, /* sub.w */ 608 {3,6,imr,S,0,0}, /* mul.h */ 609 {3,7,imr,S,0,0}, /* mul.w */ 610 {4,6,imr,S,0,0}, /* div.h */ 611 {4,7,imr,S,0,0}, /* div.w */ 612 {9,3,imr,S,0,0}, /* add.s */ 613 {10,3,imr,S,0,0}, /* sub.s */ 614 {3,3,imr,S,0,0}, /* mul.s */ 615 {4,3,imr,S,0,0}, /* div.s */ 616 {40,3,imr,S,0,0}, /* le.s */ 617 {41,3,imr,S,0,0}, /* lt.s */ 618 {37,6,imr,S,0,0}, /* eq.h */ 619 {37,7,imr,S,0,0}, /* eq.w */ 620 {38,6,imr,S,0,0}, /* leu.h */ 621 {38,7,imr,S,0,0}, /* leu.w */ 622 {39,6,imr,S,0,0}, /* ltu.h */ 623 {39,7,imr,S,0,0}, /* ltu.w */ 624 {40,6,imr,S,0,0}, /* le.h */ 625 {40,7,imr,S,0,0}, /* le.w */ 626 {41,6,imr,S,0,0}, /* lt.h */ 627 {41,7,imr,S,0,0}, /* lt.w */ 628 }; 629 630 const struct formstr e0_format0[] = { 631 {10,3,rrr,S,V,V}, /* sub.s */ 632 {10,4,rrr,S,V,V}, /* sub.d */ 633 {4,3,rrr,S,V,V}, /* div.s */ 634 {4,4,rrr,S,V,V}, /* div.d */ 635 {10,11,rrr,S,V,V}, /* sub.s.f */ 636 {10,12,rrr,S,V,V}, /* sub.d.f */ 637 {4,11,rrr,S,V,V}, /* div.s.f */ 638 {4,12,rrr,S,V,V}, /* div.d.f */ 639 {3,11,rrr,V,V,V}, /* mul.s.f */ 640 {3,12,rrr,V,V,V}, /* mul.d.f */ 641 {4,11,rrr,V,V,V}, /* div.s.f */ 642 {4,12,rrr,V,V,V}, /* div.d.f */ 643 {3,11,rrr,V,S,V}, /* mul.s.f */ 644 {3,12,rrr,V,S,V}, /* mul.d.f */ 645 {4,11,rrr,V,S,V}, /* div.s.f */ 646 {4,12,rrr,V,S,V}, /* div.d.f */ 647 {5,2,rrr,V,V,V}, /* and.f */ 648 {6,2,rrr,V,V,V}, /* or.f */ 649 {7,2,rrr,V,V,V}, /* xor.f */ 650 {8,2,rrr,V,V,V}, /* shf.f */ 651 {5,2,rrr,V,S,V}, /* and.f */ 652 {6,2,rrr,V,S,V}, /* or.f */ 653 {7,2,rrr,V,S,V}, /* xor.f */ 654 {8,2,rrr,V,S,V}, /* shf.f */ 655 {9,11,rrr,V,V,V}, /* add.s.f */ 656 {9,12,rrr,V,V,V}, /* add.d.f */ 657 {10,11,rrr,V,V,V}, /* sub.s.f */ 658 {10,12,rrr,V,V,V}, /* sub.d.f */ 659 {9,11,rrr,V,S,V}, /* add.s.f */ 660 {9,12,rrr,V,S,V}, /* add.d.f */ 661 {10,11,rrr,V,S,V}, /* sub.s.f */ 662 {10,12,rrr,V,S,V}, /* sub.d.f */ 663 {9,13,rrr,V,V,V}, /* add.b.f */ 664 {9,14,rrr,V,V,V}, /* add.h.f */ 665 {9,15,rrr,V,V,V}, /* add.w.f */ 666 {9,16,rrr,V,V,V}, /* add.l.f */ 667 {9,13,rrr,V,S,V}, /* add.b.f */ 668 {9,14,rrr,V,S,V}, /* add.h.f */ 669 {9,15,rrr,V,S,V}, /* add.w.f */ 670 {9,16,rrr,V,S,V}, /* add.l.f */ 671 {10,13,rrr,V,V,V}, /* sub.b.f */ 672 {10,14,rrr,V,V,V}, /* sub.h.f */ 673 {10,15,rrr,V,V,V}, /* sub.w.f */ 674 {10,16,rrr,V,V,V}, /* sub.l.f */ 675 {10,13,rrr,V,S,V}, /* sub.b.f */ 676 {10,14,rrr,V,S,V}, /* sub.h.f */ 677 {10,15,rrr,V,S,V}, /* sub.w.f */ 678 {10,16,rrr,V,S,V}, /* sub.l.f */ 679 {3,13,rrr,V,V,V}, /* mul.b.f */ 680 {3,14,rrr,V,V,V}, /* mul.h.f */ 681 {3,15,rrr,V,V,V}, /* mul.w.f */ 682 {3,16,rrr,V,V,V}, /* mul.l.f */ 683 {3,13,rrr,V,S,V}, /* mul.b.f */ 684 {3,14,rrr,V,S,V}, /* mul.h.f */ 685 {3,15,rrr,V,S,V}, /* mul.w.f */ 686 {3,16,rrr,V,S,V}, /* mul.l.f */ 687 {4,13,rrr,V,V,V}, /* div.b.f */ 688 {4,14,rrr,V,V,V}, /* div.h.f */ 689 {4,15,rrr,V,V,V}, /* div.w.f */ 690 {4,16,rrr,V,V,V}, /* div.l.f */ 691 {4,13,rrr,V,S,V}, /* div.b.f */ 692 {4,14,rrr,V,S,V}, /* div.h.f */ 693 {4,15,rrr,V,S,V}, /* div.w.f */ 694 {4,16,rrr,V,S,V}, /* div.l.f */ 695 }; 696 697 const struct formstr e0_format1[] = { 698 {0,0,0,0,0,0}, 699 {94,0,a3,0,0,0}, /* tst */ 700 {95,0,a3,0,0,0}, /* lck */ 701 {96,0,a3,0,0,0}, /* ulk */ 702 {17,0,a1r,S,0,0}, /* ldea */ 703 {97,0,a1r,A,0,0}, /* spawn */ 704 {98,0,a1r,A,0,0}, /* ldcmr */ 705 {99,0,a2r,A,0,0}, /* stcmr */ 706 {100,0,a1r,A,0,0}, /* popr */ 707 {101,0,a2r,A,0,0}, /* pshr */ 708 {102,7,a1r,A,0,0}, /* rcvr.w */ 709 {103,7,a2r,A,0,0}, /* matm.w */ 710 {104,7,a2r,A,0,0}, /* sndr.w */ 711 {104,8,a2r,S,0,0}, /* sndr.l */ 712 {102,8,a1r,S,0,0}, /* rcvr.l */ 713 {103,8,a2r,S,0,0}, /* matm.l */ 714 {0,0,0,0,0,0}, 715 {0,0,0,0,0,0}, 716 {0,0,0,0,0,0}, 717 {0,0,0,0,0,0}, 718 {0,0,0,0,0,0}, 719 {0,0,0,0,0,0}, 720 {0,0,0,0,0,0}, 721 {0,0,0,0,0,0}, 722 {0,0,0,0,0,0}, 723 {0,0,0,0,0,0}, 724 {0,0,0,0,0,0}, 725 {0,0,0,0,0,0}, 726 {0,0,0,0,0,0}, 727 {0,0,0,0,0,0}, 728 {0,0,0,0,0,0}, 729 {0,0,0,0,0,0}, 730 {105,7,a2r,A,0,0}, /* putr.w */ 731 {105,8,a2r,S,0,0}, /* putr.l */ 732 {106,7,a1r,A,0,0}, /* getr.w */ 733 {106,8,a1r,S,0,0}, /* getr.l */ 734 {26,13,a2r,S,0,0}, /* ste.b.f */ 735 {26,14,a2r,S,0,0}, /* ste.h.f */ 736 {26,15,a2r,S,0,0}, /* ste.w.f */ 737 {26,16,a2r,S,0,0}, /* ste.l.f */ 738 {107,7,a2r,A,0,0}, /* matr.w */ 739 {108,7,a2r,A,0,0}, /* mat.w */ 740 {109,7,a1r,A,0,0}, /* get.w */ 741 {110,7,a1r,A,0,0}, /* rcv.w */ 742 {0,0,0,0,0,0}, 743 {111,7,a1r,A,0,0}, /* inc.w */ 744 {112,7,a2r,A,0,0}, /* put.w */ 745 {113,7,a2r,A,0,0}, /* snd.w */ 746 {107,8,a2r,S,0,0}, /* matr.l */ 747 {108,8,a2r,S,0,0}, /* mat.l */ 748 {109,8,a1r,S,0,0}, /* get.l */ 749 {110,8,a1r,S,0,0}, /* rcv.l */ 750 {0,0,0,0,0,0}, 751 {111,8,a1r,S,0,0}, /* inc.l */ 752 {112,8,a2r,S,0,0}, /* put.l */ 753 {113,8,a2r,S,0,0}, /* snd.l */ 754 {18,13,a1r,V,0,0}, /* ld.b.f */ 755 {18,14,a1r,V,0,0}, /* ld.h.f */ 756 {18,15,a1r,V,0,0}, /* ld.w.f */ 757 {18,16,a1r,V,0,0}, /* ld.l.f */ 758 {21,13,a2r,V,0,0}, /* st.b.f */ 759 {21,14,a2r,V,0,0}, /* st.h.f */ 760 {21,15,a2r,V,0,0}, /* st.w.f */ 761 {21,16,a2r,V,0,0}, /* st.l.f */ 762 }; 763 764 const struct formstr e0_format2[] = { 765 {28,5,rr,V,V,0}, /* cvtw.b */ 766 {28,6,rr,V,V,0}, /* cvtw.h */ 767 {29,7,rr,V,V,0}, /* cvtb.w */ 768 {30,7,rr,V,V,0}, /* cvth.w */ 769 {28,13,rr,V,V,0}, /* cvtw.b.f */ 770 {28,14,rr,V,V,0}, /* cvtw.h.f */ 771 {29,15,rr,V,V,0}, /* cvtb.w.f */ 772 {30,15,rr,V,V,0}, /* cvth.w.f */ 773 {31,8,rr,V,V,0}, /* cvts.l */ 774 {32,7,rr,V,V,0}, /* cvtd.w */ 775 {33,3,rr,V,V,0}, /* cvtl.s */ 776 {28,4,rr,V,V,0}, /* cvtw.d */ 777 {31,16,rr,V,V,0}, /* cvts.l.f */ 778 {32,15,rr,V,V,0}, /* cvtd.w.f */ 779 {33,11,rr,V,V,0}, /* cvtl.s.f */ 780 {28,12,rr,V,V,0}, /* cvtw.d.f */ 781 {114,0,rr,S,S,0}, /* enal */ 782 {8,7,rr,S,S,0}, /* shf.w */ 783 {115,0,rr,S,S,0}, /* enag */ 784 {0,0,0,0,0,0}, 785 {28,4,rr,S,S,0}, /* cvtw.d */ 786 {32,7,rr,S,S,0}, /* cvtd.w */ 787 {0,0,0,0,0,0}, 788 {0,0,0,0,0,0}, 789 {0,0,0,0,0,0}, 790 {0,0,0,0,0,0}, 791 {0,0,0,0,0,0}, 792 {0,0,0,0,0,0}, 793 {116,3,rr,S,S,0}, /* frint.s */ 794 {116,4,rr,S,S,0}, /* frint.d */ 795 {0,0,0,0,0,0}, 796 {0,0,0,0,0,0}, 797 {0,0,0,0,0,0}, 798 {0,0,0,0,0,0}, 799 {0,0,0,0,0,0}, 800 {0,0,0,0,0,0}, 801 {0,0,0,0,0,0}, 802 {0,0,0,0,0,0}, 803 {0,0,0,0,0,0}, 804 {0,0,0,0,0,0}, 805 {0,0,0,0,0,0}, 806 {0,0,0,0,0,0}, 807 {0,0,0,0,0,0}, 808 {0,0,0,0,0,0}, 809 {0,0,0,0,0,0}, 810 {0,0,0,0,0,0}, 811 {0,0,0,0,0,0}, 812 {0,0,0,0,0,0}, 813 {0,0,0,0,0,0}, 814 {0,0,0,0,0,0}, 815 {0,0,0,0,0,0}, 816 {0,0,0,0,0,0}, 817 {0,0,0,0,0,0}, 818 {0,0,0,0,0,0}, 819 {0,0,0,0,0,0}, 820 {0,0,0,0,0,0}, 821 {0,0,0,0,0,0}, 822 {0,0,0,0,0,0}, 823 {0,0,0,0,0,0}, 824 {0,0,0,0,0,0}, 825 {0,0,0,0,0,0}, 826 {0,0,0,0,0,0}, 827 {0,0,0,0,0,0}, 828 {0,0,0,0,0,0}, 829 {0,0,0,0,0,0}, 830 {0,0,0,0,0,0}, 831 {0,0,0,0,0,0}, 832 {0,0,0,0,0,0}, 833 {0,0,0,0,0,0}, 834 {0,0,0,0,0,0}, 835 {0,0,0,0,0,0}, 836 {0,0,0,0,0,0}, 837 {0,0,0,0,0,0}, 838 {0,0,0,0,0,0}, 839 {0,0,0,0,0,0}, 840 {0,0,0,0,0,0}, 841 {0,0,0,0,0,0}, 842 {0,0,0,0,0,0}, 843 {0,0,0,0,0,0}, 844 {0,0,0,0,0,0}, 845 {0,0,0,0,0,0}, 846 {0,0,0,0,0,0}, 847 {0,0,0,0,0,0}, 848 {0,0,0,0,0,0}, 849 {0,0,0,0,0,0}, 850 {0,0,0,0,0,0}, 851 {0,0,0,0,0,0}, 852 {0,0,0,0,0,0}, 853 {0,0,0,0,0,0}, 854 {0,0,0,0,0,0}, 855 {0,0,0,0,0,0}, 856 {0,0,0,0,0,0}, 857 {0,0,0,0,0,0}, 858 {0,0,0,0,0,0}, 859 {0,0,0,0,0,0}, 860 {0,0,0,0,0,0}, 861 {0,0,0,0,0,0}, 862 {0,0,0,0,0,0}, 863 {116,3,rr,V,V,0}, /* frint.s */ 864 {116,4,rr,V,V,0}, /* frint.d */ 865 {0,0,0,0,0,0}, 866 {0,0,0,0,0,0}, 867 {116,11,rr,V,V,0}, /* frint.s.f */ 868 {116,12,rr,V,V,0}, /* frint.d.f */ 869 {0,0,0,0,0,0}, 870 {0,0,0,0,0,0}, 871 {0,0,0,0,0,0}, 872 {0,0,0,0,0,0}, 873 {0,0,0,0,0,0}, 874 {0,0,0,0,0,0}, 875 {0,0,0,0,0,0}, 876 {0,0,0,0,0,0}, 877 {0,0,0,0,0,0}, 878 {0,0,0,0,0,0}, 879 {0,0,0,0,0,0}, 880 {0,0,0,0,0,0}, 881 {81,3,rr,V,V,0}, /* sqrt.s */ 882 {81,4,rr,V,V,0}, /* sqrt.d */ 883 {0,0,0,0,0,0}, 884 {0,0,0,0,0,0}, 885 {0,0,0,0,0,0}, 886 {0,0,0,0,0,0}, 887 {0,0,0,0,0,0}, 888 {0,0,0,0,0,0}, 889 {81,11,rr,V,V,0}, /* sqrt.s.f */ 890 {81,12,rr,V,V,0}, /* sqrt.d.f */ 891 {0,0,0,0,0,0}, 892 {0,0,0,0,0,0}, 893 }; 894 895 const struct formstr e0_format3[] = { 896 {32,11,rr,V,V,0}, /* cvtd.s.f */ 897 {31,12,rr,V,V,0}, /* cvts.d.f */ 898 {33,12,rr,V,V,0}, /* cvtl.d.f */ 899 {32,16,rr,V,V,0}, /* cvtd.l.f */ 900 {0,0,0,0,0,0}, 901 {0,0,0,0,0,0}, 902 {0,0,0,0,0,0}, 903 {0,0,0,0,0,0}, 904 {36,2,rr,V,V,0}, /* tzc.f */ 905 {44,2,rr,V,V,0}, /* lop.f */ 906 {117,2,rr,V,V,0}, /* xpnd.f */ 907 {42,2,rr,V,V,0}, /* not.f */ 908 {8,2,rr,S,V,0}, /* shf.f */ 909 {35,17,rr,V,V,0}, /* plc.t.f */ 910 {0,0,0,0,0,0}, 911 {0,0,0,0,0,0}, 912 {37,11,rr,V,V,0}, /* eq.s.f */ 913 {37,12,rr,V,V,0}, /* eq.d.f */ 914 {43,11,rr,V,V,0}, /* neg.s.f */ 915 {43,12,rr,V,V,0}, /* neg.d.f */ 916 {37,11,rr,S,V,0}, /* eq.s.f */ 917 {37,12,rr,S,V,0}, /* eq.d.f */ 918 {0,0,0,0,0,0}, 919 {0,0,0,0,0,0}, 920 {40,11,rr,V,V,0}, /* le.s.f */ 921 {40,12,rr,V,V,0}, /* le.d.f */ 922 {41,11,rr,V,V,0}, /* lt.s.f */ 923 {41,12,rr,V,V,0}, /* lt.d.f */ 924 {40,11,rr,S,V,0}, /* le.s.f */ 925 {40,12,rr,S,V,0}, /* le.d.f */ 926 {41,11,rr,S,V,0}, /* lt.s.f */ 927 {41,12,rr,S,V,0}, /* lt.d.f */ 928 {37,13,rr,V,V,0}, /* eq.b.f */ 929 {37,14,rr,V,V,0}, /* eq.h.f */ 930 {37,15,rr,V,V,0}, /* eq.w.f */ 931 {37,16,rr,V,V,0}, /* eq.l.f */ 932 {37,13,rr,S,V,0}, /* eq.b.f */ 933 {37,14,rr,S,V,0}, /* eq.h.f */ 934 {37,15,rr,S,V,0}, /* eq.w.f */ 935 {37,16,rr,S,V,0}, /* eq.l.f */ 936 {40,13,rr,V,V,0}, /* le.b.f */ 937 {40,14,rr,V,V,0}, /* le.h.f */ 938 {40,15,rr,V,V,0}, /* le.w.f */ 939 {40,16,rr,V,V,0}, /* le.l.f */ 940 {40,13,rr,S,V,0}, /* le.b.f */ 941 {40,14,rr,S,V,0}, /* le.h.f */ 942 {40,15,rr,S,V,0}, /* le.w.f */ 943 {40,16,rr,S,V,0}, /* le.l.f */ 944 {41,13,rr,V,V,0}, /* lt.b.f */ 945 {41,14,rr,V,V,0}, /* lt.h.f */ 946 {41,15,rr,V,V,0}, /* lt.w.f */ 947 {41,16,rr,V,V,0}, /* lt.l.f */ 948 {41,13,rr,S,V,0}, /* lt.b.f */ 949 {41,14,rr,S,V,0}, /* lt.h.f */ 950 {41,15,rr,S,V,0}, /* lt.w.f */ 951 {41,16,rr,S,V,0}, /* lt.l.f */ 952 {43,13,rr,V,V,0}, /* neg.b.f */ 953 {43,14,rr,V,V,0}, /* neg.h.f */ 954 {43,15,rr,V,V,0}, /* neg.w.f */ 955 {43,16,rr,V,V,0}, /* neg.l.f */ 956 {0,0,0,0,0,0}, 957 {0,0,0,0,0,0}, 958 {0,0,0,0,0,0}, 959 {0,0,0,0,0,0}, 960 }; 961 962 const struct formstr e0_format4[] = { 963 {0,0,0,0,0,0}, 964 {0,0,0,0,0,0}, 965 {0,0,0,0,0,0}, 966 {0,0,0,0,0,0}, 967 {0,0,0,0,0,0}, 968 {0,0,0,0,0,0}, 969 {0,0,0,0,0,0}, 970 {0,0,0,0,0,0}, 971 }; 972 973 const struct formstr e0_format5[] = { 974 {51,13,rr,V,V,0}, /* ldvi.b.f */ 975 {51,14,rr,V,V,0}, /* ldvi.h.f */ 976 {51,15,rr,V,V,0}, /* ldvi.w.f */ 977 {51,16,rr,V,V,0}, /* ldvi.l.f */ 978 {28,11,rr,V,V,0}, /* cvtw.s.f */ 979 {31,15,rr,V,V,0}, /* cvts.w.f */ 980 {28,16,rr,V,V,0}, /* cvtw.l.f */ 981 {33,15,rr,V,V,0}, /* cvtl.w.f */ 982 {52,13,rxr,V,V,0}, /* stvi.b.f */ 983 {52,14,rxr,V,V,0}, /* stvi.h.f */ 984 {52,15,rxr,V,V,0}, /* stvi.w.f */ 985 {52,16,rxr,V,V,0}, /* stvi.l.f */ 986 {52,13,rxr,S,V,0}, /* stvi.b.f */ 987 {52,14,rxr,S,V,0}, /* stvi.h.f */ 988 {52,15,rxr,S,V,0}, /* stvi.w.f */ 989 {52,16,rxr,S,V,0}, /* stvi.l.f */ 990 }; 991 992 const struct formstr e0_format6[] = { 993 {0,0,rxl,S,CIR,0}, /* mov */ 994 {0,0,lr,CIR,S,0}, /* mov */ 995 {0,0,lr,TOC,S,0}, /* mov */ 996 {0,0,lr,CPUID,S,0}, /* mov */ 997 {0,0,rxl,S,TTR,0}, /* mov */ 998 {0,0,lr,TTR,S,0}, /* mov */ 999 {118,0,nops,0,0,0}, /* ctrsl */ 1000 {119,0,nops,0,0,0}, /* ctrsg */ 1001 {0,0,rxl,S,VMU,0}, /* mov */ 1002 {0,0,lr,VMU,S,0}, /* mov */ 1003 {0,0,rxl,S,VML,0}, /* mov */ 1004 {0,0,lr,VML,S,0}, /* mov */ 1005 {0,0,rxl,S,ICR,0}, /* mov */ 1006 {0,0,lr,ICR,S,0}, /* mov */ 1007 {0,0,rxl,S,TCPU,0}, /* mov */ 1008 {0,0,lr,TCPU,S,0}, /* mov */ 1009 {0,0,0,0,0,0}, 1010 {0,0,0,0,0,0}, 1011 {0,0,0,0,0,0}, 1012 {0,0,0,0,0,0}, 1013 {120,0,nops,0,0,0}, /* stop */ 1014 {0,0,0,0,0,0}, 1015 {0,0,rxl,S,TID,0}, /* mov */ 1016 {0,0,lr,TID,S,0}, /* mov */ 1017 {0,0,0,0,0,0}, 1018 {0,0,0,0,0,0}, 1019 {0,0,0,0,0,0}, 1020 {0,0,0,0,0,0}, 1021 {0,0,0,0,0,0}, 1022 {0,0,0,0,0,0}, 1023 {0,0,0,0,0,0}, 1024 {0,0,0,0,0,0}, 1025 {0,0,0,0,0,0}, 1026 {0,0,0,0,0,0}, 1027 {0,0,0,0,0,0}, 1028 {0,0,0,0,0,0}, 1029 {0,0,0,0,0,0}, 1030 {0,0,0,0,0,0}, 1031 {0,0,0,0,0,0}, 1032 {0,0,0,0,0,0}, 1033 {0,0,0,0,0,0}, 1034 {0,0,0,0,0,0}, 1035 {0,0,0,0,0,0}, 1036 {0,0,0,0,0,0}, 1037 {0,0,0,0,0,0}, 1038 {0,0,0,0,0,0}, 1039 {0,0,0,0,0,0}, 1040 {0,0,0,0,0,0}, 1041 {0,0,0,0,0,0}, 1042 {0,0,0,0,0,0}, 1043 {0,0,0,0,0,0}, 1044 {0,0,0,0,0,0}, 1045 {0,0,0,0,0,0}, 1046 {0,0,0,0,0,0}, 1047 {0,0,0,0,0,0}, 1048 {0,0,0,0,0,0}, 1049 {0,0,0,0,0,0}, 1050 {0,0,0,0,0,0}, 1051 {0,0,0,0,0,0}, 1052 {0,0,0,0,0,0}, 1053 {0,0,0,0,0,0}, 1054 {0,0,0,0,0,0}, 1055 {0,0,0,0,0,0}, 1056 {0,0,0,0,0,0}, 1057 }; 1058 1059 const struct formstr e0_format7[] = { 1060 {84,13,r,V,0,0}, /* sum.b.f */ 1061 {84,14,r,V,0,0}, /* sum.h.f */ 1062 {84,15,r,V,0,0}, /* sum.w.f */ 1063 {84,16,r,V,0,0}, /* sum.l.f */ 1064 {85,2,r,V,0,0}, /* all.f */ 1065 {86,2,r,V,0,0}, /* any.f */ 1066 {87,2,r,V,0,0}, /* parity.f */ 1067 {0,0,0,0,0,0}, 1068 {88,13,r,V,0,0}, /* max.b.f */ 1069 {88,14,r,V,0,0}, /* max.h.f */ 1070 {88,15,r,V,0,0}, /* max.w.f */ 1071 {88,16,r,V,0,0}, /* max.l.f */ 1072 {89,13,r,V,0,0}, /* min.b.f */ 1073 {89,14,r,V,0,0}, /* min.h.f */ 1074 {89,15,r,V,0,0}, /* min.w.f */ 1075 {89,16,r,V,0,0}, /* min.l.f */ 1076 {84,11,r,V,0,0}, /* sum.s.f */ 1077 {84,12,r,V,0,0}, /* sum.d.f */ 1078 {90,11,r,V,0,0}, /* prod.s.f */ 1079 {90,12,r,V,0,0}, /* prod.d.f */ 1080 {88,11,r,V,0,0}, /* max.s.f */ 1081 {88,12,r,V,0,0}, /* max.d.f */ 1082 {89,11,r,V,0,0}, /* min.s.f */ 1083 {89,12,r,V,0,0}, /* min.d.f */ 1084 {90,13,r,V,0,0}, /* prod.b.f */ 1085 {90,14,r,V,0,0}, /* prod.h.f */ 1086 {90,15,r,V,0,0}, /* prod.w.f */ 1087 {90,16,r,V,0,0}, /* prod.l.f */ 1088 {0,0,0,0,0,0}, 1089 {0,0,0,0,0,0}, 1090 {0,0,0,0,0,0}, 1091 {0,0,0,0,0,0}, 1092 }; 1093 1094 const struct formstr e1_format0[] = { 1095 {0,0,0,0,0,0}, 1096 {0,0,0,0,0,0}, 1097 {0,0,0,0,0,0}, 1098 {0,0,0,0,0,0}, 1099 {10,18,rrr,S,V,V}, /* sub.s.t */ 1100 {10,19,rrr,S,V,V}, /* sub.d.t */ 1101 {4,18,rrr,S,V,V}, /* div.s.t */ 1102 {4,19,rrr,S,V,V}, /* div.d.t */ 1103 {3,18,rrr,V,V,V}, /* mul.s.t */ 1104 {3,19,rrr,V,V,V}, /* mul.d.t */ 1105 {4,18,rrr,V,V,V}, /* div.s.t */ 1106 {4,19,rrr,V,V,V}, /* div.d.t */ 1107 {3,18,rrr,V,S,V}, /* mul.s.t */ 1108 {3,19,rrr,V,S,V}, /* mul.d.t */ 1109 {4,18,rrr,V,S,V}, /* div.s.t */ 1110 {4,19,rrr,V,S,V}, /* div.d.t */ 1111 {5,1,rrr,V,V,V}, /* and.t */ 1112 {6,1,rrr,V,V,V}, /* or.t */ 1113 {7,1,rrr,V,V,V}, /* xor.t */ 1114 {8,1,rrr,V,V,V}, /* shf.t */ 1115 {5,1,rrr,V,S,V}, /* and.t */ 1116 {6,1,rrr,V,S,V}, /* or.t */ 1117 {7,1,rrr,V,S,V}, /* xor.t */ 1118 {8,1,rrr,V,S,V}, /* shf.t */ 1119 {9,18,rrr,V,V,V}, /* add.s.t */ 1120 {9,19,rrr,V,V,V}, /* add.d.t */ 1121 {10,18,rrr,V,V,V}, /* sub.s.t */ 1122 {10,19,rrr,V,V,V}, /* sub.d.t */ 1123 {9,18,rrr,V,S,V}, /* add.s.t */ 1124 {9,19,rrr,V,S,V}, /* add.d.t */ 1125 {10,18,rrr,V,S,V}, /* sub.s.t */ 1126 {10,19,rrr,V,S,V}, /* sub.d.t */ 1127 {9,20,rrr,V,V,V}, /* add.b.t */ 1128 {9,21,rrr,V,V,V}, /* add.h.t */ 1129 {9,22,rrr,V,V,V}, /* add.w.t */ 1130 {9,23,rrr,V,V,V}, /* add.l.t */ 1131 {9,20,rrr,V,S,V}, /* add.b.t */ 1132 {9,21,rrr,V,S,V}, /* add.h.t */ 1133 {9,22,rrr,V,S,V}, /* add.w.t */ 1134 {9,23,rrr,V,S,V}, /* add.l.t */ 1135 {10,20,rrr,V,V,V}, /* sub.b.t */ 1136 {10,21,rrr,V,V,V}, /* sub.h.t */ 1137 {10,22,rrr,V,V,V}, /* sub.w.t */ 1138 {10,23,rrr,V,V,V}, /* sub.l.t */ 1139 {10,20,rrr,V,S,V}, /* sub.b.t */ 1140 {10,21,rrr,V,S,V}, /* sub.h.t */ 1141 {10,22,rrr,V,S,V}, /* sub.w.t */ 1142 {10,23,rrr,V,S,V}, /* sub.l.t */ 1143 {3,20,rrr,V,V,V}, /* mul.b.t */ 1144 {3,21,rrr,V,V,V}, /* mul.h.t */ 1145 {3,22,rrr,V,V,V}, /* mul.w.t */ 1146 {3,23,rrr,V,V,V}, /* mul.l.t */ 1147 {3,20,rrr,V,S,V}, /* mul.b.t */ 1148 {3,21,rrr,V,S,V}, /* mul.h.t */ 1149 {3,22,rrr,V,S,V}, /* mul.w.t */ 1150 {3,23,rrr,V,S,V}, /* mul.l.t */ 1151 {4,20,rrr,V,V,V}, /* div.b.t */ 1152 {4,21,rrr,V,V,V}, /* div.h.t */ 1153 {4,22,rrr,V,V,V}, /* div.w.t */ 1154 {4,23,rrr,V,V,V}, /* div.l.t */ 1155 {4,20,rrr,V,S,V}, /* div.b.t */ 1156 {4,21,rrr,V,S,V}, /* div.h.t */ 1157 {4,22,rrr,V,S,V}, /* div.w.t */ 1158 {4,23,rrr,V,S,V}, /* div.l.t */ 1159 }; 1160 1161 const struct formstr e1_format1[] = { 1162 {0,0,0,0,0,0}, 1163 {0,0,0,0,0,0}, 1164 {0,0,0,0,0,0}, 1165 {0,0,0,0,0,0}, 1166 {0,0,0,0,0,0}, 1167 {0,0,0,0,0,0}, 1168 {0,0,0,0,0,0}, 1169 {0,0,0,0,0,0}, 1170 {0,0,0,0,0,0}, 1171 {0,0,0,0,0,0}, 1172 {0,0,0,0,0,0}, 1173 {0,0,0,0,0,0}, 1174 {0,0,0,0,0,0}, 1175 {0,0,0,0,0,0}, 1176 {0,0,0,0,0,0}, 1177 {0,0,0,0,0,0}, 1178 {0,0,0,0,0,0}, 1179 {0,0,0,0,0,0}, 1180 {0,0,0,0,0,0}, 1181 {0,0,0,0,0,0}, 1182 {0,0,0,0,0,0}, 1183 {0,0,0,0,0,0}, 1184 {0,0,0,0,0,0}, 1185 {0,0,0,0,0,0}, 1186 {0,0,0,0,0,0}, 1187 {0,0,0,0,0,0}, 1188 {0,0,0,0,0,0}, 1189 {0,0,0,0,0,0}, 1190 {0,0,0,0,0,0}, 1191 {0,0,0,0,0,0}, 1192 {0,0,0,0,0,0}, 1193 {0,0,0,0,0,0}, 1194 {0,0,0,0,0,0}, 1195 {0,0,0,0,0,0}, 1196 {0,0,0,0,0,0}, 1197 {0,0,0,0,0,0}, 1198 {26,20,a2r,S,0,0}, /* ste.b.t */ 1199 {26,21,a2r,S,0,0}, /* ste.h.t */ 1200 {26,22,a2r,S,0,0}, /* ste.w.t */ 1201 {26,23,a2r,S,0,0}, /* ste.l.t */ 1202 {0,0,0,0,0,0}, 1203 {0,0,0,0,0,0}, 1204 {0,0,0,0,0,0}, 1205 {0,0,0,0,0,0}, 1206 {0,0,0,0,0,0}, 1207 {0,0,0,0,0,0}, 1208 {0,0,0,0,0,0}, 1209 {0,0,0,0,0,0}, 1210 {0,0,0,0,0,0}, 1211 {0,0,0,0,0,0}, 1212 {0,0,0,0,0,0}, 1213 {0,0,0,0,0,0}, 1214 {0,0,0,0,0,0}, 1215 {0,0,0,0,0,0}, 1216 {0,0,0,0,0,0}, 1217 {0,0,0,0,0,0}, 1218 {18,20,a1r,V,0,0}, /* ld.b.t */ 1219 {18,21,a1r,V,0,0}, /* ld.h.t */ 1220 {18,22,a1r,V,0,0}, /* ld.w.t */ 1221 {18,23,a1r,V,0,0}, /* ld.l.t */ 1222 {21,20,a2r,V,0,0}, /* st.b.t */ 1223 {21,21,a2r,V,0,0}, /* st.h.t */ 1224 {21,22,a2r,V,0,0}, /* st.w.t */ 1225 {21,23,a2r,V,0,0}, /* st.l.t */ 1226 }; 1227 1228 const struct formstr e1_format2[] = { 1229 {0,0,0,0,0,0}, 1230 {0,0,0,0,0,0}, 1231 {0,0,0,0,0,0}, 1232 {0,0,0,0,0,0}, 1233 {28,20,rr,V,V,0}, /* cvtw.b.t */ 1234 {28,21,rr,V,V,0}, /* cvtw.h.t */ 1235 {29,22,rr,V,V,0}, /* cvtb.w.t */ 1236 {30,22,rr,V,V,0}, /* cvth.w.t */ 1237 {0,0,0,0,0,0}, 1238 {0,0,0,0,0,0}, 1239 {0,0,0,0,0,0}, 1240 {0,0,0,0,0,0}, 1241 {31,23,rr,V,V,0}, /* cvts.l.t */ 1242 {32,22,rr,V,V,0}, /* cvtd.w.t */ 1243 {33,18,rr,V,V,0}, /* cvtl.s.t */ 1244 {28,19,rr,V,V,0}, /* cvtw.d.t */ 1245 {0,0,0,0,0,0}, 1246 {0,0,0,0,0,0}, 1247 {0,0,0,0,0,0}, 1248 {0,0,0,0,0,0}, 1249 {0,0,0,0,0,0}, 1250 {0,0,0,0,0,0}, 1251 {0,0,0,0,0,0}, 1252 {0,0,0,0,0,0}, 1253 {0,0,0,0,0,0}, 1254 {0,0,0,0,0,0}, 1255 {0,0,0,0,0,0}, 1256 {0,0,0,0,0,0}, 1257 {0,0,0,0,0,0}, 1258 {0,0,0,0,0,0}, 1259 {0,0,0,0,0,0}, 1260 {0,0,0,0,0,0}, 1261 {0,0,0,0,0,0}, 1262 {0,0,0,0,0,0}, 1263 {0,0,0,0,0,0}, 1264 {0,0,0,0,0,0}, 1265 {0,0,0,0,0,0}, 1266 {0,0,0,0,0,0}, 1267 {0,0,0,0,0,0}, 1268 {0,0,0,0,0,0}, 1269 {0,0,0,0,0,0}, 1270 {0,0,0,0,0,0}, 1271 {0,0,0,0,0,0}, 1272 {0,0,0,0,0,0}, 1273 {0,0,0,0,0,0}, 1274 {0,0,0,0,0,0}, 1275 {0,0,0,0,0,0}, 1276 {0,0,0,0,0,0}, 1277 {0,0,0,0,0,0}, 1278 {0,0,0,0,0,0}, 1279 {0,0,0,0,0,0}, 1280 {0,0,0,0,0,0}, 1281 {0,0,0,0,0,0}, 1282 {0,0,0,0,0,0}, 1283 {0,0,0,0,0,0}, 1284 {0,0,0,0,0,0}, 1285 {0,0,0,0,0,0}, 1286 {0,0,0,0,0,0}, 1287 {0,0,0,0,0,0}, 1288 {0,0,0,0,0,0}, 1289 {0,0,0,0,0,0}, 1290 {0,0,0,0,0,0}, 1291 {0,0,0,0,0,0}, 1292 {0,0,0,0,0,0}, 1293 {0,0,0,0,0,0}, 1294 {0,0,0,0,0,0}, 1295 {0,0,0,0,0,0}, 1296 {0,0,0,0,0,0}, 1297 {0,0,0,0,0,0}, 1298 {0,0,0,0,0,0}, 1299 {0,0,0,0,0,0}, 1300 {0,0,0,0,0,0}, 1301 {0,0,0,0,0,0}, 1302 {0,0,0,0,0,0}, 1303 {0,0,0,0,0,0}, 1304 {0,0,0,0,0,0}, 1305 {0,0,0,0,0,0}, 1306 {0,0,0,0,0,0}, 1307 {0,0,0,0,0,0}, 1308 {0,0,0,0,0,0}, 1309 {0,0,0,0,0,0}, 1310 {0,0,0,0,0,0}, 1311 {0,0,0,0,0,0}, 1312 {0,0,0,0,0,0}, 1313 {0,0,0,0,0,0}, 1314 {0,0,0,0,0,0}, 1315 {0,0,0,0,0,0}, 1316 {0,0,0,0,0,0}, 1317 {0,0,0,0,0,0}, 1318 {0,0,0,0,0,0}, 1319 {0,0,0,0,0,0}, 1320 {0,0,0,0,0,0}, 1321 {0,0,0,0,0,0}, 1322 {0,0,0,0,0,0}, 1323 {0,0,0,0,0,0}, 1324 {0,0,0,0,0,0}, 1325 {0,0,0,0,0,0}, 1326 {0,0,0,0,0,0}, 1327 {0,0,0,0,0,0}, 1328 {0,0,0,0,0,0}, 1329 {0,0,0,0,0,0}, 1330 {0,0,0,0,0,0}, 1331 {116,18,rr,V,V,0}, /* frint.s.t */ 1332 {116,19,rr,V,V,0}, /* frint.d.t */ 1333 {0,0,0,0,0,0}, 1334 {0,0,0,0,0,0}, 1335 {0,0,0,0,0,0}, 1336 {0,0,0,0,0,0}, 1337 {0,0,0,0,0,0}, 1338 {0,0,0,0,0,0}, 1339 {0,0,0,0,0,0}, 1340 {0,0,0,0,0,0}, 1341 {0,0,0,0,0,0}, 1342 {0,0,0,0,0,0}, 1343 {0,0,0,0,0,0}, 1344 {0,0,0,0,0,0}, 1345 {0,0,0,0,0,0}, 1346 {0,0,0,0,0,0}, 1347 {0,0,0,0,0,0}, 1348 {0,0,0,0,0,0}, 1349 {0,0,0,0,0,0}, 1350 {0,0,0,0,0,0}, 1351 {0,0,0,0,0,0}, 1352 {0,0,0,0,0,0}, 1353 {81,18,rr,V,V,0}, /* sqrt.s.t */ 1354 {81,19,rr,V,V,0}, /* sqrt.d.t */ 1355 {0,0,0,0,0,0}, 1356 {0,0,0,0,0,0}, 1357 }; 1358 1359 const struct formstr e1_format3[] = { 1360 {32,18,rr,V,V,0}, /* cvtd.s.t */ 1361 {31,19,rr,V,V,0}, /* cvts.d.t */ 1362 {33,19,rr,V,V,0}, /* cvtl.d.t */ 1363 {32,23,rr,V,V,0}, /* cvtd.l.t */ 1364 {0,0,0,0,0,0}, 1365 {0,0,0,0,0,0}, 1366 {0,0,0,0,0,0}, 1367 {0,0,0,0,0,0}, 1368 {36,1,rr,V,V,0}, /* tzc.t */ 1369 {44,1,rr,V,V,0}, /* lop.t */ 1370 {117,1,rr,V,V,0}, /* xpnd.t */ 1371 {42,1,rr,V,V,0}, /* not.t */ 1372 {8,1,rr,S,V,0}, /* shf.t */ 1373 {35,24,rr,V,V,0}, /* plc.t.t */ 1374 {0,0,0,0,0,0}, 1375 {0,0,0,0,0,0}, 1376 {37,18,rr,V,V,0}, /* eq.s.t */ 1377 {37,19,rr,V,V,0}, /* eq.d.t */ 1378 {43,18,rr,V,V,0}, /* neg.s.t */ 1379 {43,19,rr,V,V,0}, /* neg.d.t */ 1380 {37,18,rr,S,V,0}, /* eq.s.t */ 1381 {37,19,rr,S,V,0}, /* eq.d.t */ 1382 {0,0,0,0,0,0}, 1383 {0,0,0,0,0,0}, 1384 {40,18,rr,V,V,0}, /* le.s.t */ 1385 {40,19,rr,V,V,0}, /* le.d.t */ 1386 {41,18,rr,V,V,0}, /* lt.s.t */ 1387 {41,19,rr,V,V,0}, /* lt.d.t */ 1388 {40,18,rr,S,V,0}, /* le.s.t */ 1389 {40,19,rr,S,V,0}, /* le.d.t */ 1390 {41,18,rr,S,V,0}, /* lt.s.t */ 1391 {41,19,rr,S,V,0}, /* lt.d.t */ 1392 {37,20,rr,V,V,0}, /* eq.b.t */ 1393 {37,21,rr,V,V,0}, /* eq.h.t */ 1394 {37,22,rr,V,V,0}, /* eq.w.t */ 1395 {37,23,rr,V,V,0}, /* eq.l.t */ 1396 {37,20,rr,S,V,0}, /* eq.b.t */ 1397 {37,21,rr,S,V,0}, /* eq.h.t */ 1398 {37,22,rr,S,V,0}, /* eq.w.t */ 1399 {37,23,rr,S,V,0}, /* eq.l.t */ 1400 {40,20,rr,V,V,0}, /* le.b.t */ 1401 {40,21,rr,V,V,0}, /* le.h.t */ 1402 {40,22,rr,V,V,0}, /* le.w.t */ 1403 {40,23,rr,V,V,0}, /* le.l.t */ 1404 {40,20,rr,S,V,0}, /* le.b.t */ 1405 {40,21,rr,S,V,0}, /* le.h.t */ 1406 {40,22,rr,S,V,0}, /* le.w.t */ 1407 {40,23,rr,S,V,0}, /* le.l.t */ 1408 {41,20,rr,V,V,0}, /* lt.b.t */ 1409 {41,21,rr,V,V,0}, /* lt.h.t */ 1410 {41,22,rr,V,V,0}, /* lt.w.t */ 1411 {41,23,rr,V,V,0}, /* lt.l.t */ 1412 {41,20,rr,S,V,0}, /* lt.b.t */ 1413 {41,21,rr,S,V,0}, /* lt.h.t */ 1414 {41,22,rr,S,V,0}, /* lt.w.t */ 1415 {41,23,rr,S,V,0}, /* lt.l.t */ 1416 {43,20,rr,V,V,0}, /* neg.b.t */ 1417 {43,21,rr,V,V,0}, /* neg.h.t */ 1418 {43,22,rr,V,V,0}, /* neg.w.t */ 1419 {43,23,rr,V,V,0}, /* neg.l.t */ 1420 {0,0,0,0,0,0}, 1421 {0,0,0,0,0,0}, 1422 {0,0,0,0,0,0}, 1423 {0,0,0,0,0,0}, 1424 }; 1425 1426 const struct formstr e1_format4[] = { 1427 {0,0,0,0,0,0}, 1428 {0,0,0,0,0,0}, 1429 {0,0,0,0,0,0}, 1430 {0,0,0,0,0,0}, 1431 {0,0,0,0,0,0}, 1432 {0,0,0,0,0,0}, 1433 {0,0,0,0,0,0}, 1434 {0,0,0,0,0,0}, 1435 }; 1436 1437 const struct formstr e1_format5[] = { 1438 {51,20,rr,V,V,0}, /* ldvi.b.t */ 1439 {51,21,rr,V,V,0}, /* ldvi.h.t */ 1440 {51,22,rr,V,V,0}, /* ldvi.w.t */ 1441 {51,23,rr,V,V,0}, /* ldvi.l.t */ 1442 {28,18,rr,V,V,0}, /* cvtw.s.t */ 1443 {31,22,rr,V,V,0}, /* cvts.w.t */ 1444 {28,23,rr,V,V,0}, /* cvtw.l.t */ 1445 {33,22,rr,V,V,0}, /* cvtl.w.t */ 1446 {52,20,rxr,V,V,0}, /* stvi.b.t */ 1447 {52,21,rxr,V,V,0}, /* stvi.h.t */ 1448 {52,22,rxr,V,V,0}, /* stvi.w.t */ 1449 {52,23,rxr,V,V,0}, /* stvi.l.t */ 1450 {52,20,rxr,S,V,0}, /* stvi.b.t */ 1451 {52,21,rxr,S,V,0}, /* stvi.h.t */ 1452 {52,22,rxr,S,V,0}, /* stvi.w.t */ 1453 {52,23,rxr,S,V,0}, /* stvi.l.t */ 1454 }; 1455 1456 const struct formstr e1_format6[] = { 1457 {0,0,0,0,0,0}, 1458 {0,0,0,0,0,0}, 1459 {0,0,0,0,0,0}, 1460 {0,0,0,0,0,0}, 1461 {0,0,0,0,0,0}, 1462 {0,0,0,0,0,0}, 1463 {0,0,0,0,0,0}, 1464 {0,0,0,0,0,0}, 1465 {0,0,0,0,0,0}, 1466 {0,0,0,0,0,0}, 1467 {0,0,0,0,0,0}, 1468 {0,0,0,0,0,0}, 1469 {0,0,0,0,0,0}, 1470 {0,0,0,0,0,0}, 1471 {0,0,0,0,0,0}, 1472 {0,0,0,0,0,0}, 1473 {0,0,0,0,0,0}, 1474 {0,0,0,0,0,0}, 1475 {0,0,0,0,0,0}, 1476 {0,0,0,0,0,0}, 1477 {0,0,0,0,0,0}, 1478 {0,0,0,0,0,0}, 1479 {0,0,0,0,0,0}, 1480 {0,0,0,0,0,0}, 1481 {0,0,0,0,0,0}, 1482 {0,0,0,0,0,0}, 1483 {0,0,0,0,0,0}, 1484 {0,0,0,0,0,0}, 1485 {0,0,0,0,0,0}, 1486 {0,0,0,0,0,0}, 1487 {0,0,0,0,0,0}, 1488 {0,0,0,0,0,0}, 1489 {0,0,0,0,0,0}, 1490 {0,0,0,0,0,0}, 1491 {0,0,0,0,0,0}, 1492 {0,0,0,0,0,0}, 1493 {0,0,0,0,0,0}, 1494 {0,0,0,0,0,0}, 1495 {0,0,0,0,0,0}, 1496 {0,0,0,0,0,0}, 1497 {0,0,0,0,0,0}, 1498 {0,0,0,0,0,0}, 1499 {0,0,0,0,0,0}, 1500 {0,0,0,0,0,0}, 1501 {0,0,0,0,0,0}, 1502 {0,0,0,0,0,0}, 1503 {0,0,0,0,0,0}, 1504 {0,0,0,0,0,0}, 1505 {0,0,0,0,0,0}, 1506 {0,0,0,0,0,0}, 1507 {0,0,0,0,0,0}, 1508 {0,0,0,0,0,0}, 1509 {0,0,0,0,0,0}, 1510 {0,0,0,0,0,0}, 1511 {0,0,0,0,0,0}, 1512 {0,0,0,0,0,0}, 1513 {0,0,0,0,0,0}, 1514 {0,0,0,0,0,0}, 1515 {0,0,0,0,0,0}, 1516 {0,0,0,0,0,0}, 1517 {0,0,0,0,0,0}, 1518 {0,0,0,0,0,0}, 1519 {0,0,0,0,0,0}, 1520 {0,0,0,0,0,0}, 1521 }; 1522 1523 const struct formstr e1_format7[] = { 1524 {84,20,r,V,0,0}, /* sum.b.t */ 1525 {84,21,r,V,0,0}, /* sum.h.t */ 1526 {84,22,r,V,0,0}, /* sum.w.t */ 1527 {84,23,r,V,0,0}, /* sum.l.t */ 1528 {85,1,r,V,0,0}, /* all.t */ 1529 {86,1,r,V,0,0}, /* any.t */ 1530 {87,1,r,V,0,0}, /* parity.t */ 1531 {0,0,0,0,0,0}, 1532 {88,20,r,V,0,0}, /* max.b.t */ 1533 {88,21,r,V,0,0}, /* max.h.t */ 1534 {88,22,r,V,0,0}, /* max.w.t */ 1535 {88,23,r,V,0,0}, /* max.l.t */ 1536 {89,20,r,V,0,0}, /* min.b.t */ 1537 {89,21,r,V,0,0}, /* min.h.t */ 1538 {89,22,r,V,0,0}, /* min.w.t */ 1539 {89,23,r,V,0,0}, /* min.l.t */ 1540 {84,18,r,V,0,0}, /* sum.s.t */ 1541 {84,19,r,V,0,0}, /* sum.d.t */ 1542 {90,18,r,V,0,0}, /* prod.s.t */ 1543 {90,19,r,V,0,0}, /* prod.d.t */ 1544 {88,18,r,V,0,0}, /* max.s.t */ 1545 {88,19,r,V,0,0}, /* max.d.t */ 1546 {89,18,r,V,0,0}, /* min.s.t */ 1547 {89,19,r,V,0,0}, /* min.d.t */ 1548 {90,20,r,V,0,0}, /* prod.b.t */ 1549 {90,21,r,V,0,0}, /* prod.h.t */ 1550 {90,22,r,V,0,0}, /* prod.w.t */ 1551 {90,23,r,V,0,0}, /* prod.l.t */ 1552 {0,0,0,0,0,0}, 1553 {0,0,0,0,0,0}, 1554 {0,0,0,0,0,0}, 1555 {0,0,0,0,0,0}, 1556 }; 1557 1558 char *lop[] = { 1559 "mov", /* 0 */ 1560 "merg", /* 1 */ 1561 "mask", /* 2 */ 1562 "mul", /* 3 */ 1563 "div", /* 4 */ 1564 "and", /* 5 */ 1565 "or", /* 6 */ 1566 "xor", /* 7 */ 1567 "shf", /* 8 */ 1568 "add", /* 9 */ 1569 "sub", /* 10 */ 1570 "exit", /* 11 */ 1571 "jmp", /* 12 */ 1572 "jmpi", /* 13 */ 1573 "jmpa", /* 14 */ 1574 "jmps", /* 15 */ 1575 "tac", /* 16 */ 1576 "ldea", /* 17 */ 1577 "ld", /* 18 */ 1578 "tas", /* 19 */ 1579 "pshea", /* 20 */ 1580 "st", /* 21 */ 1581 "call", /* 22 */ 1582 "calls", /* 23 */ 1583 "callq", /* 24 */ 1584 "pfork", /* 25 */ 1585 "ste", /* 26 */ 1586 "incr", /* 27 */ 1587 "cvtw", /* 28 */ 1588 "cvtb", /* 29 */ 1589 "cvth", /* 30 */ 1590 "cvts", /* 31 */ 1591 "cvtd", /* 32 */ 1592 "cvtl", /* 33 */ 1593 "ldpa", /* 34 */ 1594 "plc", /* 35 */ 1595 "tzc", /* 36 */ 1596 "eq", /* 37 */ 1597 "leu", /* 38 */ 1598 "ltu", /* 39 */ 1599 "le", /* 40 */ 1600 "lt", /* 41 */ 1601 "not", /* 42 */ 1602 "neg", /* 43 */ 1603 "lop", /* 44 */ 1604 "cprs", /* 45 */ 1605 "nop", /* 46 */ 1606 "br", /* 47 */ 1607 "bri", /* 48 */ 1608 "bra", /* 49 */ 1609 "brs", /* 50 */ 1610 "ldvi", /* 51 */ 1611 "stvi", /* 52 */ 1612 "ldsdr", /* 53 */ 1613 "ldkdr", /* 54 */ 1614 "ln", /* 55 */ 1615 "patu", /* 56 */ 1616 "pate", /* 57 */ 1617 "pich", /* 58 */ 1618 "plch", /* 59 */ 1619 "idle", /* 60 */ 1620 "rtnq", /* 61 */ 1621 "cfork", /* 62 */ 1622 "rtn", /* 63 */ 1623 "wfork", /* 64 */ 1624 "join", /* 65 */ 1625 "rtnc", /* 66 */ 1626 "exp", /* 67 */ 1627 "sin", /* 68 */ 1628 "cos", /* 69 */ 1629 "psh", /* 70 */ 1630 "pop", /* 71 */ 1631 "eni", /* 72 */ 1632 "dsi", /* 73 */ 1633 "bkpt", /* 74 */ 1634 "msync", /* 75 */ 1635 "mski", /* 76 */ 1636 "xmti", /* 77 */ 1637 "tstvv", /* 78 */ 1638 "diag", /* 79 */ 1639 "pbkpt", /* 80 */ 1640 "sqrt", /* 81 */ 1641 "casr", /* 82 */ 1642 "atan", /* 83 */ 1643 "sum", /* 84 */ 1644 "all", /* 85 */ 1645 "any", /* 86 */ 1646 "parity", /* 87 */ 1647 "max", /* 88 */ 1648 "min", /* 89 */ 1649 "prod", /* 90 */ 1650 "halt", /* 91 */ 1651 "sysc", /* 92 */ 1652 "trap", /* 93 */ 1653 "tst", /* 94 */ 1654 "lck", /* 95 */ 1655 "ulk", /* 96 */ 1656 "spawn", /* 97 */ 1657 "ldcmr", /* 98 */ 1658 "stcmr", /* 99 */ 1659 "popr", /* 100 */ 1660 "pshr", /* 101 */ 1661 "rcvr", /* 102 */ 1662 "matm", /* 103 */ 1663 "sndr", /* 104 */ 1664 "putr", /* 105 */ 1665 "getr", /* 106 */ 1666 "matr", /* 107 */ 1667 "mat", /* 108 */ 1668 "get", /* 109 */ 1669 "rcv", /* 110 */ 1670 "inc", /* 111 */ 1671 "put", /* 112 */ 1672 "snd", /* 113 */ 1673 "enal", /* 114 */ 1674 "enag", /* 115 */ 1675 "frint", /* 116 */ 1676 "xpnd", /* 117 */ 1677 "ctrsl", /* 118 */ 1678 "ctrsg", /* 119 */ 1679 "stop", /* 120 */ 1680 }; 1681 1682 char *rop[] = { 1683 "", /* 0 */ 1684 ".t", /* 1 */ 1685 ".f", /* 2 */ 1686 ".s", /* 3 */ 1687 ".d", /* 4 */ 1688 ".b", /* 5 */ 1689 ".h", /* 6 */ 1690 ".w", /* 7 */ 1691 ".l", /* 8 */ 1692 ".x", /* 9 */ 1693 ".u", /* 10 */ 1694 ".s.f", /* 11 */ 1695 ".d.f", /* 12 */ 1696 ".b.f", /* 13 */ 1697 ".h.f", /* 14 */ 1698 ".w.f", /* 15 */ 1699 ".l.f", /* 16 */ 1700 ".t.f", /* 17 */ 1701 ".s.t", /* 18 */ 1702 ".d.t", /* 19 */ 1703 ".b.t", /* 20 */ 1704 ".h.t", /* 21 */ 1705 ".w.t", /* 22 */ 1706 ".l.t", /* 23 */ 1707 ".t.t", /* 24 */ 1708 }; 1709