aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-vax.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-05-05 10:57:06 +0000
committerNick Clifton <nickc@redhat.com>2005-05-05 10:57:06 +0000
commitd8244a4aba2c284db8fc896e3b4c6591c24f11d8 (patch)
tree8fbf7afcd7d556d0734a811c7d52531868a4ab72 /gas/config/tc-vax.c
parentee58dd1ec5cfc8a91c5100c3f90bd81d4e1e10e4 (diff)
downloadgdb-d8244a4aba2c284db8fc896e3b4c6591c24f11d8.zip
gdb-d8244a4aba2c284db8fc896e3b4c6591c24f11d8.tar.gz
gdb-d8244a4aba2c284db8fc896e3b4c6591c24f11d8.tar.bz2
Don't assume a valueT is 4 bytes.
Diffstat (limited to 'gas/config/tc-vax.c')
-rw-r--r--gas/config/tc-vax.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c
index 461f58c..7934aea 100644
--- a/gas/config/tc-vax.c
+++ b/gas/config/tc-vax.c
@@ -1190,18 +1190,17 @@ md_assemble (instruction_string)
p[0] = (operandP->vop_mode << 4) | 0xF;
if ((is_absolute) && (expP->X_op != O_big))
{
- /*
- * If nbytes > 4, then we are scrod. We
- * don't know if the high order bytes
- * are to be 0xFF or 0x00. BSD4.2 & RMS
- * 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)
- {
- memset (p + 5, '\0', nbytes - 4);
- }
+ /* If nbytes > 4, then we are scrod. We
+ don't know if the high order bytes
+ are to be 0xFF or 0x00. BSD4.2 & RMS
+ 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 (sizeof (valueT),
+ (size_t) nbytes));
+ if ((size_t) nbytes > sizeof (valueT))
+ memset (p + 5, '\0', nbytes - sizeof (valueT));
}
else
{