35 lines
1.1 KiB
Text
35 lines
1.1 KiB
Text
Add retguard for octeon/mips64.
|
|
|
|
Index: lib/Target/Mips/MipsFrameLowering.h
|
|
--- lib/Target/Mips/MipsFrameLowering.h.orig
|
|
+++ lib/Target/Mips/MipsFrameLowering.h
|
|
@@ -14,6 +14,7 @@
|
|
#define LLVM_LIB_TARGET_MIPS_MIPSFRAMELOWERING_H
|
|
|
|
#include "Mips.h"
|
|
+#include "MipsReturnProtectorLowering.h"
|
|
#include "llvm/CodeGen/TargetFrameLowering.h"
|
|
|
|
namespace llvm {
|
|
@@ -24,8 +25,11 @@ class MipsFrameLowering : public TargetFrameLowering {
|
|
const MipsSubtarget &STI;
|
|
|
|
public:
|
|
+
|
|
+ const MipsReturnProtectorLowering RPL;
|
|
+
|
|
explicit MipsFrameLowering(const MipsSubtarget &sti, Align Alignment)
|
|
- : TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti) {
|
|
+ : TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti), RPL() {
|
|
}
|
|
|
|
static const MipsFrameLowering *create(const MipsSubtarget &ST);
|
|
@@ -39,6 +43,8 @@ class MipsFrameLowering : public TargetFrameLowering {
|
|
bool enableShrinkWrapping(const MachineFunction &MF) const override {
|
|
return true;
|
|
}
|
|
+
|
|
+ const ReturnProtectorLowering *getReturnProtector() const override;
|
|
|
|
MachineBasicBlock::iterator
|
|
eliminateCallFramePseudoInstr(MachineFunction &MF,
|