summaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetCallingConv.td
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-01-17 22:46:58 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-01-17 22:46:58 +0000
commitec572539dd5660f9ca42027ac04df3a3f8c0cab1 (patch)
tree5f338c468ad356a3096c0b411e471d334fb3cbda /include/llvm/Target/TargetCallingConv.td
parent97af768ccc00962a2c16e990b89c9028f8e247be (diff)
downloadllvm-ec572539dd5660f9ca42027ac04df3a3f8c0cab1.tar.gz
llvm-ec572539dd5660f9ca42027ac04df3a3f8c0cab1.tar.bz2
llvm-ec572539dd5660f9ca42027ac04df3a3f8c0cab1.tar.xz
Add TableGen support for callee saved registers.
Targets can now add CalleeSavedRegs defs to their *CallingConv.td file. TableGen will use this to create a *_SaveList array suitable for returning from getCalleeSavedRegs() as well as a *_RegMask bit mask suitable for returning from getCallPreservedMask(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetCallingConv.td')
-rw-r--r--include/llvm/Target/TargetCallingConv.td11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetCallingConv.td b/include/llvm/Target/TargetCallingConv.td
index 6da3ba13bb..a53ed29f1e 100644
--- a/include/llvm/Target/TargetCallingConv.td
+++ b/include/llvm/Target/TargetCallingConv.td
@@ -133,3 +133,14 @@ class CCDelegateTo<CallingConv cc> : CCAction {
class CallingConv<list<CCAction> actions> {
list<CCAction> Actions = actions;
}
+
+/// CalleeSavedRegs - A list of callee saved registers for a given calling
+/// convention. The order of registers is used by PrologEpilogInsertion when
+/// allocation stack slots for saved registers.
+///
+/// For each CalleeSavedRegs def, TableGen will emit a FOO_SaveList array for
+/// returning from getCalleeSavedRegs(), and a FOO_RegMask bit mask suitable for
+/// returning from getCallPreservedMask().
+class CalleeSavedRegs<dag saves> {
+ dag SaveList = saves;
+}