HomePhabricator

[X86] [CET] Deal with return-twice function such as vfork, setjmp when CET-IBT…

Authored by pengfei on May 21 2019, 5:50 PM.

Description

[X86] [CET] Deal with return-twice function such as vfork, setjmp when CET-IBT enabled

Return-twice functions will indirectly jump after the caller's position.
So when CET-IBT is enable, we should make sure these is endbr*
instructions follow these Return-twice function caller. Like GCC does.

Patch by Xiang Zhang (xiangzhangllvm)

Differential Revision: https://reviews.llvm.org/D61881

llvm-svn: 361342

Details