1 #ifndef CAPSTONE_MIPS_H 2 #define CAPSTONE_MIPS_H 3 4 /* Capstone Disassembly Engine */ 5 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */ 6 7 #ifdef __cplusplus 8 extern "C" { 9 #endif 10 11 #if !defined(_MSC_VER) || !defined(_KERNEL_MODE) 12 #include <stdint.h> 13 #endif 14 15 #include "platform.h" 16 17 // GCC MIPS toolchain has a default macro called "mips" which breaks 18 // compilation 19 #undef mips 20 21 #ifdef _MSC_VER 22 #pragma warning(disable:4201) 23 #endif 24 25 //> Operand type for instruction's operands 26 typedef enum mips_op_type { 27 MIPS_OP_INVALID = 0, // = CS_OP_INVALID (Uninitialized). 28 MIPS_OP_REG, // = CS_OP_REG (Register operand). 29 MIPS_OP_IMM, // = CS_OP_IMM (Immediate operand). 30 MIPS_OP_MEM, // = CS_OP_MEM (Memory operand). 31 } mips_op_type; 32 33 // Instruction's operand referring to memory 34 // This is associated with MIPS_OP_MEM operand type above 35 typedef struct mips_op_mem { 36 unsigned int base; // base register 37 int64_t disp; // displacement/offset value 38 } mips_op_mem; 39 40 // Instruction operand 41 typedef struct cs_mips_op { 42 mips_op_type type; // operand type 43 union { 44 unsigned int reg; // register value for REG operand 45 int64_t imm; // immediate value for IMM operand 46 mips_op_mem mem; // base/index/scale/disp value for MEM operand 47 }; 48 } cs_mips_op; 49 50 // Instruction structure 51 typedef struct cs_mips { 52 // Number of operands of this instruction, 53 // or 0 when instruction has no operand. 54 uint8_t op_count; 55 cs_mips_op operands[8]; // operands for this instruction. 56 } cs_mips; 57 58 //> MIPS registers 59 typedef enum mips_reg { 60 MIPS_REG_INVALID = 0, 61 //> General purpose registers 62 MIPS_REG_0, 63 MIPS_REG_1, 64 MIPS_REG_2, 65 MIPS_REG_3, 66 MIPS_REG_4, 67 MIPS_REG_5, 68 MIPS_REG_6, 69 MIPS_REG_7, 70 MIPS_REG_8, 71 MIPS_REG_9, 72 MIPS_REG_10, 73 MIPS_REG_11, 74 MIPS_REG_12, 75 MIPS_REG_13, 76 MIPS_REG_14, 77 MIPS_REG_15, 78 MIPS_REG_16, 79 MIPS_REG_17, 80 MIPS_REG_18, 81 MIPS_REG_19, 82 MIPS_REG_20, 83 MIPS_REG_21, 84 MIPS_REG_22, 85 MIPS_REG_23, 86 MIPS_REG_24, 87 MIPS_REG_25, 88 MIPS_REG_26, 89 MIPS_REG_27, 90 MIPS_REG_28, 91 MIPS_REG_29, 92 MIPS_REG_30, 93 MIPS_REG_31, 94 95 //> DSP registers 96 MIPS_REG_DSPCCOND, 97 MIPS_REG_DSPCARRY, 98 MIPS_REG_DSPEFI, 99 MIPS_REG_DSPOUTFLAG, 100 MIPS_REG_DSPOUTFLAG16_19, 101 MIPS_REG_DSPOUTFLAG20, 102 MIPS_REG_DSPOUTFLAG21, 103 MIPS_REG_DSPOUTFLAG22, 104 MIPS_REG_DSPOUTFLAG23, 105 MIPS_REG_DSPPOS, 106 MIPS_REG_DSPSCOUNT, 107 108 //> ACC registers 109 MIPS_REG_AC0, 110 MIPS_REG_AC1, 111 MIPS_REG_AC2, 112 MIPS_REG_AC3, 113 114 //> COP registers 115 MIPS_REG_CC0, 116 MIPS_REG_CC1, 117 MIPS_REG_CC2, 118 MIPS_REG_CC3, 119 MIPS_REG_CC4, 120 MIPS_REG_CC5, 121 MIPS_REG_CC6, 122 MIPS_REG_CC7, 123 124 //> FPU registers 125 MIPS_REG_F0, 126 MIPS_REG_F1, 127 MIPS_REG_F2, 128 MIPS_REG_F3, 129 MIPS_REG_F4, 130 MIPS_REG_F5, 131 MIPS_REG_F6, 132 MIPS_REG_F7, 133 MIPS_REG_F8, 134 MIPS_REG_F9, 135 MIPS_REG_F10, 136 MIPS_REG_F11, 137 MIPS_REG_F12, 138 MIPS_REG_F13, 139 MIPS_REG_F14, 140 MIPS_REG_F15, 141 MIPS_REG_F16, 142 MIPS_REG_F17, 143 MIPS_REG_F18, 144 MIPS_REG_F19, 145 MIPS_REG_F20, 146 MIPS_REG_F21, 147 MIPS_REG_F22, 148 MIPS_REG_F23, 149 MIPS_REG_F24, 150 MIPS_REG_F25, 151 MIPS_REG_F26, 152 MIPS_REG_F27, 153 MIPS_REG_F28, 154 MIPS_REG_F29, 155 MIPS_REG_F30, 156 MIPS_REG_F31, 157 158 MIPS_REG_FCC0, 159 MIPS_REG_FCC1, 160 MIPS_REG_FCC2, 161 MIPS_REG_FCC3, 162 MIPS_REG_FCC4, 163 MIPS_REG_FCC5, 164 MIPS_REG_FCC6, 165 MIPS_REG_FCC7, 166 167 //> AFPR128 168 MIPS_REG_W0, 169 MIPS_REG_W1, 170 MIPS_REG_W2, 171 MIPS_REG_W3, 172 MIPS_REG_W4, 173 MIPS_REG_W5, 174 MIPS_REG_W6, 175 MIPS_REG_W7, 176 MIPS_REG_W8, 177 MIPS_REG_W9, 178 MIPS_REG_W10, 179 MIPS_REG_W11, 180 MIPS_REG_W12, 181 MIPS_REG_W13, 182 MIPS_REG_W14, 183 MIPS_REG_W15, 184 MIPS_REG_W16, 185 MIPS_REG_W17, 186 MIPS_REG_W18, 187 MIPS_REG_W19, 188 MIPS_REG_W20, 189 MIPS_REG_W21, 190 MIPS_REG_W22, 191 MIPS_REG_W23, 192 MIPS_REG_W24, 193 MIPS_REG_W25, 194 MIPS_REG_W26, 195 MIPS_REG_W27, 196 MIPS_REG_W28, 197 MIPS_REG_W29, 198 MIPS_REG_W30, 199 MIPS_REG_W31, 200 201 MIPS_REG_HI, 202 MIPS_REG_LO, 203 204 MIPS_REG_P0, 205 MIPS_REG_P1, 206 MIPS_REG_P2, 207 208 MIPS_REG_MPL0, 209 MIPS_REG_MPL1, 210 MIPS_REG_MPL2, 211 212 MIPS_REG_ENDING, // <-- mark the end of the list or registers 213 214 // alias registers 215 MIPS_REG_ZERO = MIPS_REG_0, 216 MIPS_REG_AT = MIPS_REG_1, 217 MIPS_REG_V0 = MIPS_REG_2, 218 MIPS_REG_V1 = MIPS_REG_3, 219 MIPS_REG_A0 = MIPS_REG_4, 220 MIPS_REG_A1 = MIPS_REG_5, 221 MIPS_REG_A2 = MIPS_REG_6, 222 MIPS_REG_A3 = MIPS_REG_7, 223 MIPS_REG_T0 = MIPS_REG_8, 224 MIPS_REG_T1 = MIPS_REG_9, 225 MIPS_REG_T2 = MIPS_REG_10, 226 MIPS_REG_T3 = MIPS_REG_11, 227 MIPS_REG_T4 = MIPS_REG_12, 228 MIPS_REG_T5 = MIPS_REG_13, 229 MIPS_REG_T6 = MIPS_REG_14, 230 MIPS_REG_T7 = MIPS_REG_15, 231 MIPS_REG_S0 = MIPS_REG_16, 232 MIPS_REG_S1 = MIPS_REG_17, 233 MIPS_REG_S2 = MIPS_REG_18, 234 MIPS_REG_S3 = MIPS_REG_19, 235 MIPS_REG_S4 = MIPS_REG_20, 236 MIPS_REG_S5 = MIPS_REG_21, 237 MIPS_REG_S6 = MIPS_REG_22, 238 MIPS_REG_S7 = MIPS_REG_23, 239 MIPS_REG_T8 = MIPS_REG_24, 240 MIPS_REG_T9 = MIPS_REG_25, 241 MIPS_REG_K0 = MIPS_REG_26, 242 MIPS_REG_K1 = MIPS_REG_27, 243 MIPS_REG_GP = MIPS_REG_28, 244 MIPS_REG_SP = MIPS_REG_29, 245 MIPS_REG_FP = MIPS_REG_30, MIPS_REG_S8 = MIPS_REG_30, 246 MIPS_REG_RA = MIPS_REG_31, 247 248 MIPS_REG_HI0 = MIPS_REG_AC0, 249 MIPS_REG_HI1 = MIPS_REG_AC1, 250 MIPS_REG_HI2 = MIPS_REG_AC2, 251 MIPS_REG_HI3 = MIPS_REG_AC3, 252 253 MIPS_REG_LO0 = MIPS_REG_HI0, 254 MIPS_REG_LO1 = MIPS_REG_HI1, 255 MIPS_REG_LO2 = MIPS_REG_HI2, 256 MIPS_REG_LO3 = MIPS_REG_HI3, 257 } mips_reg; 258 259 //> MIPS instruction 260 typedef enum mips_insn { 261 MIPS_INS_INVALID = 0, 262 263 MIPS_INS_ABSQ_S, 264 MIPS_INS_ADD, 265 MIPS_INS_ADDIUPC, 266 MIPS_INS_ADDQH, 267 MIPS_INS_ADDQH_R, 268 MIPS_INS_ADDQ, 269 MIPS_INS_ADDQ_S, 270 MIPS_INS_ADDSC, 271 MIPS_INS_ADDS_A, 272 MIPS_INS_ADDS_S, 273 MIPS_INS_ADDS_U, 274 MIPS_INS_ADDUH, 275 MIPS_INS_ADDUH_R, 276 MIPS_INS_ADDU, 277 MIPS_INS_ADDU_S, 278 MIPS_INS_ADDVI, 279 MIPS_INS_ADDV, 280 MIPS_INS_ADDWC, 281 MIPS_INS_ADD_A, 282 MIPS_INS_ADDI, 283 MIPS_INS_ADDIU, 284 MIPS_INS_ALIGN, 285 MIPS_INS_ALUIPC, 286 MIPS_INS_AND, 287 MIPS_INS_ANDI, 288 MIPS_INS_APPEND, 289 MIPS_INS_ASUB_S, 290 MIPS_INS_ASUB_U, 291 MIPS_INS_AUI, 292 MIPS_INS_AUIPC, 293 MIPS_INS_AVER_S, 294 MIPS_INS_AVER_U, 295 MIPS_INS_AVE_S, 296 MIPS_INS_AVE_U, 297 MIPS_INS_BADDU, 298 MIPS_INS_BAL, 299 MIPS_INS_BALC, 300 MIPS_INS_BALIGN, 301 MIPS_INS_BC, 302 MIPS_INS_BC0F, 303 MIPS_INS_BC0FL, 304 MIPS_INS_BC0T, 305 MIPS_INS_BC0TL, 306 MIPS_INS_BC1EQZ, 307 MIPS_INS_BC1F, 308 MIPS_INS_BC1FL, 309 MIPS_INS_BC1NEZ, 310 MIPS_INS_BC1T, 311 MIPS_INS_BC1TL, 312 MIPS_INS_BC2EQZ, 313 MIPS_INS_BC2F, 314 MIPS_INS_BC2FL, 315 MIPS_INS_BC2NEZ, 316 MIPS_INS_BC2T, 317 MIPS_INS_BC2TL, 318 MIPS_INS_BC3F, 319 MIPS_INS_BC3FL, 320 MIPS_INS_BC3T, 321 MIPS_INS_BC3TL, 322 MIPS_INS_BCLRI, 323 MIPS_INS_BCLR, 324 MIPS_INS_BEQ, 325 MIPS_INS_BEQC, 326 MIPS_INS_BEQL, 327 MIPS_INS_BEQZALC, 328 MIPS_INS_BEQZC, 329 MIPS_INS_BGEC, 330 MIPS_INS_BGEUC, 331 MIPS_INS_BGEZ, 332 MIPS_INS_BGEZAL, 333 MIPS_INS_BGEZALC, 334 MIPS_INS_BGEZALL, 335 MIPS_INS_BGEZALS, 336 MIPS_INS_BGEZC, 337 MIPS_INS_BGEZL, 338 MIPS_INS_BGTZ, 339 MIPS_INS_BGTZALC, 340 MIPS_INS_BGTZC, 341 MIPS_INS_BGTZL, 342 MIPS_INS_BINSLI, 343 MIPS_INS_BINSL, 344 MIPS_INS_BINSRI, 345 MIPS_INS_BINSR, 346 MIPS_INS_BITREV, 347 MIPS_INS_BITSWAP, 348 MIPS_INS_BLEZ, 349 MIPS_INS_BLEZALC, 350 MIPS_INS_BLEZC, 351 MIPS_INS_BLEZL, 352 MIPS_INS_BLTC, 353 MIPS_INS_BLTUC, 354 MIPS_INS_BLTZ, 355 MIPS_INS_BLTZAL, 356 MIPS_INS_BLTZALC, 357 MIPS_INS_BLTZALL, 358 MIPS_INS_BLTZALS, 359 MIPS_INS_BLTZC, 360 MIPS_INS_BLTZL, 361 MIPS_INS_BMNZI, 362 MIPS_INS_BMNZ, 363 MIPS_INS_BMZI, 364 MIPS_INS_BMZ, 365 MIPS_INS_BNE, 366 MIPS_INS_BNEC, 367 MIPS_INS_BNEGI, 368 MIPS_INS_BNEG, 369 MIPS_INS_BNEL, 370 MIPS_INS_BNEZALC, 371 MIPS_INS_BNEZC, 372 MIPS_INS_BNVC, 373 MIPS_INS_BNZ, 374 MIPS_INS_BOVC, 375 MIPS_INS_BPOSGE32, 376 MIPS_INS_BREAK, 377 MIPS_INS_BSELI, 378 MIPS_INS_BSEL, 379 MIPS_INS_BSETI, 380 MIPS_INS_BSET, 381 MIPS_INS_BZ, 382 MIPS_INS_BEQZ, 383 MIPS_INS_B, 384 MIPS_INS_BNEZ, 385 MIPS_INS_BTEQZ, 386 MIPS_INS_BTNEZ, 387 MIPS_INS_CACHE, 388 MIPS_INS_CEIL, 389 MIPS_INS_CEQI, 390 MIPS_INS_CEQ, 391 MIPS_INS_CFC1, 392 MIPS_INS_CFCMSA, 393 MIPS_INS_CINS, 394 MIPS_INS_CINS32, 395 MIPS_INS_CLASS, 396 MIPS_INS_CLEI_S, 397 MIPS_INS_CLEI_U, 398 MIPS_INS_CLE_S, 399 MIPS_INS_CLE_U, 400 MIPS_INS_CLO, 401 MIPS_INS_CLTI_S, 402 MIPS_INS_CLTI_U, 403 MIPS_INS_CLT_S, 404 MIPS_INS_CLT_U, 405 MIPS_INS_CLZ, 406 MIPS_INS_CMPGDU, 407 MIPS_INS_CMPGU, 408 MIPS_INS_CMPU, 409 MIPS_INS_CMP, 410 MIPS_INS_COPY_S, 411 MIPS_INS_COPY_U, 412 MIPS_INS_CTC1, 413 MIPS_INS_CTCMSA, 414 MIPS_INS_CVT, 415 MIPS_INS_C, 416 MIPS_INS_CMPI, 417 MIPS_INS_DADD, 418 MIPS_INS_DADDI, 419 MIPS_INS_DADDIU, 420 MIPS_INS_DADDU, 421 MIPS_INS_DAHI, 422 MIPS_INS_DALIGN, 423 MIPS_INS_DATI, 424 MIPS_INS_DAUI, 425 MIPS_INS_DBITSWAP, 426 MIPS_INS_DCLO, 427 MIPS_INS_DCLZ, 428 MIPS_INS_DDIV, 429 MIPS_INS_DDIVU, 430 MIPS_INS_DERET, 431 MIPS_INS_DEXT, 432 MIPS_INS_DEXTM, 433 MIPS_INS_DEXTU, 434 MIPS_INS_DI, 435 MIPS_INS_DINS, 436 MIPS_INS_DINSM, 437 MIPS_INS_DINSU, 438 MIPS_INS_DIV, 439 MIPS_INS_DIVU, 440 MIPS_INS_DIV_S, 441 MIPS_INS_DIV_U, 442 MIPS_INS_DLSA, 443 MIPS_INS_DMFC0, 444 MIPS_INS_DMFC1, 445 MIPS_INS_DMFC2, 446 MIPS_INS_DMOD, 447 MIPS_INS_DMODU, 448 MIPS_INS_DMTC0, 449 MIPS_INS_DMTC1, 450 MIPS_INS_DMTC2, 451 MIPS_INS_DMUH, 452 MIPS_INS_DMUHU, 453 MIPS_INS_DMUL, 454 MIPS_INS_DMULT, 455 MIPS_INS_DMULTU, 456 MIPS_INS_DMULU, 457 MIPS_INS_DOTP_S, 458 MIPS_INS_DOTP_U, 459 MIPS_INS_DPADD_S, 460 MIPS_INS_DPADD_U, 461 MIPS_INS_DPAQX_SA, 462 MIPS_INS_DPAQX_S, 463 MIPS_INS_DPAQ_SA, 464 MIPS_INS_DPAQ_S, 465 MIPS_INS_DPAU, 466 MIPS_INS_DPAX, 467 MIPS_INS_DPA, 468 MIPS_INS_DPOP, 469 MIPS_INS_DPSQX_SA, 470 MIPS_INS_DPSQX_S, 471 MIPS_INS_DPSQ_SA, 472 MIPS_INS_DPSQ_S, 473 MIPS_INS_DPSUB_S, 474 MIPS_INS_DPSUB_U, 475 MIPS_INS_DPSU, 476 MIPS_INS_DPSX, 477 MIPS_INS_DPS, 478 MIPS_INS_DROTR, 479 MIPS_INS_DROTR32, 480 MIPS_INS_DROTRV, 481 MIPS_INS_DSBH, 482 MIPS_INS_DSHD, 483 MIPS_INS_DSLL, 484 MIPS_INS_DSLL32, 485 MIPS_INS_DSLLV, 486 MIPS_INS_DSRA, 487 MIPS_INS_DSRA32, 488 MIPS_INS_DSRAV, 489 MIPS_INS_DSRL, 490 MIPS_INS_DSRL32, 491 MIPS_INS_DSRLV, 492 MIPS_INS_DSUB, 493 MIPS_INS_DSUBU, 494 MIPS_INS_EHB, 495 MIPS_INS_EI, 496 MIPS_INS_ERET, 497 MIPS_INS_EXT, 498 MIPS_INS_EXTP, 499 MIPS_INS_EXTPDP, 500 MIPS_INS_EXTPDPV, 501 MIPS_INS_EXTPV, 502 MIPS_INS_EXTRV_RS, 503 MIPS_INS_EXTRV_R, 504 MIPS_INS_EXTRV_S, 505 MIPS_INS_EXTRV, 506 MIPS_INS_EXTR_RS, 507 MIPS_INS_EXTR_R, 508 MIPS_INS_EXTR_S, 509 MIPS_INS_EXTR, 510 MIPS_INS_EXTS, 511 MIPS_INS_EXTS32, 512 MIPS_INS_ABS, 513 MIPS_INS_FADD, 514 MIPS_INS_FCAF, 515 MIPS_INS_FCEQ, 516 MIPS_INS_FCLASS, 517 MIPS_INS_FCLE, 518 MIPS_INS_FCLT, 519 MIPS_INS_FCNE, 520 MIPS_INS_FCOR, 521 MIPS_INS_FCUEQ, 522 MIPS_INS_FCULE, 523 MIPS_INS_FCULT, 524 MIPS_INS_FCUNE, 525 MIPS_INS_FCUN, 526 MIPS_INS_FDIV, 527 MIPS_INS_FEXDO, 528 MIPS_INS_FEXP2, 529 MIPS_INS_FEXUPL, 530 MIPS_INS_FEXUPR, 531 MIPS_INS_FFINT_S, 532 MIPS_INS_FFINT_U, 533 MIPS_INS_FFQL, 534 MIPS_INS_FFQR, 535 MIPS_INS_FILL, 536 MIPS_INS_FLOG2, 537 MIPS_INS_FLOOR, 538 MIPS_INS_FMADD, 539 MIPS_INS_FMAX_A, 540 MIPS_INS_FMAX, 541 MIPS_INS_FMIN_A, 542 MIPS_INS_FMIN, 543 MIPS_INS_MOV, 544 MIPS_INS_FMSUB, 545 MIPS_INS_FMUL, 546 MIPS_INS_MUL, 547 MIPS_INS_NEG, 548 MIPS_INS_FRCP, 549 MIPS_INS_FRINT, 550 MIPS_INS_FRSQRT, 551 MIPS_INS_FSAF, 552 MIPS_INS_FSEQ, 553 MIPS_INS_FSLE, 554 MIPS_INS_FSLT, 555 MIPS_INS_FSNE, 556 MIPS_INS_FSOR, 557 MIPS_INS_FSQRT, 558 MIPS_INS_SQRT, 559 MIPS_INS_FSUB, 560 MIPS_INS_SUB, 561 MIPS_INS_FSUEQ, 562 MIPS_INS_FSULE, 563 MIPS_INS_FSULT, 564 MIPS_INS_FSUNE, 565 MIPS_INS_FSUN, 566 MIPS_INS_FTINT_S, 567 MIPS_INS_FTINT_U, 568 MIPS_INS_FTQ, 569 MIPS_INS_FTRUNC_S, 570 MIPS_INS_FTRUNC_U, 571 MIPS_INS_HADD_S, 572 MIPS_INS_HADD_U, 573 MIPS_INS_HSUB_S, 574 MIPS_INS_HSUB_U, 575 MIPS_INS_ILVEV, 576 MIPS_INS_ILVL, 577 MIPS_INS_ILVOD, 578 MIPS_INS_ILVR, 579 MIPS_INS_INS, 580 MIPS_INS_INSERT, 581 MIPS_INS_INSV, 582 MIPS_INS_INSVE, 583 MIPS_INS_J, 584 MIPS_INS_JAL, 585 MIPS_INS_JALR, 586 MIPS_INS_JALRS, 587 MIPS_INS_JALS, 588 MIPS_INS_JALX, 589 MIPS_INS_JIALC, 590 MIPS_INS_JIC, 591 MIPS_INS_JR, 592 MIPS_INS_JRADDIUSP, 593 MIPS_INS_JRC, 594 MIPS_INS_JALRC, 595 MIPS_INS_LB, 596 MIPS_INS_LBUX, 597 MIPS_INS_LBU, 598 MIPS_INS_LD, 599 MIPS_INS_LDC1, 600 MIPS_INS_LDC2, 601 MIPS_INS_LDC3, 602 MIPS_INS_LDI, 603 MIPS_INS_LDL, 604 MIPS_INS_LDPC, 605 MIPS_INS_LDR, 606 MIPS_INS_LDXC1, 607 MIPS_INS_LH, 608 MIPS_INS_LHX, 609 MIPS_INS_LHU, 610 MIPS_INS_LL, 611 MIPS_INS_LLD, 612 MIPS_INS_LSA, 613 MIPS_INS_LUXC1, 614 MIPS_INS_LUI, 615 MIPS_INS_LW, 616 MIPS_INS_LWC1, 617 MIPS_INS_LWC2, 618 MIPS_INS_LWC3, 619 MIPS_INS_LWL, 620 MIPS_INS_LWPC, 621 MIPS_INS_LWR, 622 MIPS_INS_LWUPC, 623 MIPS_INS_LWU, 624 MIPS_INS_LWX, 625 MIPS_INS_LWXC1, 626 MIPS_INS_LI, 627 MIPS_INS_MADD, 628 MIPS_INS_MADDF, 629 MIPS_INS_MADDR_Q, 630 MIPS_INS_MADDU, 631 MIPS_INS_MADDV, 632 MIPS_INS_MADD_Q, 633 MIPS_INS_MAQ_SA, 634 MIPS_INS_MAQ_S, 635 MIPS_INS_MAXA, 636 MIPS_INS_MAXI_S, 637 MIPS_INS_MAXI_U, 638 MIPS_INS_MAX_A, 639 MIPS_INS_MAX, 640 MIPS_INS_MAX_S, 641 MIPS_INS_MAX_U, 642 MIPS_INS_MFC0, 643 MIPS_INS_MFC1, 644 MIPS_INS_MFC2, 645 MIPS_INS_MFHC1, 646 MIPS_INS_MFHI, 647 MIPS_INS_MFLO, 648 MIPS_INS_MINA, 649 MIPS_INS_MINI_S, 650 MIPS_INS_MINI_U, 651 MIPS_INS_MIN_A, 652 MIPS_INS_MIN, 653 MIPS_INS_MIN_S, 654 MIPS_INS_MIN_U, 655 MIPS_INS_MOD, 656 MIPS_INS_MODSUB, 657 MIPS_INS_MODU, 658 MIPS_INS_MOD_S, 659 MIPS_INS_MOD_U, 660 MIPS_INS_MOVE, 661 MIPS_INS_MOVF, 662 MIPS_INS_MOVN, 663 MIPS_INS_MOVT, 664 MIPS_INS_MOVZ, 665 MIPS_INS_MSUB, 666 MIPS_INS_MSUBF, 667 MIPS_INS_MSUBR_Q, 668 MIPS_INS_MSUBU, 669 MIPS_INS_MSUBV, 670 MIPS_INS_MSUB_Q, 671 MIPS_INS_MTC0, 672 MIPS_INS_MTC1, 673 MIPS_INS_MTC2, 674 MIPS_INS_MTHC1, 675 MIPS_INS_MTHI, 676 MIPS_INS_MTHLIP, 677 MIPS_INS_MTLO, 678 MIPS_INS_MTM0, 679 MIPS_INS_MTM1, 680 MIPS_INS_MTM2, 681 MIPS_INS_MTP0, 682 MIPS_INS_MTP1, 683 MIPS_INS_MTP2, 684 MIPS_INS_MUH, 685 MIPS_INS_MUHU, 686 MIPS_INS_MULEQ_S, 687 MIPS_INS_MULEU_S, 688 MIPS_INS_MULQ_RS, 689 MIPS_INS_MULQ_S, 690 MIPS_INS_MULR_Q, 691 MIPS_INS_MULSAQ_S, 692 MIPS_INS_MULSA, 693 MIPS_INS_MULT, 694 MIPS_INS_MULTU, 695 MIPS_INS_MULU, 696 MIPS_INS_MULV, 697 MIPS_INS_MUL_Q, 698 MIPS_INS_MUL_S, 699 MIPS_INS_NLOC, 700 MIPS_INS_NLZC, 701 MIPS_INS_NMADD, 702 MIPS_INS_NMSUB, 703 MIPS_INS_NOR, 704 MIPS_INS_NORI, 705 MIPS_INS_NOT, 706 MIPS_INS_OR, 707 MIPS_INS_ORI, 708 MIPS_INS_PACKRL, 709 MIPS_INS_PAUSE, 710 MIPS_INS_PCKEV, 711 MIPS_INS_PCKOD, 712 MIPS_INS_PCNT, 713 MIPS_INS_PICK, 714 MIPS_INS_POP, 715 MIPS_INS_PRECEQU, 716 MIPS_INS_PRECEQ, 717 MIPS_INS_PRECEU, 718 MIPS_INS_PRECRQU_S, 719 MIPS_INS_PRECRQ, 720 MIPS_INS_PRECRQ_RS, 721 MIPS_INS_PRECR, 722 MIPS_INS_PRECR_SRA, 723 MIPS_INS_PRECR_SRA_R, 724 MIPS_INS_PREF, 725 MIPS_INS_PREPEND, 726 MIPS_INS_RADDU, 727 MIPS_INS_RDDSP, 728 MIPS_INS_RDHWR, 729 MIPS_INS_REPLV, 730 MIPS_INS_REPL, 731 MIPS_INS_RINT, 732 MIPS_INS_ROTR, 733 MIPS_INS_ROTRV, 734 MIPS_INS_ROUND, 735 MIPS_INS_SAT_S, 736 MIPS_INS_SAT_U, 737 MIPS_INS_SB, 738 MIPS_INS_SC, 739 MIPS_INS_SCD, 740 MIPS_INS_SD, 741 MIPS_INS_SDBBP, 742 MIPS_INS_SDC1, 743 MIPS_INS_SDC2, 744 MIPS_INS_SDC3, 745 MIPS_INS_SDL, 746 MIPS_INS_SDR, 747 MIPS_INS_SDXC1, 748 MIPS_INS_SEB, 749 MIPS_INS_SEH, 750 MIPS_INS_SELEQZ, 751 MIPS_INS_SELNEZ, 752 MIPS_INS_SEL, 753 MIPS_INS_SEQ, 754 MIPS_INS_SEQI, 755 MIPS_INS_SH, 756 MIPS_INS_SHF, 757 MIPS_INS_SHILO, 758 MIPS_INS_SHILOV, 759 MIPS_INS_SHLLV, 760 MIPS_INS_SHLLV_S, 761 MIPS_INS_SHLL, 762 MIPS_INS_SHLL_S, 763 MIPS_INS_SHRAV, 764 MIPS_INS_SHRAV_R, 765 MIPS_INS_SHRA, 766 MIPS_INS_SHRA_R, 767 MIPS_INS_SHRLV, 768 MIPS_INS_SHRL, 769 MIPS_INS_SLDI, 770 MIPS_INS_SLD, 771 MIPS_INS_SLL, 772 MIPS_INS_SLLI, 773 MIPS_INS_SLLV, 774 MIPS_INS_SLT, 775 MIPS_INS_SLTI, 776 MIPS_INS_SLTIU, 777 MIPS_INS_SLTU, 778 MIPS_INS_SNE, 779 MIPS_INS_SNEI, 780 MIPS_INS_SPLATI, 781 MIPS_INS_SPLAT, 782 MIPS_INS_SRA, 783 MIPS_INS_SRAI, 784 MIPS_INS_SRARI, 785 MIPS_INS_SRAR, 786 MIPS_INS_SRAV, 787 MIPS_INS_SRL, 788 MIPS_INS_SRLI, 789 MIPS_INS_SRLRI, 790 MIPS_INS_SRLR, 791 MIPS_INS_SRLV, 792 MIPS_INS_SSNOP, 793 MIPS_INS_ST, 794 MIPS_INS_SUBQH, 795 MIPS_INS_SUBQH_R, 796 MIPS_INS_SUBQ, 797 MIPS_INS_SUBQ_S, 798 MIPS_INS_SUBSUS_U, 799 MIPS_INS_SUBSUU_S, 800 MIPS_INS_SUBS_S, 801 MIPS_INS_SUBS_U, 802 MIPS_INS_SUBUH, 803 MIPS_INS_SUBUH_R, 804 MIPS_INS_SUBU, 805 MIPS_INS_SUBU_S, 806 MIPS_INS_SUBVI, 807 MIPS_INS_SUBV, 808 MIPS_INS_SUXC1, 809 MIPS_INS_SW, 810 MIPS_INS_SWC1, 811 MIPS_INS_SWC2, 812 MIPS_INS_SWC3, 813 MIPS_INS_SWL, 814 MIPS_INS_SWR, 815 MIPS_INS_SWXC1, 816 MIPS_INS_SYNC, 817 MIPS_INS_SYSCALL, 818 MIPS_INS_TEQ, 819 MIPS_INS_TEQI, 820 MIPS_INS_TGE, 821 MIPS_INS_TGEI, 822 MIPS_INS_TGEIU, 823 MIPS_INS_TGEU, 824 MIPS_INS_TLBP, 825 MIPS_INS_TLBR, 826 MIPS_INS_TLBWI, 827 MIPS_INS_TLBWR, 828 MIPS_INS_TLT, 829 MIPS_INS_TLTI, 830 MIPS_INS_TLTIU, 831 MIPS_INS_TLTU, 832 MIPS_INS_TNE, 833 MIPS_INS_TNEI, 834 MIPS_INS_TRUNC, 835 MIPS_INS_V3MULU, 836 MIPS_INS_VMM0, 837 MIPS_INS_VMULU, 838 MIPS_INS_VSHF, 839 MIPS_INS_WAIT, 840 MIPS_INS_WRDSP, 841 MIPS_INS_WSBH, 842 MIPS_INS_XOR, 843 MIPS_INS_XORI, 844 845 //> some alias instructions 846 MIPS_INS_NOP, 847 MIPS_INS_NEGU, 848 849 //> special instructions 850 MIPS_INS_JALR_HB, // jump and link with Hazard Barrier 851 MIPS_INS_JR_HB, // jump register with Hazard Barrier 852 853 MIPS_INS_ENDING, 854 } mips_insn; 855 856 //> Group of MIPS instructions 857 typedef enum mips_insn_group { 858 MIPS_GRP_INVALID = 0, // = CS_GRP_INVALID 859 860 //> Generic groups 861 // all jump instructions (conditional+direct+indirect jumps) 862 MIPS_GRP_JUMP, // = CS_GRP_JUMP 863 864 //> Architecture-specific groups 865 MIPS_GRP_BITCOUNT = 128, 866 MIPS_GRP_DSP, 867 MIPS_GRP_DSPR2, 868 MIPS_GRP_FPIDX, 869 MIPS_GRP_MSA, 870 MIPS_GRP_MIPS32R2, 871 MIPS_GRP_MIPS64, 872 MIPS_GRP_MIPS64R2, 873 MIPS_GRP_SEINREG, 874 MIPS_GRP_STDENC, 875 MIPS_GRP_SWAP, 876 MIPS_GRP_MICROMIPS, 877 MIPS_GRP_MIPS16MODE, 878 MIPS_GRP_FP64BIT, 879 MIPS_GRP_NONANSFPMATH, 880 MIPS_GRP_NOTFP64BIT, 881 MIPS_GRP_NOTINMICROMIPS, 882 MIPS_GRP_NOTNACL, 883 MIPS_GRP_NOTMIPS32R6, 884 MIPS_GRP_NOTMIPS64R6, 885 MIPS_GRP_CNMIPS, 886 MIPS_GRP_MIPS32, 887 MIPS_GRP_MIPS32R6, 888 MIPS_GRP_MIPS64R6, 889 MIPS_GRP_MIPS2, 890 MIPS_GRP_MIPS3, 891 MIPS_GRP_MIPS3_32, 892 MIPS_GRP_MIPS3_32R2, 893 MIPS_GRP_MIPS4_32, 894 MIPS_GRP_MIPS4_32R2, 895 MIPS_GRP_MIPS5_32R2, 896 MIPS_GRP_GP32BIT, 897 MIPS_GRP_GP64BIT, 898 899 MIPS_GRP_ENDING, 900 } mips_insn_group; 901 902 #ifdef __cplusplus 903 } 904 #endif 905 906 #endif 907