aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-08-04 22:07:50 +0000
committerDevang Patel <dpatel@apple.com>2010-08-04 22:07:50 +0000
commit40e0bad33193112eab0cc40a556ed347e6568cfe (patch)
tree158beed7b508d387c4aa1a1f0efba9223c8d49a6 /lib/Target/PowerPC
parent5573a7da298e68db9e63307b766dd650f044287e (diff)
downloadexternal_llvm-40e0bad33193112eab0cc40a556ed347e6568cfe.zip
external_llvm-40e0bad33193112eab0cc40a556ed347e6568cfe.tar.gz
external_llvm-40e0bad33193112eab0cc40a556ed347e6568cfe.tar.bz2
Implement target specific getDebugValueLocation().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r--lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
index e35dc57..c1a5663 100644
--- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
@@ -43,6 +43,7 @@
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetRegistry.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
@@ -327,6 +328,19 @@ namespace {
void printPredicateOperand(const MachineInstr *MI, unsigned OpNo,
raw_ostream &O, const char *Modifier);
+
+ MachineLocation getDebugValueLocation(const MachineInstr *MI) const {
+
+ MachineLocation Location;
+ assert (MI->getNumOperands() == 4 && "Invalid no. of machine operands!");
+ // Frame address. Currently handles register +- offset only.
+ if (MI->getOperand(0).isReg() && MI->getOperand(2).isImm())
+ Location.set(MI->getOperand(0).getReg(), MI->getOperand(2).getImm());
+ else {
+ DEBUG(dbgs() << "DBG_VALUE instruction ignored! " << *MI << "\n");
+ }
+ return Location;
+ }
};
/// PPCLinuxAsmPrinter - PowerPC assembly printer, customized for Linux