aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2008-05-22 17:03:55 +0000
committerPaul Brook <paul@codesourcery.com>2008-05-22 17:03:55 +0000
commitc462b453bd03f78f519ef46adcda472ba772d204 (patch)
treeca52b7de8c0bccdb89b944564b603ecca3fc9505
parent10f4ecb8fa4a53ca89668ef8f175b9f6c71f6736 (diff)
downloadgdb-c462b453bd03f78f519ef46adcda472ba772d204.zip
gdb-c462b453bd03f78f519ef46adcda472ba772d204.tar.gz
gdb-c462b453bd03f78f519ef46adcda472ba772d204.tar.bz2
2008-05-22 Paul Brook <paul@codesourcery.com>
gas/ * config/tc-arm.c (parse_cond): Covert to lowercase before matching.
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/config/tc-arm.c19
2 files changed, 18 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 592b8de..7a572df 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 31d4a5b..df96d28 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -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");