* config/tc-tic80.c (build_insn): Fix endianness problem with
authorFred Fish <fnf@specifix.com>
Tue, 15 Jul 1997 02:53:47 +0000 (02:53 +0000)
committerFred Fish <fnf@specifix.com>
Tue, 15 Jul 1997 02:53:47 +0000 (02:53 +0000)
O_big operands.
PR 12765

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

index a55b34fd5813e6671044afa6429b2920f918de0b..df21cb11c4524bd62d93445b96fcb072b761fb50 100644 (file)
@@ -1,3 +1,10 @@
+start-sanitize-tic80
+Mon Jul 14 19:30:55 1997  Fred Fish  <fnf@cygnus.com>
+
+       * config/tc-tic80.c (build_insn): Fix endianness problem with
+       O_big operands.
+
+end-sanitize-tic80
 Sun Jul 13 20:43:46 1997  Ian Lance Taylor  <ian@cygnus.com>
 
        * config/tc-mips.c (check_absolute_expr): Change warning to
index f5b4e7992a68f63b0b96e03d776a51a8e7112652..d173bad0e49461c9812b2545c48b277c86c3ca25 100644 (file)
@@ -677,16 +677,12 @@ build_insn (opcode, opers)
        case O_big:
          extended++;
          {
-           union {
-             unsigned long l;
-             LITTLENUM_TYPE words[10];
-           } u;
-           gen_to_words (u.words, 2, 8L);      /* FIXME: magic numbers */
-           /* FIXME: More magic, swap the littlenums */
-           u.words[2] = u.words[0];
-           u.words[0] = u.words [1];
-           u.words[1] = u.words [2];
-           insn[1] = u.l;
+           int precision = 2;
+           long exponent_bits = 8L;
+           LITTLENUM_TYPE words[2];
+           /* Value is still in generic_floating_point_number */
+           gen_to_words (words, precision, exponent_bits);
+           insn[1] = (words[0] << 16) | words[1];
          }
          break;
        case O_illegal: