[PATCH] D40622: XOR the frame pointer with the stack cookie when protecting the stack

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 17:33:19 PST 2017


rnk requested review of this revision.
rnk added a comment.

I had a possible idea for making this work. I thought about creating a virtual register that will ultimately be assigned to the frame register, which is calculated at the time of freezeReservedRegs. I prototyped something, but this virtual register breaks a lot of rules because it has no instructions that define it.

@MatzeB, does this seem like a good idea? It has the advantage that we'll go through instruction selection with a normal register, and then we'll rewrite it in the normal course of register allocation.

Alternatively, I can do things the usual way and add Yet Another custom pseudo-instruction that is X86-specific and we'll have to do this all over again when someone wants this on ARM.


https://reviews.llvm.org/D40622





More information about the llvm-commits mailing list