[llvm-commits] [llvm] r118360 - /llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Bill Wendling
isanbard at gmail.com
Sat Nov 6 15:19:44 PDT 2010
Author: void
Date: Sat Nov 6 17:19:43 2010
New Revision: 118360
URL: http://llvm.org/viewvc/llvm-project?rev=118360&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=118360&r1=118359&r2=118360&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Sat Nov 6 17:19:43 2010
@@ -129,7 +129,7 @@
bool Writeback;
} Reg;
- struct {
+ struct {
unsigned RegStart;
unsigned Number;
} RegList;
@@ -198,8 +198,13 @@
}
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 {
More information about the llvm-commits
mailing list