[MC] Align fragments when -mc-relax-all flag is used
authorPetr Hosek <phosek@chromium.org>
Sat, 27 Jun 2015 01:49:53 +0000 (01:49 +0000)
committerPetr Hosek <phosek@chromium.org>
Sat, 27 Jun 2015 01:49:53 +0000 (01:49 +0000)
commit0aaf3287e31c19efba5a1ab592db0446950e3c0a
treef3c71713189e217720bb3cd3a59df42ccafaf478
parent1f0cde9fd77edee1b8bb339bdaf1839770857c58
[MC] Align fragments when -mc-relax-all flag is used

Summary:
Ensure that fragments are bundle aligned when instruction bundling
is enabled and the -mc-relax-all flag is set. This is implicitly
assumed by the bundle padding implementation but this assumption
does not hold when custom alignment is being used.

The change was tested by running PNaCl toolchain trybots with
-mc-relax-all flag set.

Fixes https://code.google.com/p/nativeclient/issues/detail?id=4063

Test Plan: Regression test attached

Reviewers: mseaborn

Subscribers: jfb, llvm-commits

Differential Revision: http://reviews.llvm.org/D10044

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240869 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCAssembler.cpp
test/MC/X86/AlignedBundling/misaligned-bundle-group.s [new file with mode: 0644]
test/MC/X86/AlignedBundling/misaligned-bundle.s [new file with mode: 0644]