This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Tue, Mar 02, 2004 at 06:24:44PM -0800, Jim Wilson wrote: > On Tue, 2004-03-02 at 12:36, H. J. Lu wrote: > > * config/tc-ia64.c (align_frag): New. > > (md_assemble): Set the tc_frag_data field in align_frag for > > IA64_OPCODE_FIRST instructions. > > (ia64_md_do_align): Set align_frag. > > (ia64_handle_align): Add a stop bit if needed. > > This looks good to me. > > However, I don't think it is fool proof. When we create an > rs_align_code frag, we call frag_align_code, which calls frag_var, which > calls frag_grow with the requested alignment - 1. If there is no room > left in this obstack, then frag_grow will create a new frag. So in some > cases, the alignment frag will be the one after align_frag. > > There is also a loop in frag_grow which implies that the alignment frag > could be arbitrarily later, however, it isn't clear to me why the loop > is there. So it looks like in rare cases the alignment frag could be > two after align_frag, and maybe in even rarer cases it could be farther. > > In order to handle this, I think we need a loop to search forward from > align_frag to find the real alignment frag. The first frag starting > from align_frag that has rs_align_code is the alignment frag. Here is the new patch. H.J.
Attachment:
gas-ia64-alloc-3.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |