Lines Matching refs:inst

882 mips32_relative_offset (ULONGEST inst)
884 return ((itype_immediate (inst) ^ 0x8000) - 0x8000) << 2;
892 unsigned long inst;
894 inst = mips_fetch_instruction (pc);
895 if ((inst & 0xe0000000) != 0) /* Not a special, jump or branch instruction */
897 if (itype_op (inst) >> 2 == 5)
900 op = (itype_op (inst) & 0x03);
915 else if (itype_op (inst) == 17 && itype_rs (inst) == 8)
918 int tf = itype_rt (inst) & 0x01;
919 int cnum = itype_rt (inst) >> 2;
926 pc += mips32_relative_offset (inst) + 4;
937 switch (op = itype_op (inst) & 0x07) /* extract bits 28,27,26 */
940 op = rtype_funct (inst);
946 pc = read_signed_register (rtype_rs (inst));
955 op = itype_rt (inst); /* branch condition */
963 if (read_signed_register (itype_rs (inst)) < 0)
964 pc += mips32_relative_offset (inst) + 4;
972 if (read_signed_register (itype_rs (inst)) >= 0)
973 pc += mips32_relative_offset (inst) + 4;
987 reg = jtype_target (inst) << 2;
995 reg = jtype_target (inst) << 2;
1002 if (read_signed_register (itype_rs (inst)) ==
1003 read_signed_register (itype_rt (inst)))
1004 pc += mips32_relative_offset (inst) + 4;
1010 if (read_signed_register (itype_rs (inst)) !=
1011 read_signed_register (itype_rt (inst)))
1012 pc += mips32_relative_offset (inst) + 4;
1017 if (read_signed_register (itype_rs (inst)) <= 0)
1018 pc += mips32_relative_offset (inst) + 4;
1025 if (read_signed_register (itype_rs (inst)) > 0)
1026 pc += mips32_relative_offset (inst) + 4;
1117 unsigned int inst,
1132 value |= inst & 0x7ff; /* eleven bits from instruction */
1136 value = inst & 0x7ff;
1154 value |= inst & 0xff; /* eleven bits from instruction */
1164 value = inst & 0xff; /* 8 bits */
1165 regx = (inst >> 8) & 0x07; /* or i8 funct */
1181 value = ((inst & 0x1f) << 5) | ((inst >> 5) & 0x1f);
1383 unsigned short inst, /* current instruction */
1395 return offset | (inst & 0x1f);
1403 offset = inst & mask;
1427 unsigned inst = 0; /* current instruction */
1449 prev_inst = inst;
1452 inst = (unsigned short) mips_fetch_instruction (cur_pc);
1459 if ((inst & 0xf800) == 0xf000) /* extend */
1468 if ((inst & 0xff00) == 0x6300 /* addiu sp */
1469 || (inst & 0xff00) == 0xfb00) /* daddiu sp */
1471 offset = mips16_get_imm (prev_inst, inst, 8, 8, 1);
1480 else if ((inst & 0xf800) == 0xd000) /* sw reg,n($sp) */
1482 offset = mips16_get_imm (prev_inst, inst, 8, 4, 0);
1483 reg = mips16_to_32_reg[(inst & 0x700) >> 8];
1486 else if ((inst & 0xff00) == 0xf900) /* sd reg,n($sp) */
1488 offset = mips16_get_imm (prev_inst, inst, 5, 8, 0);
1489 reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
1492 else if ((inst & 0xff00) == 0x6200) /* sw $ra,n($sp) */
1494 offset = mips16_get_imm (prev_inst, inst, 8, 4, 0);
1497 else if ((inst & 0xff00) == 0xfa00) /* sd $ra,n($sp) */
1499 offset = mips16_get_imm (prev_inst, inst, 8, 8, 0);
1502 else if (inst == 0x673d) /* move $s1, $sp */
1507 else if ((inst & 0xff00) == 0x0100) /* addiu $s1,sp,n */
1509 offset = mips16_get_imm (prev_inst, inst, 8, 4, 0);
1514 else if ((inst & 0xFF00) == 0xd900) /* sw reg,offset($s1) */
1516 offset = mips16_get_imm (prev_inst, inst, 5, 4, 0);
1517 reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
1520 else if ((inst & 0xFF00) == 0x7900) /* sd reg,offset($s1) */
1522 offset = mips16_get_imm (prev_inst, inst, 5, 8, 0);
1523 reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
1526 else if ((inst & 0xf81f) == 0xe809
1527 && (inst & 0x700) != 0x700) /* entry */
1528 entry_inst = inst; /* save for later processing */
1529 else if ((inst & 0xf800) == 0x1800) /* jal(x) */
1531 else if ((inst & 0xff1c) == 0x6704) /* move reg,$a0-$a3 */
1763 unsigned long inst, high_word, low_word;
1767 inst = (unsigned long) mips_fetch_instruction (cur_pc);
1770 high_word = (inst >> 16) & 0xffff;
1771 low_word = inst & 0xffff;
1826 else if (inst == 0x03A0F021 || inst == 0x03a0f025 || inst == 0x03a0f02d)
1857 || (inst & 0xFF9F07FF) == 0x00800021 /* move reg,$a0-$a3 */
1860 || inst == 0x0399e021 /* addu $gp,$gp,$t9 */
1861 || inst == 0x033ce021 /* addu $gp,$t9,$gp */
2278 unsigned short inst;
2286 inst = mips_fetch_instruction (start_pc);
2287 if (((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700) /* entry */
2288 || (inst & 0xff80) == 0x6380 /* addiu sp,-n */
2289 || (inst & 0xff80) == 0xfb80 /* daddiu sp,-n */
2290 || ((inst & 0xf810) == 0xf010 && seen_adjsp)) /* extend -n */
2292 else if ((inst & 0xff00) == 0x6300 /* addiu sp */
2293 || (inst & 0xff00) == 0xfb00) /* daddiu sp */
4502 ULONGEST inst;
4519 inst = mips_fetch_instruction (target_pc);
4520 if ((inst & 0xffff0000) == 0x3c010000) /* lui $at */
4521 pc = (inst << 16) & 0xffff0000; /* high word */
4522 else if ((inst & 0xffff0000) == 0x24210000) /* addiu $at */
4523 return pc | (inst & 0xffff); /* low word */