summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/InstPrinter
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-10-21 18:54:25 +0000
committerJim Grosbach <grosbach@apple.com>2011-10-21 18:54:25 +0000
commit2f2e3c47373ca2ee60d4d0810da3429443fa4aca (patch)
tree7ebf77ca316e8c20adb2e21780e78fc603d45e1e /llvm/lib/Target/ARM/InstPrinter
parent03a173eb71caa9c8835288f8e89a8e765fec19cf (diff)
downloadbcm5719-llvm-2f2e3c47373ca2ee60d4d0810da3429443fa4aca.tar.gz
bcm5719-llvm-2f2e3c47373ca2ee60d4d0810da3429443fa4aca.zip
ARM VLD parsing and encoding.
Next step in the ongoing saga of NEON load/store assmebly parsing. Handle VLD1 instructions that take a two-register register list. Adjust the instruction definitions to only have the single encoded register as an operand. The super-register from the pseudo is kept as an implicit def, so passes which come after pseudo-expansion still know that the instruction defines the other subregs. llvm-svn: 142670
Diffstat (limited to 'llvm/lib/Target/ARM/InstPrinter')
-rw-r--r--llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp9
-rw-r--r--llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
index b907e57535a..1a7e17013b2 100644
--- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
+++ b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
@@ -995,3 +995,12 @@ void ARMInstPrinter::printVectorListOne(const MCInst *MI, unsigned OpNum,
raw_ostream &O) {
O << "{" << getRegisterName(MI->getOperand(OpNum).getReg()) << "}";
}
+
+void ARMInstPrinter::printVectorListTwo(const MCInst *MI, unsigned OpNum,
+ raw_ostream &O) {
+ // Normally, it's not safe to use register enum values directly with
+ // addition to get the next register, but for VFP registers, the
+ // sort order is guaranteed because they're all of the form D<n>.
+ O << "{" << getRegisterName(MI->getOperand(OpNum).getReg()) << ", "
+ << getRegisterName(MI->getOperand(OpNum).getReg() + 1) << "}";
+}
diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h
index 3b5e8668b8b..1d4bff6b965 100644
--- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h
+++ b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h
@@ -130,6 +130,7 @@ public:
void printT2LdrLabelOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
void printVectorIndex(const MCInst *MI, unsigned OpNum, raw_ostream &O);
void printVectorListOne(const MCInst *MI, unsigned OpNum, raw_ostream &O);
+ void printVectorListTwo(const MCInst *MI, unsigned OpNum, raw_ostream &O);
};
} // end namespace llvm
OpenPOWER on IntegriCloud