* [committed]: Minor improvement in gas/config/tc-alpha.c:s_alpha_linkage
@ 2011-08-26 15:19 Tristan Gingold
0 siblings, 0 replies; only message in thread
From: Tristan Gingold @ 2011-08-26 15:19 UTC (permalink / raw)
To: binutils Development
Hi,
this minor patch slightly makes the code more readable by making it shorter and adding two comments.
Tristan.
gas/
2011-08-26 Tristan Gingold <gingold@adacore.com>
* config/tc-alpha.c (s_alpha_linkage): Simplify. Add comments.
RCS file: /cvs/src/src/gas/config/tc-alpha.c,v
retrieving revision 1.97
diff -c -r1.97 tc-alpha.c
*** tc-alpha.c 26 Aug 2011 13:16:36 -0000 1.97
--- tc-alpha.c 26 Aug 2011 13:25:27 -0000
***************
*** 4701,4731 ****
p = frag_more (LKP_S_K_SIZE);
memset (p, 0, LKP_S_K_SIZE);
fixp = fix_new_exp
! (frag_now, p - frag_now->fr_literal, LKP_S_K_SIZE, &exp, 0,\
BFD_RELOC_ALPHA_LINKAGE);
linkage_fixup = (struct alpha_linkage_fixups *)
xmalloc (sizeof (struct alpha_linkage_fixups));
-
linkage_fixup->fixp = fixp;
! linkage_fixup->next = 0;
!
! if (alpha_insn_label == 0)
! alpha_insn_label = symbol_new
! (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now);
linkage_fixup->label = alpha_insn_label;
! if (alpha_linkage_fixup_root == 0)
! {
! alpha_linkage_fixup_root = alpha_linkage_fixup_tail = linkage_fixup;
! alpha_linkage_fixup_tail->next = 0;
! }
else
! {
! alpha_linkage_fixup_tail->next = linkage_fixup;
! alpha_linkage_fixup_tail = linkage_fixup;
! alpha_linkage_fixup_tail->next = 0;
! }
}
demand_empty_rest_of_line ();
}
--- 4701,4726 ----
p = frag_more (LKP_S_K_SIZE);
memset (p, 0, LKP_S_K_SIZE);
fixp = fix_new_exp
! (frag_now, p - frag_now->fr_literal, LKP_S_K_SIZE, &exp, 0,
BFD_RELOC_ALPHA_LINKAGE);
+ if (alpha_insn_label == NULL)
+ alpha_insn_label = symbol_new
+ (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now);
+
+ /* Create a linkage element. */
linkage_fixup = (struct alpha_linkage_fixups *)
xmalloc (sizeof (struct alpha_linkage_fixups));
linkage_fixup->fixp = fixp;
! linkage_fixup->next = NULL;
linkage_fixup->label = alpha_insn_label;
! /* Append it to the list. */
! if (alpha_linkage_fixup_root == NULL)
! alpha_linkage_fixup_root = linkage_fixup;
else
! alpha_linkage_fixup_tail->next = linkage_fixup;
! alpha_linkage_fixup_tail = linkage_fixup;
}
demand_empty_rest_of_line ();
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-08-26 13:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26 15:19 [committed]: Minor improvement in gas/config/tc-alpha.c:s_alpha_linkage Tristan Gingold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).