summaryrefslogtreecommitdiff
path: root/lib/Target/MSP430/MSP430InstrInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/MSP430/MSP430InstrInfo.h')
-rw-r--r--lib/Target/MSP430/MSP430InstrInfo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/MSP430/MSP430InstrInfo.h b/lib/Target/MSP430/MSP430InstrInfo.h
index e3259bd6a7bc0..d81f17e753c5a 100644
--- a/lib/Target/MSP430/MSP430InstrInfo.h
+++ b/lib/Target/MSP430/MSP430InstrInfo.h
@@ -85,6 +85,12 @@ public:
MachineBasicBlock *FBB, ArrayRef<MachineOperand> Cond,
const DebugLoc &DL,
int *BytesAdded = nullptr) const override;
+
+ int64_t getFramePoppedByCallee(const MachineInstr &I) const {
+ assert(isFrameInstr(I) && "Not a frame instruction");
+ assert(I.getOperand(1).getImm() >= 0 && "Size must not be negative");
+ return I.getOperand(1).getImm();
+ }
};
}