Lines Matching defs:unwind
138 /* The following pseudo-registers are used for unwind directives only: */
267 /* What to do when something is wrong with unwind directives. */
303 struct unw_rec_list *unwind_record; /* Unwind directive. */
621 /* unwind-related constants: */
630 /* unwind-related registers: */
651 {".IA_64.unwind"}, {".IA_64.unwind_info"},
729 unwind records. */
766 /* Maintain a list of unwind entries for the current function. */
770 /* Any unwind entries that should be attached to the current slot
774 /* These are used to create the unwind table entry for this function. */
776 symbolS *info; /* pointer to unwind info */
780 unsigned int force_unwind_entry : 1; /* force generation of unwind entry? */
782 /* TRUE if processing unwind directives in a prologue region. */
794 } unwind;
905 if (STREQ ("unwind"))
984 /* In case there are unwind directives following the last instruction,
987 for (ptr = unwind.current_entry; ptr; ptr = ptr->next)
1016 as_bad (_("Unwind directive not followed by an instruction."));
1020 unwind.current_entry = NULL;
1705 if (unwind.pending_saves)
1710 for (cur = unwind.list, prev = NULL; cur; )
1711 if (&cur->r.record.p == unwind.pending_saves)
1716 unwind.list = cur->next;
1717 if (cur == unwind.tail)
1718 unwind.tail = prev;
1719 if (cur == unwind.current_entry)
1720 unwind.current_entry = cur->next;
1744 unwind.pending_saves = NULL;
1761 /* Dummy unwind record used for calculating the length of the last prologue or
1935 unwind.pending_saves = &ptr->r.record.p;
1958 unwind.pending_saves = &cur->r.record.p;
1999 unwind.pending_saves = &ptr->r.record.p;
2025 unwind.pending_saves = &ptr->r.record.p;
2049 unwind.pending_saves = &ptr->r.record.p;
2074 unwind.pending_saves = &ptr->r.record.p;
2781 /* Optimize unwind record directives. */
2789 /* If the only unwind record is ".prologue" or ".prologue" followed
2790 by ".body", then we can optimize the unwind directives away. */
2814 as_bad (_(" Insn slot not set in unwind record."));
2948 to handle here, which is the unwind info frag. */
2980 normal fill frag with the unwind image from the record list. */
3008 unwind.personality_routine. */
3014 /* 32-bit unwind info block. */
3034 /* Fill the unwind personality with zeros. */
3216 a procedure but the unwind directive check is set to warning, 0 if
3217 a directive isn't in a procedure and the unwind directive check is set
3223 if (unwind.proc_pending.sym
3224 && (!unwind.saved_text_seg || strcmp (directive, "endp") == 0))
3230 a prologue but the unwind directive check is set to warning, 0 if
3231 a directive isn't in a prologue and the unwind directive check is set
3239 if (in > 0 && !unwind.prologue)
3246 a body but the unwind directive check is set to warning, 0 if
3247 a directive isn't in a body and the unwind directive check is set
3255 if (in > 0 && !unwind.body)
3265 if (unwind.tail)
3266 unwind.tail->next = ptr;
3268 unwind.list = ptr;
3269 unwind.tail = ptr;
3271 /* The current entry can in fact be a chain of unwind entries. */
3272 if (unwind.current_entry == NULL)
3273 unwind.current_entry = ptr;
3276 /* The current entry can in fact be a chain of unwind entries. */
3277 if (unwind.current_entry == NULL)
3278 unwind.current_entry = ptr;
3294 as_warn (_("Tags on unwind pseudo-ops aren't supported, yet"));
3340 if (! (unwind.prologue_mask & 2))
3342 else if (reg != unwind.prologue_gr
3343 + (unsigned) popcount (unwind.prologue_mask & (-2 << 1)))
3422 if (! (unwind.prologue_mask & 4))
3424 else if (reg2 != unwind.prologue_gr
3425 + (unsigned) popcount (unwind.prologue_mask & (-4 << 1)))
3434 if (! (unwind.prologue_mask & 8))
3436 else if (reg2 != unwind.prologue_gr)
3441 if (! (unwind.prologue_mask & 1))
3443 else if (reg2 != unwind.prologue_gr
3444 + (unsigned) popcount (unwind.prologue_mask & (-1 << 1)))
3485 ecount = unwind.prologue_count - 1;
3487 if (ecount >= unwind.prologue_count)
3490 ecount + 1, unwind.prologue_count);
3496 if (ecount < unwind.prologue_count)
3497 unwind.prologue_count -= ecount + 1;
3499 unwind.prologue_count = 0;
3534 Use a slightly ugly scheme to derive the unwind section names from
3537 text sect. unwind table sect.
3540 .text .IA_64.unwind
3541 .text.foo .IA_64.unwind.text.foo
3542 .foo .IA_64.unwind.foo
3550 (a) An object file with unwind info only in .text will use
3551 unwind section names .IA_64.unwind and .IA_64.unwind_info.
3555 (b) An object file with unwind info in multiple text sections
3556 will use separate unwind sections for each text section.
3560 containing unwind info (as might be the case for certain
3576 as_bad (_("Illegal section name `%s' (causes unwind section name clash)"),
3584 /* Build the unwind section name by appending the (possibly stripped)
3585 text section name to the unwind prefix. */
3648 /* Mark the end of the unwind info, so that we can compute the size of the
3649 last unwind region. */
3652 /* Force out pending instructions, to make sure all unwind records have
3656 /* Generate the unwind record. */
3657 list = optimize_unw_records (unwind.list);
3661 if (size > 0 || unwind.force_unwind_entry)
3663 unwind.force_unwind_entry = 0;
3671 if (unwind.personality_routine)
3675 /* If there are unwind records, switch sections, and output the info. */
3688 /* Set expression which points to start of unwind descriptor area. */
3689 unwind.info = expr_build_dot ();
3692 (offsetT) (long) unwind.personality_routine,
3696 if (unwind.personality_routine != 0)
3699 exp.X_add_symbol = unwind.personality_routine;
3719 unwind.personality_routine = 0;
3724 unwind.list = unwind.tail = unwind.current_entry = NULL;
3732 unwind.force_unwind_entry = 1;
3735 unwind.saved_text_seg = now_seg;
3736 unwind.saved_text_subseg = now_subseg;
3738 /* Generate unwind info into unwind-info section and then leave that
3740 the language specific data area of the unwind info block. */
3750 unwind.force_unwind_entry = 1;
4114 label_prologue_count *lpc = unwind.saved_prologue_counts;
4129 label_prologue_count *lpc = unwind.saved_prologue_counts;
4140 new_lpc->next = unwind.saved_prologue_counts;
4143 unwind.saved_prologue_counts = new_lpc;
4150 label_prologue_count *lpc = unwind.saved_prologue_counts;
4160 unwind.saved_prologue_counts = NULL;
4173 save_prologue_count (e.X_add_number, unwind.prologue_count);
4192 unwind.prologue_count = get_saved_prologue_count (e.X_add_number);
4241 unwind.personality_routine = symbol_find_or_make (name);
4242 unwind.force_unwind_entry = 1;
4255 if (unwind.proc_pending.sym)
4260 while (unwind.proc_pending.next)
4262 pending = unwind.proc_pending.next;
4263 unwind.proc_pending.next = pending->next;
4286 unwind.proc_pending.sym = sym;
4287 last_pending = &unwind.proc_pending;
4305 unwind.proc_pending.sym = expr_build_dot ();
4306 last_pending = &unwind.proc_pending;
4312 unwind.prologue = 0;
4313 unwind.prologue_count = 0;
4314 unwind.body = 0;
4315 unwind.insn = 0;
4316 unwind.list = unwind.tail = unwind.current_entry = NULL;
4317 unwind.personality_routine = 0;
4325 if (!unwind.prologue && !unwind.body && unwind.insn)
4329 unwind.prologue = 0;
4330 unwind.prologue_mask = 0;
4331 unwind.body = 1;
4343 if (unwind.prologue)
4349 if (!unwind.body && unwind.insn)
4398 unwind.prologue = 1;
4399 unwind.prologue_mask = mask;
4400 unwind.prologue_gr = grsave;
4401 unwind.body = 0;
4402 ++unwind.prologue_count;
4421 if (unwind.saved_text_seg)
4423 saved_seg = unwind.saved_text_seg;
4424 saved_subseg = unwind.saved_text_subseg;
4425 unwind.saved_text_seg = NULL;
4436 if (!unwind.info)
4439 if (unwind.info || unwind.force_unwind_entry)
4453 and unwind info. */
4458 /* Issue the values of a) Proc Begin, b) Proc End, c) Unwind Record. */
4462 if (!S_IS_LOCAL (unwind.proc_pending.sym)
4463 && S_IS_DEFINED (unwind.proc_pending.sym))
4464 e.X_add_symbol = symbol_temp_new (S_GET_SEGMENT (unwind.proc_pending.sym),
4465 S_GET_VALUE (unwind.proc_pending.sym),
4466 symbol_get_frag (unwind.proc_pending.sym));
4468 e.X_add_symbol = unwind.proc_pending.sym;
4479 if (unwind.info)
4484 e.X_add_symbol = unwind.info;
4492 pending = &unwind.proc_pending;
4543 for (pending = &unwind.proc_pending; pending; pending = pending->next)
4564 if (unwind.proc_pending.sym
4565 && S_GET_NAME (unwind.proc_pending.sym)
4566 && strcmp (S_GET_NAME (unwind.proc_pending.sym), FAKE_LABEL_NAME))
4568 S_GET_NAME (unwind.proc_pending.sym));
4569 while (unwind.proc_pending.next)
4571 pending = unwind.proc_pending.next;
4572 unwind.proc_pending.next = pending->next;
4575 unwind.proc_pending.sym = unwind
5273 { "ia_64.unwind", dot_special_section, SPECIAL_SECTION_UNWIND },
6620 /* If we have unwind records, we may need to update some now. */
6926 /* Set slot numbers for all remaining unwind records belonging to the
6927 current insn. There can not be any prologue/body unwind records
7052 else if (strncmp (arg, "unwind-check=", 13) == 0)
7198 unwind directive check (default -munwind-check=warning)\n\
7512 /* pseudo-registers used to specify unwind info: */
10882 /* Add unwind entries, if there are any. */
10883 if (unwind.current_entry)
10885 CURR_SLOT.unwind_record = unwind.current_entry;
10886 unwind.current_entry = NULL;
10888 if (unwind.pending_saves)
10890 if (unwind.pending_saves->next)
10894 add_unwind_entry (unwind.pending_saves->next, NOT_A_CHAR);
10895 unwind.pending_saves = &unwind.pending_saves->next->r.record.p;
10898 unwind.pending_saves = NULL;
10900 if (unwind.proc_pending.sym && S_IS_DEFINED (unwind.proc_pending.sym))
10901 unwind.insn = 1;