diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-11-06 22:19:43 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-11-06 22:19:43 +0000 |
commit | b884a8ee44f3108b37be64da62baf83362c77bc4 (patch) | |
tree | 5c2f19d8008e826d5efe46269a023fca5a10447b /llvm/lib | |
parent | d6746d5b46acdc9e5bfa1077ac3b11d9cd59c669 (diff) | |
download | bcm5719-llvm-b884a8ee44f3108b37be64da62baf83362c77bc4.tar.gz bcm5719-llvm-b884a8ee44f3108b37be64da62baf83362c77bc4.zip |
Return the base register of a register list for the "getReg()" method. This is
to satisfy the ClassifyOperand method of the Asm matcher without having to add a
RegList type to every back-end.
llvm-svn: 118360
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 71191f7cf41..1744899a29b 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -129,7 +129,7 @@ class ARMOperand : public MCParsedAsmOperand { bool Writeback; } Reg; - struct { + struct { unsigned RegStart; unsigned Number; } RegList; @@ -198,8 +198,13 @@ public: } unsigned getReg() const { - assert(Kind == Register && "Invalid access!"); - return Reg.RegNum; + assert((Kind == Register || Kind == RegisterList) && "Invalid access!"); + unsigned RegNum = 0; + if (Kind == Register) + RegNum = Reg.RegNum; + else + RegNum = RegList.RegStart; + return RegNum; } std::pair<unsigned, unsigned> getRegList() const { |