This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: hppa build broken
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: dave at hiauly1 dot hia dot nrc dot ca
- Cc: binutils at sources dot redhat dot com, amodra at bigpond dot net dot au
- Date: Wed, 15 Jun 2005 14:28:33 -0700 (PDT)
- Subject: Re: hppa build broken
Dave,
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.
Steve Ellcey
sje@cup.hp.com
gas/Changelog
2005-06-15 Steve Ellcey <sje@cup.hp.com>
* config/tc-hppa.c (pa_block): Use bigger blocks to write zero.
*** src.orig/gas/config/tc-hppa.c Wed Jun 15 11:52:46 2005
--- src/gas/config/tc-hppa.c Wed Jun 15 13:40:08 2005
*************** pa_align (bytes)
*** 5933,5938 ****
--- 5933,5940 ----
/* Handle a .BLOCK type pseudo-op. */
+ #define BFRAG_SIZE (1024*1024)
+
static void
pa_block (z)
int z ATTRIBUTE_UNUSED;
*************** pa_block (z)
*** 5954,5961 ****
else
{
/* Always fill with zeros, that's what the HP assembler does. */
! char *p = frag_var (rs_fill, 1, 1, 0, NULL, temp_size, NULL);
! *p = 0;
}
pa_undefine_label ();
--- 5956,5967 ----
else
{
/* Always fill with zeros, that's what the HP assembler does. */
! 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);
}
pa_undefine_label ();