aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-12-20 23:11:00 +0000
committerJim Grosbach <grosbach@apple.com>2011-12-20 23:11:00 +0000
commitaee718beac4fada5914d773db38002d95cae5e0d (patch)
tree79c516c647173a8c2856fd161104844653bb1437
parent2fd0475cdbf7e80d4e5097ab0ddedcce18711ec9 (diff)
ARM .req register name aliases are case insensitive, just like regnames.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147009 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 94631890ac..667418cf12 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -2325,9 +2325,10 @@ int ARMAsmParser::tryParseRegister() {
.Default(0);
}
if (!RegNum) {
- // Check for aliases registered via .req.
- StringMap<unsigned>::const_iterator Entry =
- RegisterReqs.find(Tok.getIdentifier());
+ // Check for aliases registered via .req. Canonicalize to lower case.
+ // That's more consistent since register names are case insensitive, and
+ // it's how the original entry was passed in from MC/MCParser/AsmParser.
+ StringMap<unsigned>::const_iterator Entry = RegisterReqs.find(lowerCase);
// If no match, return failure.
if (Entry == RegisterReqs.end())
return -1;