This is the mail archive of the binutils@sourceware.org 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]

64-bit host failures, tic4x


Fixes these failures on 64-bit or bigendian hosts.
tic4x-coff  +FAIL: data tests
tic4x-coff  +FAIL: ld-scripts/empty-address-2a
tic4x-coff  +FAIL: ld-scripts/empty-address-2b
tic4x-coff  +FAIL: ld-scripts/provide-1

	* config/tc-tic4x.c (tic4x_do_align): Remove ATTRIBUTE_UNUSED on
	params.  Properly generate NOP pattern.  Comment reason for
	subseg_text_p failure.

Index: gas/config/tc-tic4x.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-tic4x.c,v
retrieving revision 1.32
diff -u -p -r1.32 tc-tic4x.c
--- gas/config/tc-tic4x.c	28 Jun 2010 14:06:57 -0000	1.32
+++ gas/config/tc-tic4x.c	27 Feb 2012 01:34:55 -0000
@@ -2955,13 +2955,11 @@ md_pcrel_from (fixS *fixP)
 /* Fill the alignment area with NOP's on .text, unless fill-data
    was specified. */
 int 
-tic4x_do_align (int alignment ATTRIBUTE_UNUSED,
-		const char *fill ATTRIBUTE_UNUSED,
-		int len ATTRIBUTE_UNUSED,
-		int max ATTRIBUTE_UNUSED)
+tic4x_do_align (int alignment,
+		const char *fill,
+		int len,
+		int max)
 {
-  unsigned long nop = TIC_NOP_OPCODE;
-
   /* Because we are talking lwords, not bytes, adjust alignment to do words */
   alignment += 2;
   
@@ -2969,11 +2967,17 @@ tic4x_do_align (int alignment ATTRIBUTE_
     {
       if (fill == NULL)
         {
-          /*if (subseg_text_p (now_seg))*/  /* FIXME: doesn't work for .text for some reason */
-          frag_align_pattern( alignment, (const char *)&nop, sizeof(nop), max);
-          return 1;
-          /*else
-            frag_align (alignment, 0, max);*/
+	  /* FIXME: subseg_text_p tests SEC_CODE which isn't in allowed
+	     section flags.  See bfd/coff-tic4x.c target vecs.  */
+          if (1 || subseg_text_p (now_seg))
+	    {
+	      char nop[4];
+
+	      md_number_to_chars (nop, TIC_NOP_OPCODE, 4);
+	      frag_align_pattern (alignment, nop, sizeof (nop), max);
+	    }
+          else
+            frag_align (alignment, 0, max);
 	}
       else if (len <= 1)
 	frag_align (alignment, *fill, max);

-- 
Alan Modra
Australia Development Lab, IBM


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