[PATCH] D53653: [Spectre] Fix MIR verifier errors in retpoline thunks

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 11:00:29 PDT 2018


rnk added a comment.

In https://reviews.llvm.org/D53653#1274634, @efriedma wrote:

> > The main challenge here is that X86InstrInfo::AnalyzeBranch doesn't understand the way we're using a CALL instruction as a branch
>
> This seems like something which could be fixed directly by adding a pseudo-instruction to represent the "call". For example, on Thumb1, we have tBfar.  But maybe it's not worth fixing if the only place it would be used is inside retpoline thunks.


I agree, it's not worth a pseudo. We're generating this MIR as late as possible, and honestly if we could generate MC instead, I would. The semantics of this are only explicable in raw assembly.


https://reviews.llvm.org/D53653





More information about the llvm-commits mailing list