Lines Matching refs:ip
1021 (struct mips_cl_insn *ip, expressionS *p, bfd_reloc_code_real_type *r);
1028 static void macro (struct mips_cl_insn * ip);
1029 static void mips16_macro (struct mips_cl_insn * ip);
1031 static void macro2 (struct mips_cl_insn * ip);
1033 static void mips_ip (char *str, struct mips_cl_insn * ip);
1034 static void mips16_ip (char *str, struct mips_cl_insn * ip);
2069 insn_uses_reg (const struct mips_cl_insn *ip, unsigned int reg,
2093 if ((ip->insn_mo->pinfo & INSN_READ_FPR_S)
2094 && ((EXTRACT_OPERAND (FS, *ip) & ~(unsigned) 1)
2097 if ((ip->insn_mo->pinfo & INSN_READ_FPR_T)
2098 && ((EXTRACT_OPERAND (FT, *ip) & ~(unsigned) 1)
2104 if ((ip->insn_mo->pinfo & INSN_READ_GPR_S)
2105 && EXTRACT_OPERAND (RS, *ip) == reg)
2107 if ((ip->insn_mo->pinfo & INSN_READ_GPR_T)
2108 && EXTRACT_OPERAND (RT, *ip) == reg)
2113 if ((ip->insn_mo->pinfo & MIPS16_INSN_READ_X)
2114 && mips16_to_32_reg_map[MIPS16_EXTRACT_OPERAND (RX, *ip)] == reg)
2116 if ((ip->insn_mo->pinfo & MIPS16_INSN_READ_Y)
2117 && mips16_to_32_reg_map[MIPS16_EXTRACT_OPERAND (RY, *ip)] == reg)
2119 if ((ip->insn_mo->pinfo & MIPS16_INSN_READ_Z)
2120 && (mips16_to_32_reg_map[MIPS16_EXTRACT_OPERAND (MOVE32Z, *ip)]
2123 if ((ip->insn_mo->pinfo & MIPS16_INSN_READ_T) && reg == TREG)
2125 if ((ip->insn_mo->pinfo & MIPS16_INSN_READ_SP) && reg == SP)
2127 if ((ip->insn_mo->pinfo & MIPS16_INSN_READ_31) && reg == RA)
2129 if ((ip->insn_mo->pinfo & MIPS16_INSN_READ_GPR_X)
2130 && MIPS16_EXTRACT_OPERAND (REGR32, *ip) == reg)
2561 append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
2573 pinfo = ip->insn_mo->pinfo;
2586 : nops_for_insn_or_target (history, ip));
2624 int nops = nops_for_insn_or_target (history, ip);
2675 add_relaxed_insn (ip, (relaxed_branch_length
2693 add_relaxed_insn (ip, 4, 0,
2702 && ! ip->use_extend
2709 add_fixed_insn (ip);
2735 ip->fixed_p = 1;
2736 ip->mips16_absolute_jump_p = (*reloc_type == BFD_RELOC_MIPS16_JMP);
2738 add_fixed_insn (ip);
2750 ip->insn_opcode |= address_expr->X_add_number;
2755 ip->insn_opcode |= tmp & 0xffff;
2760 ip->insn_opcode |= tmp & 0xffff;
2765 ip->insn_opcode |= tmp & 0xffff;
2769 ip->insn_opcode |= (address_expr->X_add_number >> 16) & 0xffff;
2775 ip->insn_opcode |= address_expr->X_add_number & 0xffff;
2782 ip->insn_opcode |= (address_expr->X_add_number >> 2) & 0x3ffffff;
2789 ip->insn_opcode |=
2804 ip->insn_opcode |= (address_expr->X_add_number >> 2) & 0xffff;
2824 ip->fixp[0] = fix_new_exp (ip->frag, ip->where,
2832 && ip->fixp[0]->fx_addsy)
2833 *symbol_get_tc (ip->fixp[0]->fx_addsy) = 1;
2858 ip->fixp[0]->fx_no_overflow = 1;
2863 mips_relax.first_fixup = ip->fixp[0];
2879 hi_fixup->fixp = ip->fixp[0];
2891 ip->fixp[i] = fix_new (ip->frag, ip->where,
2892 ip->fixp[0]->fx_size, NULL, 0,
2896 ip->fixp[0]->fx_tcbit = 1;
2897 ip->fixp[i]->fx_tcbit = 1;
2901 install_insn (ip);
2907 mips_gprmask |= 1 << EXTRACT_OPERAND (RD, *ip);
2909 mips_gprmask |= 1 << EXTRACT_OPERAND (RT, *ip);
2911 mips_gprmask |= 1 << EXTRACT_OPERAND (RS, *ip);
2915 mips_cprmask[1] |= 1 << EXTRACT_OPERAND (FD, *ip);
2917 mips_cprmask[1] |= 1 << EXTRACT_OPERAND (FS, *ip);
2919 mips_cprmask[1] |= 1 << EXTRACT_OPERAND (FT, *ip);
2921 mips_cprmask[1] |= 1 << EXTRACT_OPERAND (FR, *ip);
2935 mips_gprmask |= 1 << MIPS16_EXTRACT_OPERAND (RX, *ip);
2937 mips_gprmask |= 1 << MIPS16_EXTRACT_OPERAND (RY, *ip);
2939 mips_gprmask |= 1 << MIPS16_EXTRACT_OPERAND (RZ, *ip);
2947 mips_gprmask |= 1 << MIPS16OP_EXTRACT_REG32R (ip->insn_opcode);
2949 mips_gprmask |= 1 << MIPS16_EXTRACT_OPERAND (MOVE32Z, *ip);
2951 mips_gprmask |= 1 << MIPS16_EXTRACT_OPERAND (REGR32, *ip);
2998 || nops_for_insn (history + 1, ip) > 0
3001 || nops_for_sequence (2, history + 1, ip, history) > 0
3010 && insn_uses_reg (ip, EXTRACT_OPERAND (RT, history[0]),
3014 && insn_uses_reg (ip, EXTRACT_OPERAND (RD, history[0]),
3019 (ip, MIPS16_EXTRACT_OPERAND (RX, history[0]),
3023 (ip, MIPS16_EXTRACT_OPERAND (RY, history[0]),
3027 (ip, MIPS16_EXTRACT_OPERAND (RZ, history[0]),
3030 && insn_uses_reg (ip, TREG, MIPS_GR_REG))
3032 && insn_uses_reg (ip, RA, MIPS_GR_REG))
3034 && insn_uses_reg (ip,
3045 == EXTRACT_OPERAND (RD, *ip)))
3052 == EXTRACT_OPERAND (RD, *ip)))
3067 EXTRACT_OPERAND (RD, *ip),
3099 ip->insn_opcode |= 0x0080;
3100 install_insn (ip);
3101 insert_into_history (0, 1, ip);
3109 insert_into_history (0, 1, ip);
3122 know (delay.frag == ip->frag);
3123 move_insn (ip, delay.frag, delay.where);
3124 move_insn (&delay, ip->frag, ip->where + insn_length (ip));
3133 if (delay.frag == ip->frag)
3134 move_insn (ip, ip->frag, ip->where - 4);
3139 move_insn (&delay, ip->frag, ip->where);
3140 move_insn (ip, history[0].frag, history[0].where);
3142 history[0] = *ip;
3158 insert_into_history (0, 1, ip);
3162 insert_into_history (0, 1, ip);
3165 insert_into_history (0, 1, ip);
3876 check_absolute_expr (struct mips_cl_insn *ip, expressionS *ex)
3882 ip->insn_mo->name);
4556 macro (struct mips_cl_insn *ip)
4579 treg = (ip->insn_opcode >> 16) & 0x1f;
4580 dreg = (ip->insn_opcode >> 11) & 0x1f;
4581 sreg = breg = (ip->insn_opcode >> 21) & 0x1f;
4582 mask = ip->insn_mo->mask;
4793 as_warn (_("Branch %s is always true"), ip->insn_mo->name);
6180 as_bad (_("opcode not implemented in Octeon `%s'"), ip->insn_mo->name);
6269 as_bad (_("opcode not implemented in Octeon `%s'"), ip->insn_mo->name);
7203 as_bad (_("opcode not implemented in Octeon `%s'"), ip->insn_mo->name);
7208 macro_build (NULL, s, "C", ip->insn_opcode);
7226 && (immed_expr = itbl_assemble (ip->insn_mo->name, "")))
7228 s = ip->insn_mo->name;
7234 macro2 (ip);
7242 macro2 (struct mips_cl_insn *ip)
7261 treg = (ip->insn_opcode >> 16) & 0x1f;
7262 dreg = (ip->insn_opcode >> 11) & 0x1f;
7263 sreg = breg = (ip->insn_opcode >> 21) & 0x1f;
7264 mask = ip->insn_mo->mask;
7575 ip->insn_mo->name);
7721 ip->insn_mo->name);
7810 as_bad (_("opcode not implemented in Octeon `%s'"), ip->insn_mo->name);
7815 sreg = (ip->insn_opcode >> 11) & 0x1f; /* floating reg */
7816 dreg = (ip->insn_opcode >> 06) & 0x1f; /* floating reg */
8114 as_bad (_("Macro %s not implemented yet"), ip->insn_mo->name);
8124 mips16_macro (struct mips_cl_insn *ip)
8132 mask = ip->insn_mo->mask;
8134 xreg = MIPS16_EXTRACT_OPERAND (RX, *ip);
8135 yreg = MIPS16_EXTRACT_OPERAND (RY, *ip);
8136 zreg = MIPS16_EXTRACT_OPERAND (RZ, *ip);
8553 mips_ip (char *str, struct mips_cl_insn *ip)
8753 create_insn (ip, insn);
8771 check_absolute_expr (ip, &imm_expr);
8778 INSERT_OPERAND (BP, *ip, imm_expr.X_add_number);
8785 check_absolute_expr (ip, &imm_expr);
8791 INSERT_OPERAND (SA3, *ip, imm_expr.X_add_number);
8798 check_absolute_expr (ip, &imm_expr);
8804 INSERT_OPERAND (SA4, *ip, imm_expr.X_add_number);
8811 check_absolute_expr (ip, &imm_expr);
8817 INSERT_OPERAND (IMM8, *ip, imm_expr.X_add_number);
8824 check_absolute_expr (ip, &imm_expr);
8830 INSERT_OPERAND (RS, *ip, imm_expr.X_add_number);
8841 INSERT_OPERAND (DSPACC, *ip, regno);
8850 check_absolute_expr (ip, &imm_expr);
8857 INSERT_OPERAND (WRDSP, *ip, imm_expr.X_add_number);
8868 INSERT_OPERAND (DSPACC_S, *ip, regno);
8877 check_absolute_expr (ip, &imm_expr);
8887 INSERT_OPERAND (DSPSFT, *ip, imm_expr.X_add_number);
8894 check_absolute_expr (ip, &imm_expr);
8901 INSERT_OPERAND (RDDSP, *ip, imm_expr.X_add_number);
8908 check_absolute_expr (ip, &imm_expr);
8918 INSERT_OPERAND (DSPSFT_7, *ip, imm_expr.X_add_number);
8925 check_absolute_expr (ip, &imm_expr);
8935 INSERT_OPERAND (IMM10, *ip, imm_expr.X_add_number);
8942 check_absolute_expr (ip, &imm_expr);
8946 INSERT_OPERAND (MT_U, *ip, imm_expr.X_add_number);
8953 check_absolute_expr (ip, &imm_expr);
8957 INSERT_OPERAND (MT_H, *ip, imm_expr.X_add_number);
8968 INSERT_OPERAND (MTACC_T, *ip, regno);
8981 INSERT_OPERAND (MTACC_D, *ip, regno);
8997 INSERT_OPERAND (RS, *ip, lastregno);
9001 INSERT_OPERAND (RT, *ip, lastregno);
9005 INSERT_OPERAND (FT, *ip, lastregno);
9009 INSERT_OPERAND (FS, *ip, lastregno);
9047 check_absolute_expr (ip, &imm_expr);
9051 imm->desc ? imm->desc : ip->insn_mo->name,
9056 ip->insn_opcode |= ((unsigned long) imm_expr.X_add_number
9073 check_absolute_expr (ip, &imm_expr);
9082 INSERT_OPERAND (SHAMT, *ip, imm_expr.X_add_number);
9097 check_absolute_expr (ip, &imm_expr);
9113 INSERT_OPERAND (INSMSB, *ip,
9133 check_absolute_expr (ip, &imm_expr);
9149 INSERT_OPERAND (EXTMSBD, *ip, imm_expr.X_add_number - 1);
9189 INSERT_OPERAND (RT, *ip, regno);
9213 check_absolute_expr (ip, &imm_expr);
9217 INSERT_OPERAND (SHAMT, *ip, imm_expr.X_add_number);
9224 check_absolute_expr (ip, &imm_expr);
9228 INSERT_OPERAND (SHAMT, *ip, imm_expr.X_add_number - 32);
9238 check_absolute_expr (ip, &imm_expr);
9245 ip->insn_opcode |= imm_expr.X_add_number << OP_SH_BITIND;
9252 check_absolute_expr (ip, &imm_expr);
9256 ip->insn_opcode |= (imm_expr.X_add_number - 32) << OP_SH_BITIND;
9264 check_absolute_expr (ip, &imm_expr);
9267 ip->insn_mo->name,
9270 INSERT_OPERAND (CACHE, *ip, imm_expr.X_add_number);
9272 INSERT_OPERAND (PREFX, *ip, imm_expr.X_add_number);
9279 check_absolute_expr (ip, &imm_expr);
9282 ip->insn_mo->name,
9284 INSERT_OPERAND (CODE, *ip, imm_expr.X_add_number);
9291 check_absolute_expr (ip, &imm_expr);
9294 ip->insn_mo->name,
9296 INSERT_OPERAND (CODE2, *ip, imm_expr.X_add_number);
9305 check_absolute_expr (ip, &imm_expr);
9312 ip->insn_opcode |= (imm_expr.X_add_number & OP_MASK_CODE2)
9320 check_absolute_expr (ip, &imm_expr);
9323 ip->insn_mo->name,
9325 INSERT_OPERAND (CODE20, *ip, imm_expr.X_add_number);
9332 check_absolute_expr (ip, &imm_expr);
9339 INSERT_OPERAND (COPZ, *ip, imm_expr.X_add_number);
9346 check_absolute_expr (ip, &imm_expr);
9353 INSERT_OPERAND (CODE19, *ip, imm_expr.X_add_number);
9360 check_absolute_expr (ip, &imm_expr);
9364 INSERT_OPERAND (PERFREG, *ip, imm_expr.X_add_number);
9370 if (((ip->insn_opcode >> OP_SH_OP) & OP_MASK_OP) == OP_OP_COP0)
9374 INSERT_OPERAND (RD, *ip, regno);
9431 INSERT_OPERAND (RS, *ip, regno);
9437 INSERT_OPERAND (RD, *ip, regno);
9440 INSERT_OPERAND (RD, *ip, regno);
9441 INSERT_OPERAND (RT, *ip, regno);
9446 INSERT_OPERAND (RT, *ip, regno);
9476 INSERT_OPERAND (RS, *ip, lastregno);
9479 INSERT_OPERAND (RT, *ip, lastregno);
9486 check_absolute_expr (ip, &imm_expr);
9490 INSERT_OPERAND (ALN, *ip, imm_expr.X_add_number);
9500 check_absolute_expr (ip, &imm_expr);
9504 INSERT_OPERAND (FT, *ip, imm_expr.X_add_number);
9505 if (ip->insn_opcode & (OP_MASK_VSEL << OP_SH_VSEL))
9506 ip->insn_opcode |= MDMX_FMTSEL_IMM_QH << OP_SH_VSEL;
9508 ip->insn_opcode |= MDMX_FMTSEL_IMM_OB << OP_SH_VSEL;
9527 && (ip->insn_mo->pinfo & FP_D)
9528 && (ip->insn_mo->pinfo & (INSN_COPROC_MOVE_DELAY
9544 && ! mips_oddfpreg_ok (ip->insn_mo, argnum))
9564 INSERT_OPERAND (FD, *ip, regno);
9569 INSERT_OPERAND (FS, *ip, regno);
9577 int is_qh = (ip->insn_opcode & (1 << OP_SH_VSEL));
9581 check_absolute_expr (ip, &imm_expr);
9587 ip->insn_opcode |= (imm_expr.X_add_number
9598 if (ip->insn_opcode & (OP_MASK_VSEL << OP_SH_VSEL))
9599 ip->insn_opcode |= (MDMX_FMTSEL_VEC_QH
9602 ip->insn_opcode |= (MDMX_FMTSEL_VEC_OB <<
9609 INSERT_OPERAND (FT, *ip, regno);
9612 INSERT_OPERAND (FR, *ip, regno);
9622 INSERT_OPERAND (FS, *ip, lastregno);
9625 INSERT_OPERAND (FT, *ip, lastregno);
9932 if (ip->insn_mo->pinfo & (FP_D| FP_S))
9948 INSERT_OPERAND (BCC, *ip, regno);
9950 INSERT_OPERAND (CCC, *ip, regno);
9972 ip->insn_opcode |= c;
9978 check_absolute_expr (ip, &imm_expr);
9988 INSERT_OPERAND (VECBYTE, *ip, imm_expr.X_add_number);
9995 check_absolute_expr (ip, &imm_expr);
10005 INSERT_OPERAND (VECALIGN, *ip, imm_expr.X_add_number);
10042 mips16_ip (char *str, struct mips_cl_insn *ip)
10134 create_insn (ip, insn);
10194 mips16_ext, &ip->insn_opcode,
10195 &ip->use_extend, &ip->extend);
10211 MIPS16_INSERT_OPERAND (RX, *ip, lastregno);
10214 MIPS16_INSERT_OPERAND (RY, *ip, lastregno);
10230 MIPS16_INSERT_OPERAND (RX, *ip, lastregno);
10232 MIPS16_INSERT_OPERAND (RY, *ip, lastregno);
10252 MIPS16_INSERT_OPERAND (RX, *ip, lastregno);
10254 MIPS16_INSERT_OPERAND (RY, *ip, lastregno);
10316 MIPS16_INSERT_OPERAND (RX, *ip, regno);
10320 MIPS16_INSERT_OPERAND (RY, *ip, regno);
10323 MIPS16_INSERT_OPERAND (RZ, *ip, regno);
10326 MIPS16_INSERT_OPERAND (MOVE32Z, *ip, regno);
10332 MIPS16_INSERT_OPERAND (REGR32, *ip, regno);
10336 MIPS16_INSERT_OPERAND (REG32R, *ip, regno);
10369 ip->use_extend = TRUE;
10370 ip->extend = 0;
10436 check_absolute_expr (ip, &imm_expr);
10439 ip->insn_mo->name,
10441 MIPS16_INSERT_OPERAND (IMM6, *ip, imm_expr.X_add_number);
10450 ip->insn_opcode <<= 16;
10516 ip->insn_opcode &= ~ ((7 << 3) << MIPS16OP_SH_IMM6);
10517 ip->insn_opcode |= mask << MIPS16OP_SH_IMM6;
10679 ip->use_extend = TRUE;
10680 ip->extend = opcode >> 16;
10682 ip->insn_opcode |= opcode & 0x7f;
10688 check_absolute_expr (ip, &imm_expr);
10692 ip->insn_mo->name,
10696 ip->insn_opcode |= imm_expr.X_add_number;