* config/tc-sh.c (md_apply_fix) [BFD_RELOC_32, BFD_RELOC_16]: Use
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 15 Aug 2000 16:04:37 +0000 (16:04 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Tue, 15 Aug 2000 16:04:37 +0000 (16:04 +0000)
md_number_to_chars.

gas/ChangeLog
gas/config/tc-sh.c

index f76f4825e092556fc26da2cadf4316ba404fb3af..7b0a37eac2faf33c1c9b158bad02cd7632c8052b 100644 (file)
@@ -1,3 +1,8 @@
+2000-08-15  Alexandre Oliva  <aoliva@redhat.com>
+
+       * config/tc-sh.c (md_apply_fix) [BFD_RELOC_32, BFD_RELOC_16]: Use
+       md_number_to_chars.
+
 2000-08-14  Nick Clifton  <nickc@redhat.com>
 
        * config/tc-arm.c (do_bx): Allow "bx pc".
index c120d0cf6952dfbf423baab32b79a0e994ab0fe4..359b2bec6bb81ffba4b2fa676c68e70156c0643f 100644 (file)
@@ -2681,33 +2681,11 @@ md_apply_fix (fixP, val)
       break;
 
     case BFD_RELOC_32:
-      if (!target_big_endian)
-       {
-         *buf++ = val >> 0;
-         *buf++ = val >> 8;
-         *buf++ = val >> 16;
-         *buf++ = val >> 24;
-       }
-      else
-       {
-         *buf++ = val >> 24;
-         *buf++ = val >> 16;
-         *buf++ = val >> 8;
-         *buf++ = val >> 0;
-       }
+      md_number_to_chars (buf, val, 4);
       break;
 
     case BFD_RELOC_16:
-      if (! target_big_endian)
-       {
-         *buf++ = val >> 0;
-         *buf++ = val >> 8;
-       }
-      else
-       {
-         *buf++ = val >> 8;
-         *buf++ = val >> 0;
-       }
+      md_number_to_chars (buf, val, 2);
       break;
 
     case BFD_RELOC_SH_USES: