aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-03-05 21:43:40 +0000
committerJim Grosbach <grosbach@apple.com>2012-03-05 21:43:40 +0000
commitc3384c93c0e4c50da4ad093f08997507f9281c75 (patch)
tree6737a40a4d079b62f77a3c9f2fd35caf0e8bd016 /lib/Target/ARM/AsmParser/ARMAsmParser.cpp
parentaf9f4bc752292b3282f110c11aeb2a1ffb710bbf (diff)
ARM Refactor VLD/VST spaced pair instructions.
Use the new composite physical registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152063 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index b3e7e45b8c..2045482156 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -1106,6 +1106,12 @@ public:
return VectorList.Count == 2;
}
+ bool isVecListDPairSpaced() const {
+ if (!isSingleSpacedVectorList()) return false;
+ return (ARMMCRegisterClasses[ARM::DPairSpcRegClassID]
+ .contains(VectorList.RegNum));
+ }
+
bool isVecListThreeQ() const {
if (!isDoubleSpacedVectorList()) return false;
return VectorList.Count == 3;
@@ -2974,9 +2980,6 @@ parseVectorList(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
switch (LaneKind) {
case NoLanes:
E = Parser.getTok().getLoc();
- // VLD1 wants a DPair register.
- // FIXME: Make the rest of the two-reg instructions want the same
- // thing.
Reg = MRI->getMatchingSuperReg(Reg, ARM::dsub_0,
&ARMMCRegisterClasses[ARM::DPairRegClassID]);
@@ -3149,13 +3152,14 @@ parseVectorList(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
switch (LaneKind) {
case NoLanes:
- if (Count == 2 && Spacing == 1)
- // VLD1 wants a DPair register.
- // FIXME: Make the rest of the two-reg instructions want the same
- // thing.
- FirstReg = MRI->getMatchingSuperReg(FirstReg, ARM::dsub_0,
- &ARMMCRegisterClasses[ARM::DPairRegClassID]);
-
+ // Non-lane two-register operands have been converted to the
+ // composite register classes.
+ if (Count == 2) {
+ const MCRegisterClass *RC = (Spacing == 1) ?
+ &ARMMCRegisterClasses[ARM::DPairRegClassID] :
+ &ARMMCRegisterClasses[ARM::DPairSpcRegClassID];
+ FirstReg = MRI->getMatchingSuperReg(FirstReg, ARM::dsub_0, RC);
+ }
Operands.push_back(ARMOperand::CreateVectorList(FirstReg, Count,
(Spacing == 2), S, E));