Lines Matching refs:tinsn
3596 TInsn *tinsn = &istack->insn[i]; in xg_expand_to_stack() local
3598 if (tinsn->insn_type == ITYPE_INSN in xg_expand_to_stack()
3599 && !tinsn_has_symbolic_operands (tinsn) in xg_expand_to_stack()
3600 && !xg_immeds_fit (tinsn)) in xg_expand_to_stack()
4216 xg_add_opcode_fix (TInsn *tinsn, in xg_add_opcode_fix() argument
4224 xtensa_opcode opcode = tinsn->opcode; in xg_add_opcode_fix()
4299 xg_emit_insn_to_buf (TInsn *tinsn, in xg_emit_insn_to_buf() argument
4312 has_symbolic_immed = tinsn_to_insnbuf (tinsn, insnbuf); in xg_emit_insn_to_buf()
4316 xtensa_format fmt = xg_get_single_format (tinsn->opcode); in xg_emit_insn_to_buf()
4317 int slot = xg_get_single_slot (tinsn->opcode); in xg_emit_insn_to_buf()
4318 int opnum = get_relaxable_immed (tinsn->opcode); in xg_emit_insn_to_buf()
4319 expressionS *exp = &tinsn->tok[opnum]; in xg_emit_insn_to_buf()
4321 if (!xg_add_opcode_fix (tinsn, opnum, fmt, slot, exp, fragP, offset)) in xg_emit_insn_to_buf()
4392 is_bad_loopend_opcode (const TInsn *tinsn) in is_bad_loopend_opcode() argument
4394 xtensa_opcode opcode = tinsn->opcode; in is_bad_loopend_opcode()
4758 build_nop (TInsn *tinsn, int size) in build_nop() argument
4760 tinsn_init (tinsn); in build_nop()
4764 tinsn->opcode = xtensa_nop_n_opcode; in build_nop()
4765 tinsn->ntok = 0; in build_nop()
4766 if (tinsn->opcode == XTENSA_UNDEFINED) in build_nop()
4773 tinsn->opcode = xtensa_or_opcode; in build_nop()
4774 set_expr_const (&tinsn->tok[0], 1); in build_nop()
4775 set_expr_const (&tinsn->tok[1], 1); in build_nop()
4776 set_expr_const (&tinsn->tok[2], 1); in build_nop()
4777 tinsn->ntok = 3; in build_nop()
4780 tinsn->opcode = xtensa_nop_opcode; in build_nop()
4782 gas_assert (tinsn->opcode != XTENSA_UNDEFINED); in build_nop()
4794 TInsn tinsn; in assemble_nop() local
4796 build_nop (&tinsn, size); in assemble_nop()
4801 tinsn_to_insnbuf (&tinsn, insnbuf); in assemble_nop()
6770 TInsn *tinsn = &vinsn->slots[slot]; in relaxation_requirements() local
6771 if (!tinsn_has_symbolic_operands (tinsn)) in relaxation_requirements()
6775 if (xg_is_single_relaxable_insn (tinsn, 0, TRUE) in relaxation_requirements()
6776 && !tinsn->is_specific_opcode in relaxation_requirements()
6781 tinsn->subtype = RELAX_NARROW; in relaxation_requirements()
6787 && tinsn->opcode == xtensa_jx_opcode in relaxation_requirements()
6792 tinsn->subtype = RELAX_ADD_NOP_IF_PRE_LOOP_END; in relaxation_requirements()
6796 if (xg_is_relaxable_insn (tinsn, 0) in relaxation_requirements()
6797 && !tinsn->is_specific_opcode) in relaxation_requirements()
6799 int max_size = xg_get_max_insn_widen_size (tinsn->opcode); in relaxation_requirements()
6801 xg_get_max_insn_widen_literal_size (tinsn->opcode); in relaxation_requirements()
6803 tinsn->literal_space = max_literal_size; in relaxation_requirements()
6805 tinsn->subtype = RELAX_IMMED; in relaxation_requirements()
6822 bundle_tinsn (TInsn *tinsn, vliw_insn *vinsn) in bundle_tinsn() argument
6827 vinsn->format = xg_get_single_format (tinsn->opcode); in bundle_tinsn()
6831 chosen_slot = xg_get_single_slot (tinsn->opcode); in bundle_tinsn()
6835 vinsn->slots[slot] = *tinsn; in bundle_tinsn()
6947 TInsn *tinsn; in xg_assemble_vliw_tokens() local
7006 tinsn = &vinsn->slots[slot]; in xg_assemble_vliw_tokens()
7009 if (xtensa_opcode_is_loop (isa, tinsn->opcode) == 1) in xg_assemble_vliw_tokens()
7013 if ((tinsn->loc_directive_seen || !loc_directive_seen) in xg_assemble_vliw_tokens()
7014 && (tinsn->debug_line.filenum != debug_line.filenum in xg_assemble_vliw_tokens()
7015 || tinsn->debug_line.line < debug_line.line in xg_assemble_vliw_tokens()
7016 || tinsn->debug_line.column < debug_line.column)) in xg_assemble_vliw_tokens()
7017 debug_line = tinsn->debug_line; in xg_assemble_vliw_tokens()
7018 if (tinsn->loc_directive_seen) in xg_assemble_vliw_tokens()
7096 tinsn = &vinsn->slots[slot]; in xg_assemble_vliw_tokens()
7097 frag_now->tc_frag_data.slot_subtypes[slot] = tinsn->subtype; in xg_assemble_vliw_tokens()
7098 frag_now->tc_frag_data.slot_symbols[slot] = tinsn->symbol; in xg_assemble_vliw_tokens()
7099 frag_now->tc_frag_data.slot_offsets[slot] = tinsn->offset; in xg_assemble_vliw_tokens()
7100 frag_now->tc_frag_data.literal_frags[slot] = tinsn->literal_frag; in xg_assemble_vliw_tokens()
7101 if (tinsn->literal_space != 0) in xg_assemble_vliw_tokens()
7102 xg_assemble_literal_space (tinsn->literal_space, slot); in xg_assemble_vliw_tokens()
7103 frag_now->tc_frag_data.free_reg[slot] = tinsn->extra_arg; in xg_assemble_vliw_tokens()
7105 if (tinsn->subtype == RELAX_NARROW) in xg_assemble_vliw_tokens()
7107 if (xtensa_opcode_is_jump (isa, tinsn->opcode) == 1) in xg_assemble_vliw_tokens()
7109 if (xtensa_opcode_is_branch (isa, tinsn->opcode) == 1) in xg_assemble_vliw_tokens()
7112 if (tinsn->subtype || tinsn->symbol || tinsn->offset in xg_assemble_vliw_tokens()
7113 || tinsn->literal_frag || is_jump || is_branch) in xg_assemble_vliw_tokens()
7554 is_narrow_branch_guaranteed_in_range (fragS *fragP, TInsn *tinsn) in is_narrow_branch_guaranteed_in_range() argument
7556 const expressionS *exp = &tinsn->tok[1]; in is_narrow_branch_guaranteed_in_range()
7567 if (is_branch_jmp_to_next (tinsn, fragP)) in is_narrow_branch_guaranteed_in_range()
9478 search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only) in search_trampolines() argument
9485 symbolS *sym = tinsn->tok[0].X_add_symbol; in search_trampolines()
9486 offsetT target = S_GET_VALUE (sym) + tinsn->tok[0].X_add_number; in search_trampolines()
9548 get_best_trampoline (TInsn *tinsn, fragS *fragP) in get_best_trampoline() argument
9552 tf = search_trampolines (tinsn, fragP, TRUE); /* Try unreachable first. */ in get_best_trampoline()
9555 tf = search_trampolines (tinsn, fragP, FALSE); /* Try ones needing a jump-around, too. */ in get_best_trampoline()
9681 TInsn tinsn; in relax_frag_immed() local
9700 tinsn = cur_vinsn.slots[slot]; in relax_frag_immed()
9701 tinsn_immed_from_frag (&tinsn, fragP, slot); in relax_frag_immed()
9703 if (estimate_only && xtensa_opcode_is_loop (isa, tinsn.opcode) == 1) in relax_frag_immed()
9707 branch_jmp_to_next = is_branch_jmp_to_next (&tinsn, fragP); in relax_frag_immed()
9709 negatable_branch = (xtensa_opcode_is_branch (isa, tinsn.opcode) == 1); in relax_frag_immed()
9728 num_steps = xg_assembly_relax (&istack, &tinsn, segP, fragP, frag_offset, in relax_frag_immed()
9756 num_steps = xg_assembly_relax (&istack, &tinsn, segP, fragP, in relax_frag_immed()
10002 TInsn tinsn, single_target; in convert_frag_narrow() local
10007 tinsn_from_chars (&tinsn, fragP->fr_opcode, 0); in convert_frag_narrow()
10029 tinsn_immed_from_frag (&tinsn, fragP, 0); in convert_frag_narrow()
10033 old_size = xg_get_single_size (tinsn.opcode); in convert_frag_narrow()
10038 if (! xg_is_single_relaxable_insn (&tinsn, &single_target, FALSE)) in convert_frag_narrow()
10172 TInsn *tinsn = &istack.insn[i]; in convert_frag_immed() local
10175 switch (tinsn->insn_type) in convert_frag_immed()
10184 if (tinsn->ntok != 1) in convert_frag_immed()
10219 if (!opcode_fits_format_slot (tinsn->opcode, fmt, slot)) in convert_frag_immed()
10220 target_offset += xg_get_single_size (tinsn->opcode); in convert_frag_immed()
10223 target_offset += xg_get_single_size (tinsn->opcode); in convert_frag_immed()
10232 TInsn *tinsn = &istack.insn[i]; in convert_frag_immed() local
10238 switch (tinsn->insn_type) in convert_frag_immed()
10245 gas_assert (tinsn->ntok == 1); in convert_frag_immed()
10249 reloc_type = map_operator_to_reloc (tinsn->tok[0].X_op, TRUE); in convert_frag_immed()
10251 &tinsn->tok[0], FALSE, reloc_type); in convert_frag_immed()
10258 xg_resolve_labels (tinsn, gen_label); in convert_frag_immed()
10259 xg_resolve_literals (tinsn, lit_sym); in convert_frag_immed()
10263 if (opcode_fits_format_slot (tinsn->opcode, fmt, slot)) in convert_frag_immed()
10265 cur_vinsn.slots[slot] = *tinsn; in convert_frag_immed()
10278 if (!opcode_fits_format_slot (tinsn->opcode, fmt, slot)) in convert_frag_immed()
10281 (tinsn, immed_instr + size, fragP, in convert_frag_immed()
10283 size += xg_get_single_size (tinsn->opcode); in convert_frag_immed()
10288 size = xg_get_single_size (tinsn->opcode); in convert_frag_immed()
10289 xg_emit_insn_to_buf (tinsn, immed_instr, fragP, in convert_frag_immed()
10382 convert_frag_immed_finish_loop (segT segP, fragS *fragP, TInsn *tinsn) in convert_frag_immed_finish_loop() argument
10401 loop_offset = get_expanded_loop_offset (tinsn->opcode); in convert_frag_immed_finish_loop()
10413 gas_assert (tinsn->ntok == 2); in convert_frag_immed_finish_loop()
10414 if (tinsn->tok[1].X_op == O_constant) in convert_frag_immed_finish_loop()
10415 target = tinsn->tok[1].X_add_number; in convert_frag_immed_finish_loop()
10416 else if (tinsn->tok[1].X_op == O_symbol) in convert_frag_immed_finish_loop()
10419 symbolS *sym = tinsn->tok[1].X_add_symbol; in convert_frag_immed_finish_loop()
10422 target = (S_GET_VALUE (sym) + tinsn->tok[1].X_add_number); in convert_frag_immed_finish_loop()
10426 as_bad (_("invalid expression evaluation type %d"), tinsn->tok[1].X_op); in convert_frag_immed_finish_loop()
11945 TInsn *tinsn, in tinsn_to_slotbuf() argument
11949 xtensa_opcode opcode = tinsn->opcode; in tinsn_to_slotbuf()
11954 gas_assert (tinsn->insn_type == ITYPE_INSN); in tinsn_to_slotbuf()
11955 if (noperands != tinsn->ntok) in tinsn_to_slotbuf()
11967 expressionS *exp = &tinsn->tok[i]; in tinsn_to_slotbuf()
12014 tinsn_to_insnbuf (TInsn *tinsn, xtensa_insnbuf insnbuf) in tinsn_to_insnbuf() argument
12030 bundle_tinsn (tinsn, &vinsn); in tinsn_to_insnbuf()
12132 tinsn_from_chars (TInsn *tinsn, char *f, int slot) in tinsn_from_chars() argument
12139 *tinsn = vinsn.slots[slot]; in tinsn_from_chars()
12145 tinsn_from_insnbuf (TInsn *tinsn, in tinsn_from_insnbuf() argument
12154 tinsn_init (tinsn); in tinsn_from_insnbuf()
12155 tinsn->insn_type = ITYPE_INSN; in tinsn_from_insnbuf()
12156 tinsn->is_specific_opcode = FALSE; /* must not be specific */ in tinsn_from_insnbuf()
12157 tinsn->opcode = xtensa_opcode_decode (isa, fmt, slot, slotbuf); in tinsn_from_insnbuf()
12158 tinsn->ntok = xtensa_opcode_num_operands (isa, tinsn->opcode); in tinsn_from_insnbuf()
12159 for (i = 0; i < tinsn->ntok; i++) in tinsn_from_insnbuf()
12161 set_expr_const (&tinsn->tok[i], in tinsn_from_insnbuf()
12163 tinsn->opcode, i)); in tinsn_from_insnbuf()
12171 tinsn_immed_from_frag (TInsn *tinsn, fragS *fragP, int slot) in tinsn_immed_from_frag() argument
12173 xtensa_opcode opcode = tinsn->opcode; in tinsn_immed_from_frag()
12180 set_expr_symbol_offset (&tinsn->tok[opnum], in tinsn_immed_from_frag()
12184 tinsn->extra_arg = fragP->tc_frag_data.free_reg[slot]; in tinsn_immed_from_frag()
12196 TInsn *tinsn = &istack->insn[i]; in get_num_stack_text_bytes() local
12197 if (tinsn->insn_type == ITYPE_INSN) in get_num_stack_text_bytes()
12198 text_bytes += xg_get_single_size (tinsn->opcode); in get_num_stack_text_bytes()
12212 TInsn *tinsn = &istack->insn[i]; in get_num_stack_literal_bytes() local
12213 if (tinsn->insn_type == ITYPE_LITERAL && tinsn->ntok == 1) in get_num_stack_literal_bytes()
12316 TInsn *tinsn = &vinsn->slots[slot]; in vinsn_to_insnbuf() local
12317 expressionS *extra_arg = &tinsn->extra_arg; in vinsn_to_insnbuf()
12319 tinsn_to_slotbuf (vinsn->format, slot, tinsn, in vinsn_to_insnbuf()
12343 xtensa_opcode opcode = tinsn->opcode; in vinsn_to_insnbuf()
12349 expressionS* exp = &tinsn->tok[i]; in vinsn_to_insnbuf()
12362 || tinsn->is_specific_opcode in vinsn_to_insnbuf()
12363 || !xg_is_relaxable_insn (tinsn, 0)) in vinsn_to_insnbuf()
12365 xg_add_opcode_fix (tinsn, i, fmt, slot, exp, fragP, in vinsn_to_insnbuf()
12372 tinsn->symbol = exp->X_add_symbol; in vinsn_to_insnbuf()
12373 tinsn->offset = exp->X_add_number; in vinsn_to_insnbuf()
12420 TInsn *tinsn = &vinsn->slots[i]; in vinsn_from_chars() local
12422 tinsn_from_insnbuf (tinsn, slotbuf, fmt, i); in vinsn_from_chars()