This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH]: Allow GAS mcore port to accept .8byte pseudo op
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Thu, 11 Jan 2007 08:58:19 +0000
- Subject: [PATCH]: Allow GAS mcore port to accept .8byte pseudo op
Hi Guys,
I recently discovered that the MCore port of GAS does not accept the
.8byte directive due to a limitation in the way that it had coded
the md_number_to_chars() function. Since we now have perfectly
usable versions of this function in write.c I have applied the
patch below to make use of them.
Cheers
Nick
gas/ChangeLog
2007-01-11 Nick Clifton <nickc@redhat.com>
* config/tc-mcore.c (md_number_to_chars): Use
number_to_chars_{big|little}endian.
Index: gas/config/tc-mcore.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mcore.c,v
retrieving revision 1.41
diff -c -3 -p -r1.41 tc-mcore.c
*** gas/config/tc-mcore.c 7 Jun 2006 11:27:57 -0000 1.41
--- gas/config/tc-mcore.c 11 Jan 2007 08:53:22 -0000
*************** md_estimate_size_before_relax (fragS * f
*** 2170,2193 ****
void
md_number_to_chars (char * ptr, valueT use, int nbytes)
{
! if (! target_big_endian)
! switch (nbytes)
! {
! case 4: ptr[3] = (use >> 24) & 0xff; /* Fall through. */
! case 3: ptr[2] = (use >> 16) & 0xff; /* Fall through. */
! case 2: ptr[1] = (use >> 8) & 0xff; /* Fall through. */
! case 1: ptr[0] = (use >> 0) & 0xff; break;
! default: abort ();
! }
else
! switch (nbytes)
! {
! case 4: *ptr++ = (use >> 24) & 0xff; /* Fall through. */
! case 3: *ptr++ = (use >> 16) & 0xff; /* Fall through. */
! case 2: *ptr++ = (use >> 8) & 0xff; /* Fall through. */
! case 1: *ptr++ = (use >> 0) & 0xff; break;
! default: abort ();
! }
}
/* Round up a section size to the appropriate boundary. */
--- 2170,2179 ----
void
md_number_to_chars (char * ptr, valueT use, int nbytes)
{
! if (target_big_endian)
! number_to_chars_bigendian (ptr, use, nbytes);
else
! number_to_chars_littleendian (ptr, use, nbytes);
}
/* Round up a section size to the appropriate boundary. */