mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
0b66377b09
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 llvm-svn: 240869
32 lines
1.2 KiB
ArmAsm
32 lines
1.2 KiB
ArmAsm
# RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - \
|
|
# RUN: | llvm-objdump -disassemble -no-show-raw-insn - \
|
|
# RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK-OPT %s
|
|
# RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu -mc-relax-all %s -o - \
|
|
# RUN: | llvm-objdump -disassemble -no-show-raw-insn - \
|
|
# RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK-RELAX %s
|
|
|
|
.text
|
|
foo:
|
|
.bundle_align_mode 5
|
|
push %ebp # 1 byte
|
|
.align 16
|
|
# CHECK: 1: nopw %cs:(%eax,%eax)
|
|
# CHECK-RELAX: 10: nopw %cs:(%eax,%eax)
|
|
# CHECK-RELAX: 1f: nop
|
|
# CHECK-OPT: 10: movl $1, (%esp)
|
|
# CHECK-RELAX: 20: movl $1, (%esp)
|
|
movl $0x1, (%esp) # 7 bytes
|
|
movl $0x1, (%esp) # 7 bytes
|
|
# CHECK-OPT: 1e: nop
|
|
movl $0x2, 0x1(%esp) # 8 bytes
|
|
movl $0x2, 0x1(%esp) # 8 bytes
|
|
# CHECK-RELAX: 3e: nop
|
|
# CHECK-RELAX: 40: movl $2, 1(%esp)
|
|
movl $0x2, 0x1(%esp) # 8 bytes
|
|
movl $0x2, (%esp) # 7 bytes
|
|
# CHECK-OPT: 3f: nop
|
|
# CHECK-OPT: 40: movl $3, (%esp)
|
|
movl $0x3, (%esp) # 7 bytes
|
|
movl $0x3, (%esp) # 7 bytes
|
|
ret
|