[PATCH] D72225: Align branches within 32-Byte boundary(Prefix padding)

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 01:23:19 PST 2020


skan added a comment.

In D72225#1818849 <https://reviews.llvm.org/D72225#1818849>, @skan wrote:

> In D72225#1818812 <https://reviews.llvm.org/D72225#1818812>, @MaskRay wrote:
>
> > I still suggest we ship something safer. If you think D72463 <https://reviews.llvm.org/D72463> is acceptable, I can delete line 2022 (`AlignBranchPrefixSize = 5;`), and we can ship just NOP padding for clang 10.0. 
> >  https://lists.llvm.org/pipermail/llvm-dev/2019-December/137610.html NOP padding only has smaller code size increase and is good enough for the mitigation purposes.
>


If you think NOP padding is safer. I suggest we can make the general option `-mbranches-within-32B-boundaries` equivalent to `-malign-branch=fused,jcc,jmp -malign-branch-boundary=32 -malign-branch-prefix-size=0`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72225/new/

https://reviews.llvm.org/D72225





More information about the llvm-commits mailing list