mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-28 04:13:28 +08:00
* config/tc-mcore.c (md_number_to_chars): Use number_to_chars_{big|little}endian.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2007-01-11 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* config/tc-mcore.c (md_number_to_chars): Use
|
||||||
|
number_to_chars_{big|little}endian.
|
||||||
|
|
||||||
2007-01-08 Kazu Hirata <kazu@codesourcery.com>
|
2007-01-08 Kazu Hirata <kazu@codesourcery.com>
|
||||||
|
|
||||||
* config/tc-m68k.c (m68k_archs, m68k_cpus): Treat Fido as an
|
* config/tc-m68k.c (m68k_archs, m68k_cpus): Treat Fido as an
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* tc-mcore.c -- Assemble code for M*Core
|
/* tc-mcore.c -- Assemble code for M*Core
|
||||||
Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006
|
Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GAS, the GNU Assembler.
|
This file is part of GAS, the GNU Assembler.
|
||||||
@ -2170,24 +2170,10 @@ md_estimate_size_before_relax (fragS * fragP, segT segment_type)
|
|||||||
void
|
void
|
||||||
md_number_to_chars (char * ptr, valueT use, int nbytes)
|
md_number_to_chars (char * ptr, valueT use, int nbytes)
|
||||||
{
|
{
|
||||||
if (! target_big_endian)
|
if (target_big_endian)
|
||||||
switch (nbytes)
|
number_to_chars_bigendian (ptr, use, 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
|
else
|
||||||
switch (nbytes)
|
number_to_chars_littleendian (ptr, use, 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. */
|
/* Round up a section size to the appropriate boundary. */
|
||||||
|
Reference in New Issue
Block a user