aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2002-03-31 19:04:50 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2002-03-31 19:04:50 +0000
commita44c6c00a2ed1e6efd8d5240e34ccb5e0bb4a708 (patch)
tree65d9e1f110ef669c9c5223417f984d3faa036dc4
parentfbd216162808b6eb89b7387bf40227760bd5dd27 (diff)
Added function getCallInstIndirectAddrVal() to set call interference
for that value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2074 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/SparcV9/SparcV9Internals.h4
-rw-r--r--lib/Target/SparcV9/SparcV9RegInfo.cpp8
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/Target/SparcV9/SparcV9Internals.h b/lib/Target/SparcV9/SparcV9Internals.h
index 1de5496cbf..7f836c7a20 100644
--- a/lib/Target/SparcV9/SparcV9Internals.h
+++ b/lib/Target/SparcV9/SparcV9Internals.h
@@ -415,9 +415,11 @@ public:
}
- // To obtain the return value contained in a CALL machine instruction
+ // To obtain the return value and the indirect call address (if any)
+ // contained in a CALL machine instruction
//
const Value * getCallInstRetVal(const MachineInstr *CallMI) const;
+ const Value * getCallInstIndirectAddrVal(const MachineInstr *CallMI) const;
// The following methods are used to generate "copy" machine instructions
diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp
index 9a3c7bd0b5..434816e0a6 100644
--- a/lib/Target/SparcV9/SparcV9RegInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp
@@ -93,6 +93,7 @@ unsigned UltraSparcRegInfo::getStackPointer() const {
//---------------------------------------------------------------------------
// Finds the return value of a sparc specific call instruction
//---------------------------------------------------------------------------
+
const Value *
UltraSparcRegInfo::getCallInstRetVal(const MachineInstr *CallMI) const {
unsigned OpCode = CallMI->getOpCode();
@@ -121,6 +122,13 @@ UltraSparcRegInfo::getCallInstRetVal(const MachineInstr *CallMI) const {
}
+const Value *
+UltraSparcRegInfo::getCallInstIndirectAddrVal(const MachineInstr *CallMI) const
+{
+ return (CallMI->getOpCode() == JMPLCALL)?
+ CallMI->getOperand(0).getVRegValue() : NULL;
+}
+
//---------------------------------------------------------------------------
// Finds the return address of a call sparc specific call instruction