Lines Matching refs:istack
29 #include "xtensa-istack.h"
518 /* TInsn and IStack functions. */
527 static int get_num_stack_text_bytes (IStack *);
528 static int get_num_stack_literal_bytes (IStack *);
3560 xg_build_to_stack (IStack *istack, TInsn *insn, BuildInstr *bi)
3564 TInsn *next_insn = istack_push_space (istack);
3576 xg_expand_to_stack (IStack *istack, TInsn *insn, int lateral_steps)
3578 int stack_size = istack->ninsn;
3597 if (!xg_build_to_stack (istack, insn, rule->to_instr))
3601 for (i = stack_size; i < istack->ninsn; i++)
3603 TInsn *tinsn = &istack->insn[i];
3609 istack->ninsn = stack_size;
3653 xg_assembly_relax (IStack *istack,
3670 int istack_size = istack->ninsn;
3675 istack_push (istack, insn);
3689 istack_push (istack, &single_target);
3704 istack_push (istack, ¤t_insn);
3709 if (xg_expand_to_stack (istack, ¤t_insn, lateral_steps))
3715 istack->ninsn = istack_size;
3719 istack_push (istack, insn);
3965 xg_expand_assembly_insn (IStack *istack, TInsn *orig_insn)
4038 xg_assembly_relax (istack, orig_insn, 0, 0, 0, 0, 0);
4040 istack_push (istack, orig_insn);
6245 IStack slotstack;
6862 IStack istack; /* put instructions into here */
6866 istack_init (&istack);
6882 xg_assembly_relax (&istack, orig_insn, now_seg, frag_now, 0, 1, 0);
6884 if (xg_expand_assembly_insn (&istack, orig_insn))
6887 for (i = 0; i < istack.ninsn; i++)
6889 TInsn *insn = &istack.insn[i];
9701 IStack istack;
9741 istack_init (&istack);
9742 num_steps = xg_assembly_relax (&istack, &tinsn, segP, fragP, frag_offset,
9749 num_literal_bytes = get_num_stack_literal_bytes (&istack);
9752 num_text_bytes = get_num_stack_text_bytes (&istack);
9757 while (istack.insn[first].opcode == XTENSA_UNDEFINED)
9761 if (opcode_fits_format_slot (istack.insn[first].opcode, fmt, slot))
9762 num_text_bytes -= xg_get_single_size (istack.insn[first].opcode);
9769 istack_init (&istack);
9770 num_steps = xg_assembly_relax (&istack, &tinsn, segP, fragP,
9778 num_literal_bytes = get_num_stack_literal_bytes (&istack);
9782 num_text_bytes = get_num_stack_text_bytes (&istack) + old_size;
9820 if (negatable_branch && istack.ninsn > 1)
9824 if (istack.ninsn > 2 &&
9825 istack.insn[istack.ninsn - 1].insn_type == ITYPE_LABEL &&
9826 istack.insn[istack.ninsn - 2].insn_type == ITYPE_INSN &&
9827 istack.insn[istack.ninsn - 2].opcode == xtensa_j_opcode)
9829 TInsn *jinsn = &istack.insn[istack.ninsn - 2];
9843 expressionS *exp = &istack.insn[istack.ninsn - 2].tok[0];
10161 IStack istack;
10175 istack_init (&istack);
10176 xg_assembly_relax (&istack, &orig_tinsn,
10185 for (i = 0; i < istack.ninsn; i++)
10187 TInsn *tinsn = &istack.insn[i];
10245 for (i = 0; i < istack.ninsn; i++)
10247 TInsn *tinsn = &istack.insn[i];
11773 /* Instruction Stack Functions (from "xtensa-istack.h"). */
11776 istack_init (IStack *stack)
11783 istack_empty (IStack *stack)
11790 istack_full (IStack *stack)
11796 /* Return a pointer to the top IStack entry.
11800 istack_top (IStack *stack)
11808 /* Add a new TInsn to an IStack.
11812 istack_push (IStack *stack, TInsn *insn)
11821 /* Clear space for the next TInsn on the IStack and return a pointer
11825 istack_push_space (IStack *stack)
11841 istack_pop (IStack *stack)
12210 get_num_stack_text_bytes (IStack *istack)
12215 for (i = 0; i < istack->ninsn; i++)
12217 TInsn *tinsn = &istack->insn[i];
12226 get_num_stack_literal_bytes (IStack *istack)
12231 for (i = 0; i < istack->ninsn; i++)
12233 TInsn *tinsn = &istack->insn[i];