From ee5e24cb3e987c74d4dce146b4f78e83fb2b56a8 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Fri, 31 May 2013 15:58:45 +0000 Subject: [PATCH] ARM: permit upper-case BE/LE on setend instruction Patch by Amaury de la Vieuville. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183012 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 2 +- test/MC/ARM/basic-arm-instructions.s | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 9fa389ab2c1..c2871502283 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -3624,7 +3624,7 @@ parseSetEndImm(SmallVectorImpl &Operands) { Error(S, "'be' or 'le' operand expected"); return MatchOperand_ParseFail; } - int Val = StringSwitch(Tok.getString()) + int Val = StringSwitch(Tok.getString().lower()) .Case("be", 1) .Case("le", 0) .Default(-1); diff --git a/test/MC/ARM/basic-arm-instructions.s b/test/MC/ARM/basic-arm-instructions.s index 5227bdd2397..4440ebd2609 100644 --- a/test/MC/ARM/basic-arm-instructions.s +++ b/test/MC/ARM/basic-arm-instructions.s @@ -1745,9 +1745,13 @@ Lforward: @ SETEND @------------------------------------------------------------------------------ setend be + setend BE setend le + setend LE @ CHECK: setend be @ encoding: [0x00,0x02,0x01,0xf1] +@ CHECK: setend be @ encoding: [0x00,0x02,0x01,0xf1] +@ CHECK: setend le @ encoding: [0x00,0x00,0x01,0xf1] @ CHECK: setend le @ encoding: [0x00,0x00,0x01,0xf1]