diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-07-06 20:33:48 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-07-06 20:33:48 +0000 |
commit | 486dd90696545421c55346570b88fa03f6dd464f (patch) | |
tree | 213cf0b9464e945e41be43db2da65e64e737ae9f | |
parent | b262799d49891b036daa00eddf51947487346c98 (diff) |
Constify getCompactUnwindRegNum.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134527 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 4 | ||||
-rw-r--r-- | include/llvm/Target/TargetRegisterInfo.h | 2 | ||||
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 4 | ||||
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.h | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index 1a417a1159..9beff25bcf 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -107,8 +107,8 @@ public: return TRI->getSEHRegNum(RegNum); } - int getCompactUnwindRegNum(unsigned RegNum) const { - return TRI->getCompactUnwindRegNum(RegNum); + int getCompactUnwindRegNum(unsigned RegNum, bool isEH) const { + return TRI->getCompactUnwindRegNum(RegNum, isEH); } }; diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h index 3f28f6cd31..8d827f117b 100644 --- a/include/llvm/Target/TargetRegisterInfo.h +++ b/include/llvm/Target/TargetRegisterInfo.h @@ -723,7 +723,7 @@ public: /// getCompactUnwindRegNum - This function maps the register to the number for /// compact unwind encoding. Return -1 if the register isn't valid. - virtual int getCompactUnwindRegNum(unsigned) const { + virtual int getCompactUnwindRegNum(unsigned, bool) const { return -1; } }; diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index d32b8225f8..3d65faa006 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -107,8 +107,8 @@ int X86RegisterInfo::getLLVMRegNum(unsigned DwarfRegNo, bool isEH) const { /// getCompactUnwindRegNum - This function maps the register to the number for /// compact unwind encoding. Return -1 if the register isn't valid. -int X86RegisterInfo::getCompactUnwindRegNum(unsigned RegNum) const { - switch (RegNum) { +int X86RegisterInfo::getCompactUnwindRegNum(unsigned RegNum, bool isEH) const { + switch (getLLVMRegNum(RegNum, isEH)) { case X86::EBX: case X86::RBX: return 1; case X86::ECX: case X86::R12: return 2; case X86::EDX: case X86::R13: return 3; diff --git a/lib/Target/X86/X86RegisterInfo.h b/lib/Target/X86/X86RegisterInfo.h index a09c7eeed8..a12eb1297f 100644 --- a/lib/Target/X86/X86RegisterInfo.h +++ b/lib/Target/X86/X86RegisterInfo.h @@ -83,7 +83,7 @@ public: /// getCompactUnwindRegNum - This function maps the register to the number for /// compact unwind encoding. Return -1 if the register isn't valid. - int getCompactUnwindRegNum(unsigned RegNum) const; + int getCompactUnwindRegNum(unsigned RegNum, bool isEH) const; /// Code Generation virtual methods... /// |