summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCRegisterInfo.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2013-05-31 23:45:26 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2013-05-31 23:45:26 +0000
commitb1a4d9da3b7d48c40e6abee2acc9f6324dad7f84 (patch)
tree9c40c9ccfbe5f8ef21d580220db6d0f82ec1764d /llvm/lib/MC/MCRegisterInfo.cpp
parentee9143acf503e487f62423594ce52525e28ced9f (diff)
downloadbcm5719-llvm-b1a4d9da3b7d48c40e6abee2acc9f6324dad7f84.tar.gz
bcm5719-llvm-b1a4d9da3b7d48c40e6abee2acc9f6324dad7f84.zip
Make SubRegIndex size mandatory, following r183020.
This also makes TableGen able to compute sizes/offsets of synthesized indices representing tuples. llvm-svn: 183061
Diffstat (limited to 'llvm/lib/MC/MCRegisterInfo.cpp')
-rw-r--r--llvm/lib/MC/MCRegisterInfo.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/MC/MCRegisterInfo.cpp b/llvm/lib/MC/MCRegisterInfo.cpp
index 06d6d9680dd..ce79cd5c2c6 100644
--- a/llvm/lib/MC/MCRegisterInfo.cpp
+++ b/llvm/lib/MC/MCRegisterInfo.cpp
@@ -46,17 +46,16 @@ unsigned MCRegisterInfo::getSubRegIndex(unsigned Reg, unsigned SubReg) const {
return 0;
}
-bool MCRegisterInfo::getSubRegIdxCoveredBits(unsigned Idx, unsigned &Offset,
- unsigned &Size) const {
+unsigned MCRegisterInfo::getSubRegIdxSize(unsigned Idx) const {
assert(Idx && Idx < getNumSubRegIndices() &&
"This is not a subregister index");
- // Get a pointer to the corresponding SubRegIdxRanges struct.
- const SubRegCoveredBits *Bits = &SubRegIdxRanges[Idx];
- if (Bits->Offset == (uint16_t)-1 || Bits->Size == (uint16_t)-1)
- return false;
- Offset = Bits->Offset;
- Size = Bits->Size;
- return true;
+ return SubRegIdxRanges[Idx].Size;
+}
+
+unsigned MCRegisterInfo::getSubRegIdxOffset(unsigned Idx) const {
+ assert(Idx && Idx < getNumSubRegIndices() &&
+ "This is not a subregister index");
+ return SubRegIdxRanges[Idx].Offset;
}
int MCRegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const {
OpenPOWER on IntegriCloud