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]

Re: hppa build broken


> How about this patch to pa_block.  It seems to work well for me
> and causes no regressions.  I got an XPASS on hppa/parse/block1.s.  The
> bigger I make BFRAG_SIZE, the faster it runs, but the more memory it
> takes.  On my HP-UX PA workstation I could run block1.s in about 2.5
> minutes with the patch vs. 30+ minutes without the patch.

That's definitely a nice improvement in speed.  I think allocating
1 MB is ok on today's machines.

> !       int bcount = temp_size / BFRAG_SIZE;
> !       int extra = temp_size - (bcount * BFRAG_SIZE);
> !       char *p = frag_var (rs_fill, BFRAG_SIZE, BFRAG_SIZE, 0, NULL, bcount, NULL);
> !       memset (p, 0, BFRAG_SIZE);
> !       p = frag_var (rs_fill, extra, extra, 0, NULL, 1, NULL);
> !       memset (p, 0, extra);

I'm not convinced that this is correct.  Both bcount and extra could
be zero.  0 is the default value for .block.  Thus, I don't think
the first frag_var should be created when bcount is zero.  Also, bcount
and extra probably should be unsigned int's.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]