summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/Thumb1InstrInfo.h
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2014-07-25 19:31:34 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2014-07-25 19:31:34 +0000
commite5b6e0d2313cdd5b906bfeaf3968ff7fdd6438db (patch)
treed1258a082055dc5b5ea479d6e2072d795a281568 /llvm/lib/Target/ARM/Thumb1InstrInfo.h
parenta74e3f0c51487108c5b8afa54b83896a81660a43 (diff)
downloadbcm5719-llvm-e5b6e0d2313cdd5b906bfeaf3968ff7fdd6438db.tar.gz
bcm5719-llvm-e5b6e0d2313cdd5b906bfeaf3968ff7fdd6438db.zip
[stack protector] Fix a potential security bug in stack protector where the
address of the stack guard was being spilled to the stack. Previously the address of the stack guard would get spilled to the stack if it was impossible to keep it in a register. This patch introduces a new target independent node and pseudo instruction which gets expanded post-RA to a sequence of instructions that load the stack guard value. Register allocator can now just remat the value when it can't keep it in a register. <rdar://problem/12475629> llvm-svn: 213967
Diffstat (limited to 'llvm/lib/Target/ARM/Thumb1InstrInfo.h')
-rw-r--r--llvm/lib/Target/ARM/Thumb1InstrInfo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/Thumb1InstrInfo.h b/llvm/lib/Target/ARM/Thumb1InstrInfo.h
index c5845b75e58..88b1c370195 100644
--- a/llvm/lib/Target/ARM/Thumb1InstrInfo.h
+++ b/llvm/lib/Target/ARM/Thumb1InstrInfo.h
@@ -54,6 +54,9 @@ public:
const TargetRegisterClass *RC,
const TargetRegisterInfo *TRI) const override;
+private:
+ void expandLoadStackGuard(MachineBasicBlock::iterator MI,
+ Reloc::Model RM) const override;
};
}
OpenPOWER on IntegriCloud