Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: test/MC/X86/AlignedBundling/long-nop-pad.s

Issue 1133723005: Cherry-pick r234714: [MC] Write padding into fragments when -mc-relax-all flag is used (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/MC/X86/AlignedBundling/labeloffset.s ('k') | test/MC/X86/AlignedBundling/nesting.s » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \ 1 # RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
2 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck %s 2 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck %s
3 # RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu -mc-relax-all %s -o - \
4 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck %s
3 5
4 # Test that long nops are generated for padding where possible. 6 # Test that long nops are generated for padding where possible.
5 7
6 .text 8 .text
7 foo: 9 foo:
8 .bundle_align_mode 5 10 .bundle_align_mode 5
9 11
10 # This callq instruction is 5 bytes long 12 # This callq instruction is 5 bytes long
11 .bundle_lock align_to_end 13 .bundle_lock align_to_end
12 callq bar 14 callq bar
13 .bundle_unlock 15 .bundle_unlock
14 # To align this group to a bundle end, we need a 15-byte NOP and a 12-byte NOP. 16 # To align this group to a bundle end, we need a 15-byte NOP and a 12-byte NOP.
15 # CHECK: 0: nop 17 # CHECK: 0: nop
16 # CHECK-NEXT: f: nop 18 # CHECK-NEXT: f: nop
17 # CHECK: 1b: callq 19 # CHECK: 1b: callq
18 20
19 # This push instruction is 1 byte long 21 # This push instruction is 1 byte long
20 .bundle_lock align_to_end 22 .bundle_lock align_to_end
21 push %rax 23 push %rax
22 .bundle_unlock 24 .bundle_unlock
23 # To align this group to a bundle end, we need two 15-byte NOPs, and a 1-byte. 25 # To align this group to a bundle end, we need two 15-byte NOPs, and a 1-byte.
24 # CHECK: 20: nop 26 # CHECK: 20: nop
25 # CHECK-NEXT: 2f: nop 27 # CHECK-NEXT: 2f: nop
26 # CHECK-NEXT: 3e: nop 28 # CHECK-NEXT: 3e: nop
27 # CHECK-NEXT: 3f: pushq 29 # CHECK-NEXT: 3f: pushq
OLDNEW
« no previous file with comments | « test/MC/X86/AlignedBundling/labeloffset.s ('k') | test/MC/X86/AlignedBundling/nesting.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698