svn commit: r222989 -
projects/llvm-ia64/contrib/llvm/lib/Target/IA64
Marcel Moolenaar
marcel at FreeBSD.org
Sat Jun 11 17:23:51 UTC 2011
Author: marcel
Date: Sat Jun 11 17:23:51 2011
New Revision: 222989
URL: http://svn.freebsd.org/changeset/base/222989
Log:
Implement IA64RegisterInfo::getReservedRegs()
Modified:
projects/llvm-ia64/contrib/llvm/lib/Target/IA64/IA64.td
projects/llvm-ia64/contrib/llvm/lib/Target/IA64/IA64RegisterInfo.cpp
Modified: projects/llvm-ia64/contrib/llvm/lib/Target/IA64/IA64.td
==============================================================================
--- projects/llvm-ia64/contrib/llvm/lib/Target/IA64/IA64.td Sat Jun 11 16:44:30 2011 (r222988)
+++ projects/llvm-ia64/contrib/llvm/lib/Target/IA64/IA64.td Sat Jun 11 17:23:51 2011 (r222989)
@@ -34,6 +34,9 @@ def F1 : IA64Register<"f1">;
def P0 : IA64Register<"p0">;
def R0 : IA64Register<"r0">;
+def R1 : IA64Register<"r1">;
+def R12 : IA64Register<"r12">;
+def R13 : IA64Register<"r13">;
//
// Register classes
@@ -43,7 +46,7 @@ class IA64RegisterClass<list<ValueType>
}
def FloatingPoint : IA64RegisterClass<[f128], 128, [F0, F1]>;
-def General : IA64RegisterClass<[i64], 64, [R0]>;
+def General : IA64RegisterClass<[i64], 64, [R0, R1, R12, R13]>;
def Predicate : IA64RegisterClass<[i1], 0, [P0]>;
//
Modified: projects/llvm-ia64/contrib/llvm/lib/Target/IA64/IA64RegisterInfo.cpp
==============================================================================
--- projects/llvm-ia64/contrib/llvm/lib/Target/IA64/IA64RegisterInfo.cpp Sat Jun 11 16:44:30 2011 (r222988)
+++ projects/llvm-ia64/contrib/llvm/lib/Target/IA64/IA64RegisterInfo.cpp Sat Jun 11 17:23:51 2011 (r222989)
@@ -32,7 +32,19 @@ IA64RegisterInfo::getCalleeSavedRegs(con
BitVector
IA64RegisterInfo::getReservedRegs(const MachineFunction &MF) const
{
- llvm_unreachable(__func__);
+ BitVector rsvd(getNumRegs());
+
+ rsvd.set(IA64::R0); // constant, hardwired 0
+ rsvd.set(IA64::R1); // global data pointer (aka gp)
+ rsvd.set(IA64::R12); // (memory) stack pointer (aka sp)
+ rsvd.set(IA64::R13); // thread pointer (aka tp)
+
+ rsvd.set(IA64::F0); // constant, hardwired 0.0
+ rsvd.set(IA64::F1); // constant, hardwired 1.0
+
+ rsvd.set(IA64::P0); // constant, hardwired 1 (true)
+
+ return rsvd;
}
void
More information about the svn-src-projects
mailing list