aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-06-30 23:20:32 +0000
committerBill Wendling <isanbard@gmail.com>2011-06-30 23:20:32 +0000
commit5cd2791513919ee7504c309151321e4e37a05a58 (patch)
tree37aca1d35544aca55ac7f72ea6bda6d79806a48a /include
parent15e96be3c70ab2e4a50c505c2b90e4ce1095dbd6 (diff)
downloadexternal_llvm-5cd2791513919ee7504c309151321e4e37a05a58.zip
external_llvm-5cd2791513919ee7504c309151321e4e37a05a58.tar.gz
external_llvm-5cd2791513919ee7504c309151321e4e37a05a58.tar.bz2
Add target a target hook to get the register number used by the compact unwind
encoding for the registers it knows about. Return -1 if it can't handle that register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetAsmInfo.h4
-rw-r--r--include/llvm/Target/TargetRegisterInfo.h6
2 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h
index abaed81..1a417a1 100644
--- a/include/llvm/Target/TargetAsmInfo.h
+++ b/include/llvm/Target/TargetAsmInfo.h
@@ -106,6 +106,10 @@ public:
int getSEHRegNum(unsigned RegNum) const {
return TRI->getSEHRegNum(RegNum);
}
+
+ int getCompactUnwindRegNum(unsigned RegNum) const {
+ return TRI->getCompactUnwindRegNum(RegNum);
+ }
};
}
diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h
index 2965b1d..3f28f6c 100644
--- a/include/llvm/Target/TargetRegisterInfo.h
+++ b/include/llvm/Target/TargetRegisterInfo.h
@@ -720,6 +720,12 @@ public:
virtual int getSEHRegNum(unsigned i) const {
return i;
}
+
+ /// 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 {
+ return -1;
+ }
};