This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: hppa build broken
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: sje at cup dot hp dot com (Steve Ellcey)
- Cc: binutils at sources dot redhat dot com, amodra at bigpond dot net dot au
- Date: Wed, 15 Jun 2005 22:33:51 -0400 (EDT)
- Subject: Re: hppa build broken
Steve,
> Hm, didn't think about a size of zero. Here is an updated patch. I am
> not sure if I need to call frag_var at all if I have a temp_size of
> zero, but I put it in. The regression tests worked with or without the
> check for "(bcount == 0 && extra == 0)" but it seemed safer to put it
> in and duplicate the existing behavour.
Does this help with performance on your workstation? I've checked
that it does the right thing but it it doesn't seem to help with
performance on my A550. I'm updating the installed SCSI patches
but I'm not too hopeful that it will help. I tried two different
drives using different controllers.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
Index: config/tc-hppa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-hppa.c,v
retrieving revision 1.121
diff -u -3 -p -r1.121 tc-hppa.c
--- config/tc-hppa.c 10 Jun 2005 05:46:48 -0000 1.121
+++ config/tc-hppa.c 16 Jun 2005 02:14:47 -0000
@@ -5933,6 +5933,8 @@ pa_align (bytes)
/* Handle a .BLOCK type pseudo-op. */
+#define BFRAG_SIZE (1024*1024)
+
static void
pa_block (z)
int z ATTRIBUTE_UNUSED;
@@ -5953,9 +5955,20 @@ pa_block (z)
}
else
{
+ unsigned int bcount = temp_size / BFRAG_SIZE;
+ unsigned int extra = temp_size - (bcount * BFRAG_SIZE);
+
/* 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;
+ if (bcount > 0)
+ {
+ char *p = frag_var (rs_fill, BFRAG_SIZE, BFRAG_SIZE, 0, NULL, bcount, NULL);
+ memset (p, 0, BFRAG_SIZE);
+ }
+ if (extra > 0 || bcount == 0)
+ {
+ char *p = frag_var (rs_fill, extra, extra, 0, NULL, 1, NULL);
+ memset (p, 0, extra);
+ }
}
pa_undefine_label ();