This patch is an enhanced version of D70157.
When -x86-align-branch-prefix-size is 0 (default 0), it use NOP padding.
When -x86-align-branch-prefix-size is 1~5, it use Prefix padding.
The prefix padding strategy:
- First we try to add segment prefixes to instructions before a branch.
- If there is no sufficient room to add segment prefixes, NOP will be inserted before a branch.
You can keep EmitNops above. The first 2 bytes of MCBoundaryAlignFragment and the tail of MCFragment shared the same word.