gas/
authorJulian Brown <julian@codesourcery.com>
Tue, 5 Sep 2006 20:23:47 +0000 (20:23 +0000)
committerJulian Brown <julian@codesourcery.com>
Tue, 5 Sep 2006 20:23:47 +0000 (20:23 +0000)
* config/tc-arm.c (parse_qfloat_immediate): Fix hex immediates,
handle 0.0 and -0.0 specially.

gas/testsuite/
* gas/arm/neon-const.s: Use FP syntax for 0/-0.
* gas/arm/vfp-neon-syntax-inc.s: Likewise, for 1.

ChangeLog.csl
gas/config/tc-arm.c
gas/testsuite/gas/arm/neon-const.s
gas/testsuite/gas/arm/vfp-neon-syntax-inc.s

index 3ad0a09..f713e56 100644 (file)
@@ -1,3 +1,13 @@
+2006-09-05  Julian Brown  <julian@codesourcery.com>
+
+       gas/
+       * config/tc-arm.c (parse_qfloat_immediate): Fix hex immediates,
+       handle 0.0 and -0.0 specially.
+
+       gas/testsuite/
+       * gas/arm/neon-const.s: Use FP syntax for 0/-0.
+       * gas/arm/vfp-neon-syntax-inc.s: Likewise, for 1.
+
 2006-09-05  Vladimir Prus  <vladimir@codesourcery.com>
 
        bfd/
index b039d87..ebf3bf4 100644 (file)
@@ -4113,15 +4113,15 @@ is_quarter_float (unsigned imm)
 
 /* Parse an 8-bit "quarter-precision" floating point number of the form:
    0baBbbbbbc defgh000 00000000 00000000.
-   The minus-zero case needs special handling, since it can't be encoded in the
-   "quarter-precision" float format, but can nonetheless be loaded as an integer
-   constant.  */
+   The zero and minus-zero cases need special handling, since they can't be
+   encoded in the "quarter-precision" float format, but can nonetheless be
+   loaded as integer constants.  */
 
 static unsigned
 parse_qfloat_immediate (char **ccp, int *immed)
 {
   char *str = *ccp;
-  char *fpnum = str;
+  char *fpnum;
   LITTLENUM_TYPE words[MAX_LITTLENUMS];
   int found_fpchar = 0;
   
@@ -4134,8 +4134,12 @@ parse_qfloat_immediate (char **ccp, int *immed)
      information isn't in a very usable state at parse time.  A better solution
      should be implemented as part of the fix for allowing the full range of
      pseudo-instructions to be used in VMOV, etc.  */
+  fpnum = str;
   skip_whitespace (fpnum);
-  if (strncmp (fpnum, "0x", 2) != 0)
+
+  if (strncmp (fpnum, "0x", 2) == 0)
+    return FAIL;
+  else
     {
       for (; *fpnum != '\0' && *fpnum != ' ' && *fpnum != '\n'; fpnum++)
         if (*fpnum == '.' || *fpnum == 'e' || *fpnum == 'E')
@@ -4160,7 +4164,7 @@ parse_qfloat_immediate (char **ccp, int *immed)
           fpword |= words[i];
         }
       
-      if (is_quarter_float (fpword) || fpword == 0x80000000)
+      if (is_quarter_float (fpword) || (fpword & 0x7fffffff) == 0)
         *immed = fpword;
       else
         return FAIL;
index 3a5a312..a6fb550 100644 (file)
@@ -4,7 +4,7 @@
        .text
        .syntax unified
 
-        vmov.f32 q0, 0
+        vmov.f32 q0, 0.0
 
        vmov.f32 q0, 2.0
         vmov.f32 q0, 4.0
         vmov.f32 q0, 0.96875
         vmov.f32 q0, 1.9375
 
-        vmov.f32 q0, -0
+        vmov.f32 q0, -0.0
 
        vmov.f32 q0, -2.0
         vmov.f32 q0, -4.0
index d61ae60..fad0bde 100644 (file)
@@ -9,7 +9,7 @@ func:
         vmov\cond\f32 s0,s1
         vmov\cond\f64 d0,d1
         vmov\cond\f32 s0,#0.25
-        vmov\cond\f64 d0,#1
+        vmov\cond\f64 d0,#1.0
        itblock 4 \cond
         vmov\cond r0,s1
         vmov\cond s0,r1