mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 07:08:01 +08:00
ia64: use XOBNEW and XOBNEWVEC
gas/ChangeLog: 2016-05-24 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * config/tc-ia64.c (dot_rot): simplify allocations from obstacks. (ia64_frob_label): Likewise.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2016-05-24 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
|
||||||
|
|
||||||
|
* config/tc-ia64.c (dot_rot): simplify allocations from obstacks.
|
||||||
|
(ia64_frob_label): Likewise.
|
||||||
|
|
||||||
2016-05-24 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
|
2016-05-24 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
|
||||||
|
|
||||||
* config/tc-cr16.c (check_range): Make type of retval op_err.
|
* config/tc-cr16.c (check_range): Make type of retval op_err.
|
||||||
|
@ -4668,11 +4668,11 @@ dot_rot (int type)
|
|||||||
|
|
||||||
if (!*drpp)
|
if (!*drpp)
|
||||||
{
|
{
|
||||||
*drpp = obstack_alloc (¬es, sizeof (*dr));
|
*drpp = XOBNEW (¬es, struct dynreg);
|
||||||
memset (*drpp, 0, sizeof (*dr));
|
memset (*drpp, 0, sizeof (*dr));
|
||||||
}
|
}
|
||||||
|
|
||||||
name = obstack_alloc (¬es, len + 1);
|
name = XOBNEWVEC (¬es, char, len + 1);
|
||||||
memcpy (name, start, len);
|
memcpy (name, start, len);
|
||||||
name[len] = '\0';
|
name[len] = '\0';
|
||||||
|
|
||||||
@ -7765,7 +7765,7 @@ ia64_frob_label (struct symbol *sym)
|
|||||||
labels. */
|
labels. */
|
||||||
if (defining_tag)
|
if (defining_tag)
|
||||||
{
|
{
|
||||||
fix = obstack_alloc (¬es, sizeof (*fix));
|
fix = XOBNEW (¬es, struct label_fix);
|
||||||
fix->sym = sym;
|
fix->sym = sym;
|
||||||
fix->next = CURR_SLOT.tag_fixups;
|
fix->next = CURR_SLOT.tag_fixups;
|
||||||
fix->dw2_mark_labels = FALSE;
|
fix->dw2_mark_labels = FALSE;
|
||||||
@ -7777,7 +7777,7 @@ ia64_frob_label (struct symbol *sym)
|
|||||||
if (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE)
|
if (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE)
|
||||||
{
|
{
|
||||||
md.last_text_seg = now_seg;
|
md.last_text_seg = now_seg;
|
||||||
fix = obstack_alloc (¬es, sizeof (*fix));
|
fix = XOBNEW (¬es, struct label_fix);
|
||||||
fix->sym = sym;
|
fix->sym = sym;
|
||||||
fix->next = CURR_SLOT.label_fixups;
|
fix->next = CURR_SLOT.label_fixups;
|
||||||
fix->dw2_mark_labels = dwarf2_loc_mark_labels;
|
fix->dw2_mark_labels = dwarf2_loc_mark_labels;
|
||||||
|
Reference in New Issue
Block a user