from p3: +0.0 is a small integer, at least for moveq
authorKen Raeburn <raeburn@cygnus>
Fri, 4 Sep 1992 23:25:16 +0000 (23:25 +0000)
committerKen Raeburn <raeburn@cygnus>
Fri, 4 Sep 1992 23:25:16 +0000 (23:25 +0000)
gas/ChangeLog
gas/config/tc-m68k.c

index e9846340f8eae230e56542de128c2e9b8318f369..a31cf32c65e07b2fdb766fe6ed4a6e4ae39b91e9 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep  4 18:20:56 1992  Ken Raeburn  (raeburn@cygnus.com)
+
+       * config/tc-m68k.c (get_num, case SEG_BIG): If only small integers
+       including zero are accepted, pass +0.0.
+
 Sun Aug 30 21:24:46 1992  Ian Lance Taylor  (ian@cygnus.com)
 
        * Makefile.in: map "as" through program_transform_name when
index a0109be3d1b4bbaab663942b385d1144932b6f4e..e2433620df52e5ac0205339b525be5b0b6759385 100644 (file)
@@ -3732,15 +3732,24 @@ int ok;
                }
                break;
        case SEG_BIG:
-               if(ok==80 && offs(exp)<0) {     /* HACK! Turn it into a long */
-                       LITTLENUM_TYPE words[6];
-
-                       gen_to_words(words,2,8L);/* These numbers are magic! */
-                       seg(exp)=SEG_ABSOLUTE;
-                       adds(exp)=0;
-                       subs(exp)=0;
-                       offs(exp)=words[1]|(words[0]<<16);
-               } else if(ok!=0) {
+               if (offs (exp) < 0 /* flonum */
+                   && (ok == 80 /* no bignums */
+                       || (ok > 10 /* small-int ranges including 0 ok */
+                           /* If we have a flonum zero, a zero integer should
+                              do as well (e.g., in moveq).  */
+                           && generic_floating_point_number.exponent == 0
+                           && generic_floating_point_number.low[0] == 0)))
+                 {
+                   /* HACK! Turn it into a long */
+                   LITTLENUM_TYPE words[6];
+
+                   gen_to_words(words,2,8L);/* These numbers are magic! */
+                   seg(exp)=SEG_ABSOLUTE;
+                   adds(exp)=0;
+                   subs(exp)=0;
+                   offs(exp)=words[1]|(words[0]<<16);
+                 }
+               else if(ok!=0) {
                        seg(exp)=SEG_ABSOLUTE;
                        adds(exp)=0;
                        subs(exp)=0;