llvm.org GIT mirror llvm / 486dd90
Constify getCompactUnwindRegNum. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134527 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 9 years ago
4 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
106106 return TRI->getSEHRegNum(RegNum);
107107 }
108108
109 int getCompactUnwindRegNum(unsigned RegNum) const {
110 return TRI->getCompactUnwindRegNum(RegNum);
109 int getCompactUnwindRegNum(unsigned RegNum, bool isEH) const {
110 return TRI->getCompactUnwindRegNum(RegNum, isEH);
111111 }
112112 };
113113
722722
723723 /// getCompactUnwindRegNum - This function maps the register to the number for
724724 /// compact unwind encoding. Return -1 if the register isn't valid.
725 virtual int getCompactUnwindRegNum(unsigned) const {
725 virtual int getCompactUnwindRegNum(unsigned, bool) const {
726726 return -1;
727727 }
728728 };
106106
107107 /// getCompactUnwindRegNum - This function maps the register to the number for
108108 /// compact unwind encoding. Return -1 if the register isn't valid.
109 int X86RegisterInfo::getCompactUnwindRegNum(unsigned RegNum) const {
110 switch (RegNum) {
109 int X86RegisterInfo::getCompactUnwindRegNum(unsigned RegNum, bool isEH) const {
110 switch (getLLVMRegNum(RegNum, isEH)) {
111111 case X86::EBX: case X86::RBX: return 1;
112112 case X86::ECX: case X86::R12: return 2;
113113 case X86::EDX: case X86::R13: return 3;
8282
8383 /// getCompactUnwindRegNum - This function maps the register to the number for
8484 /// compact unwind encoding. Return -1 if the register isn't valid.
85 int getCompactUnwindRegNum(unsigned RegNum) const;
85 int getCompactUnwindRegNum(unsigned RegNum, bool isEH) const;
8686
8787 /// Code Generation virtual methods...
8888 ///