[llvm] r207646 - AArch64/ARM64: copy support for bCC instead of b.CC across.
Tim Northover
tnorthover at apple.com
Wed Apr 30 06:36:56 PDT 2014
Author: tnorthover
Date: Wed Apr 30 08:36:56 2014
New Revision: 207646
URL: http://llvm.org/viewvc/llvm-project?rev=207646&view=rev
Log:
AArch64/ARM64: copy support for bCC instead of b.CC across.
Added:
llvm/trunk/test/MC/ARM64/condbr-without-dots.s
Modified:
llvm/trunk/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
Modified: llvm/trunk/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp?rev=207646&r1=207645&r2=207646&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp Wed Apr 30 08:36:56 2014
@@ -3257,6 +3257,27 @@ bool ARM64AsmParser::parseOperand(Operan
bool ARM64AsmParser::ParseInstruction(ParseInstructionInfo &Info,
StringRef Name, SMLoc NameLoc,
OperandVector &Operands) {
+ Name = StringSwitch<StringRef>(Name.lower())
+ .Case("beq", "b.eq")
+ .Case("bne", "b.ne")
+ .Case("bhs", "b.hs")
+ .Case("bcs", "b.cs")
+ .Case("blo", "b.lo")
+ .Case("bcc", "b.cc")
+ .Case("bmi", "b.mi")
+ .Case("bpl", "b.pl")
+ .Case("bvs", "b.vs")
+ .Case("bvc", "b.vc")
+ .Case("bhi", "b.hi")
+ .Case("bls", "b.ls")
+ .Case("bge", "b.ge")
+ .Case("blt", "b.lt")
+ .Case("bgt", "b.gt")
+ .Case("ble", "b.le")
+ .Case("bal", "b.al")
+ .Case("bnv", "b.nv")
+ .Default(Name);
+
// Create the leading tokens for the mnemonic, split by '.' characters.
size_t Start = 0, Next = Name.find('.');
StringRef Head = Name.slice(Start, Next);
Added: llvm/trunk/test/MC/ARM64/condbr-without-dots.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM64/condbr-without-dots.s?rev=207646&view=auto
==============================================================================
--- llvm/trunk/test/MC/ARM64/condbr-without-dots.s (added)
+++ llvm/trunk/test/MC/ARM64/condbr-without-dots.s Wed Apr 30 08:36:56 2014
@@ -0,0 +1,37 @@
+// RUN: llvm-mc -triple arm64-apple-ios -o - %s | FileCheck %s
+
+ beq lbl
+ bne lbl
+ bcs lbl
+ bhs lbl
+ blo lbl
+ bcc lbl
+ bmi lbl
+ bpl lbl
+ bvs lbl
+ bvc lbl
+ bhi lbl
+ bls lbl
+ bge lbl
+ blt lbl
+ bgt lbl
+ ble lbl
+ bal lbl
+
+// CHECK: b.eq lbl
+// CHECK: b.ne lbl
+// CHECK: b.hs lbl
+// CHECK: b.hs lbl
+// CHECK: b.lo lbl
+// CHECK: b.lo lbl
+// CHECK: b.mi lbl
+// CHECK: b.pl lbl
+// CHECK: b.vs lbl
+// CHECK: b.vc lbl
+// CHECK: b.hi lbl
+// CHECK: b.ls lbl
+// CHECK: b.ge lbl
+// CHECK: b.lt lbl
+// CHECK: b.gt lbl
+// CHECK: b.le lbl
+// CHECK: b.al lbl
More information about the llvm-commits
mailing list