Lines Matching refs:unwind

132     /* The following pseudo-registers are used for unwind directives only:  */
258 /* What to do when something is wrong with unwind directives. */
597 /* unwind-related constants: */
606 /* unwind-related registers: */
627 {".IA_64.unwind"}, {".IA_64.unwind_info"},
705 unwind records. */
742 /* Maintain a list of unwind entries for the current function. */
746 /* Any unwind entires that should be attached to the current slot
750 /* These are used to create the unwind table entry for this function. */
752 symbolS *info; /* pointer to unwind info */
756 unsigned int force_unwind_entry : 1; /* force generation of unwind entry? */
758 /* TRUE if processing unwind directives in a prologue region. */
770 } unwind;
1065 if (STREQ ("unwind"))
1141 /* In case there are unwind directives following the last instruction,
1144 for (ptr = unwind.current_entry; ptr; ptr = ptr->next)
1177 unwind.current_entry = NULL;
1778 if (unwind.pending_saves)
1783 for (cur = unwind.list, prev = NULL; cur; )
1784 if (&cur->r.record.p == unwind.pending_saves)
1789 unwind.list = cur->next;
1790 if (cur == unwind.tail)
1791 unwind.tail = prev;
1792 if (cur == unwind.current_entry)
1793 unwind.current_entry = cur->next;
1817 unwind.pending_saves = NULL;
1834 /* Dummy unwind record used for calculating the length of the last prologue or
2024 unwind.pending_saves = &ptr->r.record.p;
2049 unwind.pending_saves = &cur->r.record.p;
2092 unwind.pending_saves = &ptr->r.record.p;
2119 unwind.pending_saves = &ptr->r.record.p;
2143 unwind.pending_saves = &ptr->r.record.p;
2170 unwind.pending_saves = &ptr->r.record.p;
2911 /* Optimize unwind record directives. */
2920 /* If the only unwind record is ".prologue" or ".prologue" followed
2921 by ".body", then we can optimize the unwind directives away. */
2947 as_bad (" Insn slot not set in unwind record.");
3081 to handle here, which is the unwind info frag. */
3113 normal fill frag with the unwind image from the the record list. */
3141 unwind.personality_routine. */
3147 /* 32-bit unwind info block. */
3352 a procedure but the unwind directive check is set to warning, 0 if
3353 a directive isn't in a procedure and the unwind directive check is set
3359 if (unwind.proc_pending.sym
3360 && (!unwind.saved_text_seg || strcmp (directive, "endp") == 0))
3366 a prologue but the unwind directive check is set to warning, 0 if
3367 a directive isn't in a prologue and the unwind directive check is set
3375 if (in > 0 && !unwind.prologue)
3382 a body but the unwind directive check is set to warning, 0 if
3383 a directive isn't in a body and the unwind directive check is set
3391 if (in > 0 && !unwind.body)
3403 if (unwind.tail)
3404 unwind.tail->next = ptr;
3406 unwind.list = ptr;
3407 unwind.tail = ptr;
3409 /* The current entry can in fact be a chain of unwind entries. */
3410 if (unwind.current_entry == NULL)
3411 unwind.current_entry = ptr;
3414 /* The current entry can in fact be a chain of unwind entries. */
3415 if (unwind.current_entry == NULL)
3416 unwind.current_entry = ptr;
3432 as_warn ("Tags on unwind pseudo-ops aren't supported, yet");
3480 if (! (unwind.prologue_mask & 2))
3482 else if (reg != unwind.prologue_gr
3483 + (unsigned) popcount (unwind.prologue_mask & (-2 << 1)))
3564 if (! (unwind.prologue_mask & 4))
3566 else if (reg2 != unwind.prologue_gr
3567 + (unsigned) popcount (unwind.prologue_mask & (-4 << 1)))
3576 if (! (unwind.prologue_mask & 8))
3578 else if (reg2 != unwind.prologue_gr)
3583 if (! (unwind.prologue_mask & 1))
3585 else if (reg2 != unwind.prologue_gr
3586 + (unsigned) popcount (unwind.prologue_mask & (-1 << 1)))
3628 ecount = unwind.prologue_count - 1;
3630 if (ecount >= unwind.prologue_count)
3633 ecount + 1, unwind.prologue_count);
3639 if (ecount < unwind.prologue_count)
3640 unwind.prologue_count -= ecount + 1;
3642 unwind.prologue_count = 0;
3678 Use a slightly ugly scheme to derive the unwind section names from
3681 text sect. unwind table sect.
3684 .text .IA_64.unwind
3685 .text.foo .IA_64.unwind.text.foo
3686 .foo .IA_64.unwind.foo
3694 (a) An object file with unwind info only in .text will use
3695 unwind section names .IA_64.unwind and .IA_64.unwind_info.
3699 (b) An object file with unwind info in multiple text sections
3700 will use separate unwind sections for each text section.
3704 containing unwind info (as might be the case for certain
3720 as_bad ("Illegal section name `%s' (causes unwind section name clash)",
3728 /* Build the unwind section name by appending the (possibly stripped)
3729 text section name to the unwind prefix. */
3792 /* Mark the end of the unwind info, so that we can compute the size of the
3793 last unwind region. */
3796 /* Force out pending instructions, to make sure all unwind records have
3800 /* Generate the unwind record. */
3801 list = optimize_unw_records (unwind.list);
3805 if (size > 0 || unwind.force_unwind_entry)
3807 unwind.force_unwind_entry = 0;
3815 if (unwind.personality_routine)
3819 /* If there are unwind records, switch sections, and output the info. */
3832 /* Set expression which points to start of unwind descriptor area. */
3833 unwind.info = expr_build_dot ();
3836 (offsetT) (long) unwind.personality_routine,
3840 if (unwind.personality_routine != 0)
3843 exp.X_add_symbol = unwind.personality_routine;
3863 unwind.personality_routine = 0;
3868 unwind.list = unwind.tail = unwind.current_entry = NULL;
3877 unwind.force_unwind_entry = 1;
3880 unwind.saved_text_seg = now_seg;
3881 unwind.saved_text_subseg = now_subseg;
3883 /* Generate unwind info into unwind-info section and then leave that
3885 the language specific data area of the unwind info block. */
3896 unwind.force_unwind_entry = 1;
4270 label_prologue_count *lpc = unwind.saved_prologue_counts;
4287 label_prologue_count *lpc = unwind.saved_prologue_counts;
4298 new_lpc->next = unwind.saved_prologue_counts;
4301 unwind.saved_prologue_counts = new_lpc;
4308 label_prologue_count *lpc = unwind.saved_prologue_counts;
4318 unwind.saved_prologue_counts = NULL;
4332 save_prologue_count (e.X_add_number, unwind.prologue_count);
4352 unwind.prologue_count = get_saved_prologue_count (e.X_add_number);
4403 unwind.personality_routine = symbol_find_or_make (name);
4404 unwind.force_unwind_entry = 1;
4418 if (unwind.proc_pending.sym)
4423 while (unwind.proc_pending.next)
4425 pending = unwind.proc_pending.next;
4426 unwind.proc_pending.next = pending->next;
4449 unwind.proc_pending.sym = sym;
4450 last_pending = &unwind.proc_pending;
4468 unwind.proc_pending.sym = expr_build_dot ();
4469 last_pending = &unwind.proc_pending;
4475 unwind.prologue = 0;
4476 unwind.prologue_count = 0;
4477 unwind.body = 0;
4478 unwind.insn = 0;
4479 unwind.list = unwind.tail = unwind.current_entry = NULL;
4480 unwind.personality_routine = 0;
4489 if (!unwind.prologue && !unwind.body && unwind.insn)
4493 unwind.prologue = 0;
4494 unwind.prologue_mask = 0;
4495 unwind.body = 1;
4508 if (unwind.prologue)
4514 if (!unwind.body && unwind.insn)
4563 unwind.prologue = 1;
4564 unwind.prologue_mask = mask;
4565 unwind.prologue_gr = grsave;
4566 unwind.body = 0;
4567 ++unwind.prologue_count;
4587 if (unwind.saved_text_seg)
4589 saved_seg = unwind.saved_text_seg;
4590 saved_subseg = unwind.saved_text_subseg;
4591 unwind.saved_text_seg = NULL;
4602 if (!unwind.info)
4605 if (unwind.info || unwind.force_unwind_entry)
4619 and unwind info. */
4628 if (!S_IS_LOCAL (unwind.proc_pending.sym)
4629 && S_IS_DEFINED (unwind.proc_pending.sym))
4630 e.X_add_symbol = symbol_temp_new (S_GET_SEGMENT (unwind.proc_pending.sym),
4631 S_GET_VALUE (unwind.proc_pending.sym),
4632 symbol_get_frag (unwind.proc_pending.sym));
4634 e.X_add_symbol = unwind.proc_pending.sym;
4644 if (unwind.info)
4649 e.X_add_symbol = unwind.info;
4657 pending = &unwind.proc_pending;
4708 for (pending = &unwind.proc_pending; pending; pending = pending->next)
4729 if (unwind.proc_pending.sym
4730 && S_GET_NAME (unwind.proc_pending.sym)
4731 && strcmp (S_GET_NAME (unwind.proc_pending.sym), FAKE_LABEL_NAME))
4733 S_GET_NAME (unwind.proc_pending.sym));
4734 while (unwind.proc_pending.next)
4736 pending = unwind.proc_pending.next;
4737 unwind.proc_pending.next = pending->next;
4740 unwind.proc_pending.sym = unwind.info = NULL;
5464 { "ia_64.unwind", dot_special_section, SPECIAL_SECTION_UNWIND },
6738 /* If we have unwind records, we may need to update some now. */
7044 /* Set slot numbers for all remaining unwind records belonging to the
7045 current insn. There can not be any prologue/body unwind records
7170 else if (strncmp (arg, "unwind-check=", 13) == 0)
7317 unwind directive check (default -munwind-check=warning)\n\
7620 /* pseudo-registers used to specify unwind info: */
10979 /* Add unwind entries, if there are any. */
10980 if (unwind.current_entry)
10982 CURR_SLOT.unwind_record = unwind.current_entry;
10983 unwind.current_entry = NULL;
10985 if (unwind.pending_saves)
10987 if (unwind.pending_saves->next)
10991 add_unwind_entry (unwind.pending_saves->next, NOT_A_CHAR);
10992 unwind.pending_saves = &unwind.pending_saves->next->r.record.p;
10995 unwind.pending_saves = NULL;
10997 if (unwind.proc_pending.sym && S_IS_DEFINED (unwind.proc_pending.sym))
10998 unwind.insn = 1;