Adding X86-specific code padding (the X86MCCodePadder class) that will utilize the previously introduced code padding infrastructure.
The Intel optimization reference manual states that:
When executing code from the legacy decode pipeline, direct branches that are mostly taken should have all their instruction bytes in a 16B aligned chunk of memory and nearer the end of that 16B aligned chunk.
(Rule 12 under section 3.4.1.5 "Code Alignment").
In this patch a new policy is introduced, which implements this rule by inserting MCPaddingFragments before branches and branch targets and returning positive penalty weight for 16 Byte windows that contain the said situation.