Lines Matching defs:inst

842 /* This returns the PC of the first inst after the prologue.  If we can't
888 mips32_decode_reg_save (t_inst inst, unsigned long *gen_mask,
893 if ((inst & 0xffe00000) == 0xafa00000 /* sw reg,n($sp) */
894 || (inst & 0xffe00000) == 0xafc00000 /* sw reg,n($r30) */
895 || (inst & 0xffe00000) == 0xffa00000) /* sd reg,n($sp) */
902 reg = (inst & 0x001f0000) >> 16;
905 else if ((inst & 0xffe00000) == 0xe7a00000 /* swc1 freg,n($sp) */
906 || (inst & 0xffe00000) == 0xe7c00000 /* swc1 freg,n($r30) */
907 || (inst & 0xffe00000) == 0xf7a00000) /* sdc1 freg,n($sp) */
910 reg = ((inst & 0x001f0000) >> 16);
921 mips16_decode_reg_save (t_inst inst, unsigned long *gen_mask)
923 if ((inst & 0xf800) == 0xd000) /* sw reg,n($sp) */
925 int reg = mips16_to_32_reg[(inst & 0x700) >> 8];
928 else if ((inst & 0xff00) == 0xf900) /* sd reg,n($sp) */
930 int reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
933 else if ((inst & 0xff00) == 0x6200 /* sw $ra,n($sp) */
934 || (inst & 0xff00) == 0xfa00) /* sd $ra,n($sp) */
1009 mips32_relative_offset (unsigned long inst)
1012 x = itype_immediate (inst);
1026 unsigned long inst;
1028 inst = mips_fetch_instruction (pc);
1029 if ((inst & 0xe0000000) != 0) /* Not a special, jump or branch instruction */
1031 if (itype_op (inst) >> 2 == 5)
1034 op = (itype_op (inst) & 0x03);
1049 else if (itype_op (inst) == 17 && itype_rs (inst) == 8)
1052 int tf = itype_rt (inst) & 0x01;
1053 int cnum = itype_rt (inst) >> 2;
1060 pc += mips32_relative_offset (inst) + 4;
1071 switch (op = itype_op (inst) & 0x07) /* extract bits 28,27,26 */
1074 op = rtype_funct (inst);
1080 pc = read_signed_register (rtype_rs (inst));
1089 op = itype_rt (inst); /* branch condition */
1097 if (read_signed_register (itype_rs (inst)) < 0)
1098 pc += mips32_relative_offset (inst) + 4;
1106 if (read_signed_register (itype_rs (inst)) >= 0)
1107 pc += mips32_relative_offset (inst) + 4;
1121 reg = jtype_target (inst) << 2;
1129 reg = jtype_target (inst) << 2;
1136 if (read_signed_register (itype_rs (inst)) ==
1137 read_signed_register (itype_rt (inst)))
1138 pc += mips32_relative_offset (inst) + 4;
1144 if (read_signed_register (itype_rs (inst)) !=
1145 read_signed_register (itype_rt (inst)))
1146 pc += mips32_relative_offset (inst) + 4;
1151 if (read_signed_register (itype_rs (inst) <= 0))
1152 pc += mips32_relative_offset (inst) + 4;
1159 if (read_signed_register (itype_rs (inst) > 0))
1160 pc += mips32_relative_offset (inst) + 4;
1251 unsigned int inst,
1266 value |= inst & 0x7ff; /* eleven bits from instruction */
1270 value = inst & 0x7ff;
1288 value |= inst & 0xff; /* eleven bits from instruction */
1298 value = inst & 0xff; /* 8 bits */
1299 regx = (inst >> 8) & 0x07; /* or i8 funct */
1315 value = ((inst & 0x1f) << 5) | ((inst >> 5) & 0x1f);
1589 ULONGEST inst = mips16_fetch_instruction (PROC_LOW_ADDR (proc_desc));
1590 if ((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700)
1594 int sreg_count = (inst >> 6) & 3;
1599 if (inst & 0x20)
1922 unsigned short inst;
1930 inst = mips_fetch_instruction (start_pc);
1931 if (((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700) /* entry */
1932 || (inst & 0xff80) == 0x6380 /* addiu sp,-n */
1933 || (inst & 0xff80) == 0xfb80 /* daddiu sp,-n */
1934 || ((inst & 0xf810) == 0xf010 && seen_adjsp)) /* extend -n */
1936 else if ((inst & 0xff00) == 0x6300 /* addiu sp */
1937 || (inst & 0xff00) == 0xfb00) /* daddiu sp */
1958 unsigned short inst, /* current instruction */
1970 return offset | (inst & 0x1f);
1978 offset = inst & mask;
1996 unsigned inst = 0; /* current instruction */
2008 prev_inst = inst;
2011 inst = (unsigned short) mips_fetch_instruction (cur_pc);
2012 if ((inst & 0xff00) == 0x6300 /* addiu sp */
2013 || (inst & 0xff00) == 0xfb00) /* daddiu sp */
2015 offset = mips16_get_imm (prev_inst, inst, 8, 8, 1);
2024 else if ((inst & 0xf800) == 0xd000) /* sw reg,n($sp) */
2026 offset = mips16_get_imm (prev_inst, inst, 8, 4, 0);
2027 reg = mips16_to_32_reg[(inst & 0x700) >> 8];
2031 else if ((inst & 0xff00) == 0xf900) /* sd reg,n($sp) */
2033 offset = mips16_get_imm (prev_inst, inst, 5, 8, 0);
2034 reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
2038 else if ((inst & 0xff00) == 0x6200) /* sw $ra,n($sp) */
2040 offset = mips16_get_imm (prev_inst, inst, 8, 4, 0);
2044 else if ((inst & 0xff00) == 0xfa00) /* sd $ra,n($sp) */
2046 offset = mips16_get_imm (prev_inst, inst, 8, 8, 0);
2050 else if (inst == 0x673d) /* move $s1, $sp */
2055 else if ((inst & 0xff00) == 0x0100) /* addiu $s1,sp,n */
2057 offset = mips16_get_imm (prev_inst, inst, 8, 4, 0);
2062 else if ((inst & 0xFF00) == 0xd900) /* sw reg,offset($s1) */
2064 offset = mips16_get_imm (prev_inst, inst, 5, 4, 0);
2065 reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
2069 else if ((inst & 0xFF00) == 0x7900) /* sd reg,offset($s1) */
2071 offset = mips16_get_imm (prev_inst, inst, 5, 8, 0);
2072 reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
2076 else if ((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700) /* entry */
2077 entry_inst = inst; /* save for later processing */
2078 else if ((inst & 0xf800) == 0x1800) /* jal(x) */
2140 unsigned long inst, high_word, low_word;
2144 inst = (unsigned long) mips_fetch_instruction (cur_pc);
2147 high_word = (inst >> 16) & 0xffff;
2148 low_word = inst & 0xffff;
2205 else if (inst == 0x03A0F021 || inst == 0x03a0f025 || inst == 0x03a0f02d)
4580 t_inst inst;
4597 inst = mips_fetch_instruction (pc);
4598 high_word = (inst >> 16) & 0xffff;
4603 else if (inst == 0x03a1e823 || /* subu $sp,$sp,$at */
4604 inst == 0x03a8e823) /* subu $sp,$sp,$t0 */
4606 else if (((inst & 0xFFE00000) == 0xAFA00000 /* sw reg,n($sp) */
4607 || (inst & 0xFFE00000) == 0xFFA00000) /* sd reg,n($sp) */
4608 && (inst & 0x001F0000)) /* reg != $zero */
4611 else if ((inst & 0xFFE00000) == 0xE7A00000) /* swc1 freg,n($sp) */
4613 else if ((inst & 0xF3E00000) == 0xA3C00000 && (inst & 0x001F0000))
4620 else if (inst == 0x03A0F021 || inst == 0x03a0f025 || inst == 0x03a0f02d)
4623 else if ((inst & 0xFF9F07FF) == 0x00800021) /* move reg,$a0-$a3 */
4629 else if (inst == 0x0399e021 /* addu $gp,$gp,$t9 */
4630 || inst == 0x033ce021) /* addu $gp,$t9,$gp */
4681 unsigned short inst;
4733 unsigned short inst;
4736 inst = mips_fetch_instruction (pc);
4742 if ((inst & 0xf800) == 0xf000) /* extend */
4752 if ((inst & table[i].mask) == table[i].inst) /* found, get out */
5132 t_inst inst;
5149 inst = mips_fetch_instruction (target_pc);
5150 if ((inst & 0xffff0000) == 0x3c010000) /* lui $at */
5151 pc = (inst << 16) & 0xffff0000; /* high word */
5152 else if ((inst & 0xffff0000) == 0x24210000) /* addiu $at */
5153 return pc | (inst & 0xffff); /* low word */