OSDN Git Service

2008-05-22 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Thu, 22 May 2008 17:03:55 +0000 (17:03 +0000)
committerPaul Brook <paul@codesourcery.com>
Thu, 22 May 2008 17:03:55 +0000 (17:03 +0000)
gas/
* config/tc-arm.c (parse_cond): Covert to lowercase before matching.

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

index 592b8de..7a572df 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-22  Paul Brook  <paul@codesourcery.com>
+
+       * config/tc-arm.c (parse_cond): Covert to lowercase before matching.
+
 2008-05-21  I-Jui Sung  <ijsung@gmail.com>
 
        * config/tc-arm.c (arm_cpus): Add Faraday ARMv4 and ARMv5TE
index 31d4a5b..df96d28 100644 (file)
@@ -5043,14 +5043,23 @@ parse_ror (char **str)
 static int
 parse_cond (char **str)
 {
-  char *p, *q;
+  char *q;
   const struct asm_cond *c;
+  int n;
+  /* Condition codes are always 2 characters, so matching up to
+     3 characters is sufficient.  */
+  char cond[3];
 
-  p = q = *str;
-  while (ISALPHA (*q))
-    q++;
+  q = *str;
+  n = 0;
+  while (ISALPHA (*q) && n < 3)
+    {
+      cond[n] = TOLOWER(*q);
+      q++;
+      n++;
+    }
 
-  c = hash_find_n (arm_cond_hsh, p, q - p);
+  c = hash_find_n (arm_cond_hsh, cond, n);
   if (!c)
     {
       inst.error = _("condition required");