aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/AsmParser/x
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-03-15 21:34:14 +0000
committerJim Grosbach <grosbach@apple.com>2012-03-15 21:34:14 +0000
commitb84ad4aa7dacfba5337520740d47770f2200201c (patch)
treeed18875af0750cbff3f452cbbd5ac3418ff85fe0 /lib/Target/ARM/AsmParser/x
parentccaea7dc0bbc75e5d4ee92fb8cc6af0f928d056f (diff)
downloadexternal_llvm-b84ad4aa7dacfba5337520740d47770f2200201c.zip
external_llvm-b84ad4aa7dacfba5337520740d47770f2200201c.tar.gz
external_llvm-b84ad4aa7dacfba5337520740d47770f2200201c.tar.bz2
ARM case-insensitive checking for APSR_nzcv.
rdar://11056591 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152846 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/AsmParser/x')
-rw-r--r--lib/Target/ARM/AsmParser/x23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Target/ARM/AsmParser/x b/lib/Target/ARM/AsmParser/x
new file mode 100644
index 0000000..1496e70
--- /dev/null
+++ b/lib/Target/ARM/AsmParser/x
@@ -0,0 +1,23 @@
+diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+index af973e8..cbdae2a 100644
+--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
++++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+@@ -3254,7 +3254,8 @@ parseMSRMaskOperand(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
+ SMLoc S = Parser.getTok().getLoc();
+ const AsmToken &Tok = Parser.getTok();
+ assert(Tok.is(AsmToken::Identifier) && "Token is not an Identifier");
+- StringRef Mask = Tok.getString();
++ std::string MaskStr = Tok.getString().lower();
++ StringRef Mask = MaskStr; // convenience for slice() and such.
+
+ if (isMClass()) {
+ // See ARMv6-M 10.1.1
+@@ -3290,7 +3291,7 @@ parseMSRMaskOperand(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
+ // Split spec_reg from flag, example: CPSR_sxf => "CPSR" and "sxf"
+ size_t Start = 0, Next = Mask.find('_');
+ StringRef Flags = "";
+- std::string SpecReg = Mask.slice(Start, Next).lower();
++ StringRef SpecReg = Mask.slice(Start, Next);
+ if (Next != StringRef::npos)
+ Flags = Mask.slice(Next+1, Mask.size());
+