SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
|
@ -0,0 +1,35 @@
|
|||
Add retguard for arm64.
|
||||
|
||||
Index: lib/Target/AArch64/AArch64FrameLowering.cpp
|
||||
--- lib/Target/AArch64/AArch64FrameLowering.cpp.orig
|
||||
+++ lib/Target/AArch64/AArch64FrameLowering.cpp
|
||||
@@ -123,6 +123,7 @@
|
||||
#include "AArch64InstrInfo.h"
|
||||
#include "AArch64MachineFunctionInfo.h"
|
||||
#include "AArch64RegisterInfo.h"
|
||||
+#include "AArch64ReturnProtectorLowering.h"
|
||||
#include "AArch64Subtarget.h"
|
||||
#include "AArch64TargetMachine.h"
|
||||
#include "MCTargetDesc/AArch64AddressingModes.h"
|
||||
@@ -2753,6 +2754,10 @@ void AArch64FrameLowering::determineCalleeSaves(Machin
|
||||
? RegInfo->getBaseRegister()
|
||||
: (unsigned)AArch64::NoRegister;
|
||||
|
||||
+ if (MFI.hasReturnProtectorRegister() && MFI.getReturnProtectorNeedsStore()) {
|
||||
+ SavedRegs.set(MFI.getReturnProtectorRegister());
|
||||
+ }
|
||||
+
|
||||
unsigned ExtraCSSpill = 0;
|
||||
// Figure out which callee-saved registers to save/restore.
|
||||
for (unsigned i = 0; CSRegs[i]; ++i) {
|
||||
@@ -3532,6 +3537,10 @@ unsigned AArch64FrameLowering::getWinEHFuncletFrameSiz
|
||||
// This is the amount of stack a funclet needs to allocate.
|
||||
return alignTo(CSSize + MF.getFrameInfo().getMaxCallFrameSize(),
|
||||
getStackAlign());
|
||||
+}
|
||||
+
|
||||
+const ReturnProtectorLowering *AArch64FrameLowering::getReturnProtector() const {
|
||||
+ return &RPL;
|
||||
}
|
||||
|
||||
namespace {
|
Loading…
Add table
Add a link
Reference in a new issue