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


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 ();


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