Added function getCallInstIndirectAddrVal() to set call interference
authorVikram S. Adve <vadve@cs.uiuc.edu>
Sun, 31 Mar 2002 19:04:50 +0000 (19:04 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Sun, 31 Mar 2002 19:04:50 +0000 (19:04 +0000)
for that value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2074 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/SparcV9Internals.h
lib/Target/SparcV9/SparcV9RegInfo.cpp

index 1de5496cbfe464fb57b85e91cb9b89d3ce28814d..7f836c7a20f13265cb7d085e57a71b29f0984291 100644 (file)
@@ -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
index 9a3c7bd0b5f3be910b3b69c0133327859feb3c44..434816e0a6b023cbcd01549ca603f62dffd19347 100644 (file)
@@ -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