Lines Matching refs:tinsn

3581 		  TInsn *tinsn = &istack->insn[i];
3583 if (tinsn->insn_type == ITYPE_INSN
3584 && !tinsn_has_symbolic_operands (tinsn)
3585 && !xg_immeds_fit (tinsn))
4202 xg_add_opcode_fix (TInsn *tinsn,
4210 xtensa_opcode opcode = tinsn->opcode;
4285 xg_emit_insn_to_buf (TInsn *tinsn,
4298 has_symbolic_immed = tinsn_to_insnbuf (tinsn, insnbuf);
4302 xtensa_format fmt = xg_get_single_format (tinsn->opcode);
4303 int slot = xg_get_single_slot (tinsn->opcode);
4304 int opnum = get_relaxable_immed (tinsn->opcode);
4305 expressionS *exp = &tinsn->tok[opnum];
4307 if (!xg_add_opcode_fix (tinsn, opnum, fmt, slot, exp, fragP, offset))
4378 is_bad_loopend_opcode (const TInsn *tinsn)
4380 xtensa_opcode opcode = tinsn->opcode;
4741 /* Build a nop of the correct size into tinsn. */
4744 build_nop (TInsn *tinsn, int size)
4746 tinsn_init (tinsn);
4750 tinsn->opcode = xtensa_nop_n_opcode;
4751 tinsn->ntok = 0;
4752 if (tinsn->opcode == XTENSA_UNDEFINED)
4759 tinsn->opcode = xtensa_or_opcode;
4760 set_expr_const (&tinsn->tok[0], 1);
4761 set_expr_const (&tinsn->tok[1], 1);
4762 set_expr_const (&tinsn->tok[2], 1);
4763 tinsn->ntok = 3;
4766 tinsn->opcode = xtensa_nop_opcode;
4768 gas_assert (tinsn->opcode != XTENSA_UNDEFINED);
4780 TInsn tinsn;
4782 build_nop (&tinsn, size);
4787 tinsn_to_insnbuf (&tinsn, insnbuf);
6742 each tinsn in the vinsn. */
6753 TInsn *tinsn = &vinsn->slots[slot];
6754 if (!tinsn_has_symbolic_operands (tinsn))
6758 if (xg_is_single_relaxable_insn (tinsn, 0, TRUE)
6759 && !tinsn->is_specific_opcode
6764 tinsn->subtype = RELAX_NARROW;
6770 && tinsn->opcode == xtensa_jx_opcode
6775 tinsn->subtype = RELAX_ADD_NOP_IF_PRE_LOOP_END;
6779 if (xg_is_relaxable_insn (tinsn, 0)
6780 && !tinsn->is_specific_opcode)
6782 int max_size = xg_get_max_insn_widen_size (tinsn->opcode);
6784 xg_get_max_insn_widen_literal_size (tinsn->opcode);
6786 tinsn->literal_space = max_literal_size;
6788 tinsn->subtype = RELAX_IMMED;
6805 bundle_tinsn (TInsn *tinsn, vliw_insn *vinsn)
6810 vinsn->format = xg_get_single_format (tinsn->opcode);
6814 chosen_slot = xg_get_single_slot (tinsn->opcode);
6818 vinsn->slots[slot] = *tinsn;
6930 TInsn *tinsn;
6989 tinsn = &vinsn->slots[slot];
6992 if (xtensa_opcode_is_loop (isa, tinsn->opcode) == 1)
6996 if ((tinsn->loc_directive_seen || !loc_directive_seen)
6997 && (tinsn->debug_line.filenum != debug_line.filenum
6998 || tinsn->debug_line.line < debug_line.line
6999 || tinsn->debug_line.column < debug_line.column))
7000 debug_line = tinsn->debug_line;
7001 if (tinsn->loc_directive_seen)
7079 tinsn = &vinsn->slots[slot];
7080 frag_now->tc_frag_data.slot_subtypes[slot] = tinsn->subtype;
7081 frag_now->tc_frag_data.slot_symbols[slot] = tinsn->symbol;
7082 frag_now->tc_frag_data.slot_offsets[slot] = tinsn->offset;
7083 frag_now->tc_frag_data.literal_frags[slot] = tinsn->literal_frag;
7084 if (tinsn->literal_space != 0)
7085 xg_assemble_literal_space (tinsn->literal_space, slot);
7086 frag_now->tc_frag_data.free_reg[slot] = tinsn->extra_arg;
7088 if (tinsn->subtype == RELAX_NARROW)
7090 if (xtensa_opcode_is_jump (isa, tinsn->opcode) == 1)
7092 if (xtensa_opcode_is_branch (isa, tinsn->opcode) == 1)
7095 if (tinsn->subtype || tinsn->symbol || tinsn->offset
7096 || tinsn->literal_frag || is_jump || is_branch)
7382 is_narrow_branch_guaranteed_in_range (fragS *fragP, TInsn *tinsn)
7384 const expressionS *exp = &tinsn->tok[1];
7395 if (is_branch_jmp_to_next (tinsn, fragP))
9174 TInsn tinsn;
9193 tinsn = cur_vinsn.slots[slot];
9194 tinsn_immed_from_frag (&tinsn, fragP, slot);
9196 if (estimate_only && xtensa_opcode_is_loop (isa, tinsn.opcode) == 1)
9200 branch_jmp_to_next = is_branch_jmp_to_next (&tinsn, fragP);
9202 negatable_branch = (xtensa_opcode_is_branch (isa, tinsn.opcode) == 1);
9221 num_steps = xg_assembly_relax (&istack, &tinsn, segP, fragP, frag_offset,
9249 num_steps = xg_assembly_relax (&istack, &tinsn, segP, fragP,
9462 TInsn tinsn, single_target;
9467 tinsn_from_chars (&tinsn, fragP->fr_opcode, 0);
9489 tinsn_immed_from_frag (&tinsn, fragP, 0);
9493 old_size = xg_get_single_size (tinsn.opcode);
9498 if (! xg_is_single_relaxable_insn (&tinsn, &single_target, FALSE))
9632 TInsn *tinsn = &istack.insn[i];
9635 switch (tinsn->insn_type)
9644 if (tinsn->ntok != 1)
9679 if (!opcode_fits_format_slot (tinsn->opcode, fmt, slot))
9680 target_offset += xg_get_single_size (tinsn->opcode);
9683 target_offset += xg_get_single_size (tinsn->opcode);
9692 TInsn *tinsn = &istack.insn[i];
9698 switch (tinsn->insn_type)
9705 gas_assert (tinsn->ntok == 1);
9709 reloc_type = map_operator_to_reloc (tinsn->tok[0].X_op, TRUE);
9711 &tinsn->tok[0], FALSE, reloc_type);
9718 xg_resolve_labels (tinsn, gen_label);
9719 xg_resolve_literals (tinsn, lit_sym);
9723 if (opcode_fits_format_slot (tinsn->opcode, fmt, slot))
9725 cur_vinsn.slots[slot] = *tinsn;
9738 if (!opcode_fits_format_slot (tinsn->opcode, fmt, slot))
9741 (tinsn, immed_instr + size, fragP,
9743 size += xg_get_single_size (tinsn->opcode);
9748 size = xg_get_single_size (tinsn->opcode);
9749 xg_emit_insn_to_buf (tinsn, immed_instr, fragP,
9842 convert_frag_immed_finish_loop (segT segP, fragS *fragP, TInsn *tinsn)
9861 loop_offset = get_expanded_loop_offset (tinsn->opcode);
9873 gas_assert (tinsn->ntok == 2);
9874 if (tinsn->tok[1].X_op == O_constant)
9875 target = tinsn->tok[1].X_add_number;
9876 else if (tinsn->tok[1].X_op == O_symbol)
9879 symbolS *sym = tinsn->tok[1].X_add_symbol;
9882 target = (S_GET_VALUE (sym) + tinsn->tok[1].X_add_number);
9886 as_bad (_("invalid expression evaluation type %d"), tinsn->tok[1].X_op);
11147 /* FIXME: Make tinsn allocation dynamic. */
11411 TInsn *tinsn,
11415 xtensa_opcode opcode = tinsn->opcode;
11420 gas_assert (tinsn->insn_type == ITYPE_INSN);
11421 if (noperands != tinsn->ntok)
11433 expressionS *exp = &tinsn->tok[i];
11480 tinsn_to_insnbuf (TInsn *tinsn, xtensa_insnbuf insnbuf)
11496 bundle_tinsn (tinsn, &vinsn);
11598 tinsn_from_chars (TInsn *tinsn, char *f, int slot)
11605 *tinsn = vinsn.slots[slot];
11611 tinsn_from_insnbuf (TInsn *tinsn,
11620 tinsn_init (tinsn);
11621 tinsn->insn_type = ITYPE_INSN;
11622 tinsn->is_specific_opcode = FALSE; /* must not be specific */
11623 tinsn->opcode = xtensa_opcode_decode (isa, fmt, slot, slotbuf);
11624 tinsn->ntok = xtensa_opcode_num_operands (isa, tinsn->opcode);
11625 for (i = 0; i < tinsn->ntok; i++)
11627 set_expr_const (&tinsn->tok[i],
11629 tinsn->opcode, i));
11637 tinsn_immed_from_frag (TInsn *tinsn, fragS *fragP, int slot)
11639 xtensa_opcode opcode = tinsn->opcode;
11646 set_expr_symbol_offset (&tinsn->tok[opnum],
11650 tinsn->extra_arg = fragP->tc_frag_data.free_reg[slot];
11662 TInsn *tinsn = &istack->insn[i];
11663 if (tinsn->insn_type == ITYPE_INSN)
11664 text_bytes += xg_get_single_size (tinsn->opcode);
11678 TInsn *tinsn = &istack->insn[i];
11679 if (tinsn->insn_type == ITYPE_LITERAL && tinsn->ntok == 1)
11783 TInsn *tinsn = &vinsn->slots[slot];
11784 expressionS *extra_arg = &tinsn->extra_arg;
11786 tinsn_to_slotbuf (vinsn->format, slot, tinsn,
11810 xtensa_opcode opcode = tinsn->opcode;
11816 expressionS* exp = &tinsn->tok[i];
11829 || tinsn->is_specific_opcode
11830 || !xg_is_relaxable_insn (tinsn, 0))
11832 xg_add_opcode_fix (tinsn, i, fmt, slot, exp, fragP,
11839 tinsn->symbol = exp->X_add_symbol;
11840 tinsn->offset = exp->X_add_number;
11887 TInsn *tinsn = &vinsn->slots[i];
11889 tinsn_from_insnbuf (tinsn, slotbuf, fmt, i);