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]

[PATCH] fix VAX LP64 bug in gas


The following fixes quad failures when using binutils for vax on a LP64 hosts.

2005-04-23 Matt Thomas <matt@3am-software.com>

* config/tc-vax.c (md_assemble): Don't assume a valueT is 4 bytes.

Index: config/tc-vax.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-vax.c,v
retrieving revision 1.23
diff -u -3 -p -r1.23 tc-vax.c
--- config/tc-vax.c	1 Apr 2005 14:17:16 -0000	1.23
+++ config/tc-vax.c	23 Apr 2005 23:27:36 -0000
@@ -1143,10 +1143,12 @@ md_assemble (instruction_string)
 			       * say use 0x00. OK --- but this
 			       * assembler needs ANOTHER rewrite to
 			       * cope properly with this bug.  */
-			      md_number_to_chars (p + 1, this_add_number, min (4, nbytes));
-			      if (nbytes > 4)
+			      md_number_to_chars (p + 1, this_add_number,
+				                  min (sizeof(valueT),
+						       (size_t)nbytes));
+			      if ((size_t)nbytes > sizeof(valueT))
 				{
-				  memset (p + 5, '\0', nbytes - 4);
+				  memset (p + 5, '\0', nbytes - sizeof(valueT));
 				}
 			    }
 			  else


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