mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
054db7df5b
Summary: When instruction bundling is enabled and the -mc-relax-all flag is set, we can write bundle padding directly into fragments and avoid creating large number of fragments significantly reducing LLVM MC memory usage. Test Plan: Regression test attached Reviewers: eliben Subscribers: jfb, mseaborn Differential Revision: http://reviews.llvm.org/D8072 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234714 91177308-0d34-0410-b5e6-96231b3b80d8
49 lines
1.0 KiB
ArmAsm
49 lines
1.0 KiB
ArmAsm
# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
|
|
# RUN: | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck %s
|
|
# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu -mc-relax-all %s -o - \
|
|
# RUN: | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck %s
|
|
|
|
# Test some variations of padding for bundle-locked groups.
|
|
|
|
.text
|
|
foo:
|
|
.bundle_align_mode 4
|
|
|
|
# Each of these callq instructions is 5 bytes long
|
|
callq bar
|
|
callq bar
|
|
|
|
.bundle_lock
|
|
callq bar
|
|
callq bar
|
|
.bundle_unlock
|
|
# We'll need a 6-byte NOP before this group
|
|
# CHECK: a: nop
|
|
# CHECK-NEXT: 10: callq
|
|
# CHECK-NEXT: 15: callq
|
|
|
|
.bundle_lock
|
|
callq bar
|
|
callq bar
|
|
.bundle_unlock
|
|
# Same here
|
|
# CHECK: 1a: nop
|
|
# CHECK-NEXT: 20: callq
|
|
# CHECK-NEXT: 25: callq
|
|
|
|
.align 16, 0x90
|
|
callq bar
|
|
.bundle_lock
|
|
callq bar
|
|
callq bar
|
|
callq bar
|
|
.bundle_unlock
|
|
# And here we'll need a 11-byte NOP
|
|
# CHECK: 30: callq
|
|
# CHECK: 35: nop
|
|
# CHECK-NEXT: 40: callq
|
|
# CHECK-NEXT: 45: callq
|
|
|
|
|
|
|