Deleted Added
full compact
MCRegisterInfo.cpp (245431) MCRegisterInfo.cpp (263509)
1//=== MC/MCRegisterInfo.cpp - Target Register Description -------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 32 unchanged lines hidden (view full) ---

41 // name of each sub-register in the same order as MCSubRegIterator.
42 const uint16_t *SRI = SubRegIndices + get(Reg).SubRegIndices;
43 for (MCSubRegIterator Subs(Reg, this); Subs.isValid(); ++Subs, ++SRI)
44 if (*Subs == SubReg)
45 return *SRI;
46 return 0;
47}
48
1//=== MC/MCRegisterInfo.cpp - Target Register Description -------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 32 unchanged lines hidden (view full) ---

41 // name of each sub-register in the same order as MCSubRegIterator.
42 const uint16_t *SRI = SubRegIndices + get(Reg).SubRegIndices;
43 for (MCSubRegIterator Subs(Reg, this); Subs.isValid(); ++Subs, ++SRI)
44 if (*Subs == SubReg)
45 return *SRI;
46 return 0;
47}
48
49unsigned MCRegisterInfo::getSubRegIdxSize(unsigned Idx) const {
50 assert(Idx && Idx < getNumSubRegIndices() &&
51 "This is not a subregister index");
52 return SubRegIdxRanges[Idx].Size;
53}
54
55unsigned MCRegisterInfo::getSubRegIdxOffset(unsigned Idx) const {
56 assert(Idx && Idx < getNumSubRegIndices() &&
57 "This is not a subregister index");
58 return SubRegIdxRanges[Idx].Offset;
59}
60
49int MCRegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const {
50 const DwarfLLVMRegPair *M = isEH ? EHL2DwarfRegs : L2DwarfRegs;
51 unsigned Size = isEH ? EHL2DwarfRegsSize : L2DwarfRegsSize;
52
53 DwarfLLVMRegPair Key = { RegNum, 0 };
54 const DwarfLLVMRegPair *I = std::lower_bound(M, M+Size, Key);
55 if (I == M+Size || I->FromReg != RegNum)
56 return -1;

--- 18 unchanged lines hidden ---
61int MCRegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const {
62 const DwarfLLVMRegPair *M = isEH ? EHL2DwarfRegs : L2DwarfRegs;
63 unsigned Size = isEH ? EHL2DwarfRegsSize : L2DwarfRegsSize;
64
65 DwarfLLVMRegPair Key = { RegNum, 0 };
66 const DwarfLLVMRegPair *I = std::lower_bound(M, M+Size, Key);
67 if (I == M+Size || I->FromReg != RegNum)
68 return -1;

--- 18 unchanged lines hidden ---