[PATCH] fix VAX LP64 bug in gas
Matt Thomas
matt@3am-software.com
Sun Apr 24 00:13:00 GMT 2005
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
More information about the Binutils
mailing list