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

Side by Side Diff: test/MC/X86/AlignedBundling/nacl-call-auto-align-to-end.s

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 9 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/bundle_straddle_prefix_inst.s ('k') | test/MC/X86/elf-note-nacl.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # RUN: llvm-mc -filetype=obj -triple i686-unknown-nacl %s -o - \
2 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck %s
3
4 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-nacl \
5 # RUN: -sfi-hide-sandbox-base=false %s -o - \
6 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck %s
7
8 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-nacl \
9 # RUN: -sfi-hide-sandbox-base=true %s -o - \
10 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - \
11 # RUN: | FileCheck --check-prefix=HIDE %s
12
13 # Test that bare call instructions in NaCl are automatically aligned to the end
14 # of a bundle without the need for .bundle_align directives, to match gas's
15 # behavior.
16 .text
17 foo:
18 # Each of these mov instructions is 4 bytes long.
19 movsd %xmm1,%xmm2
20 movsd %xmm1,%xmm2
21 movsd %xmm1,%xmm2
22 movsd %xmm1,%xmm2
23 # Each of these movs is 5 bytes long.
24 movl $1, %eax
25 movl $1, %eax
26 call bar
27 # To align this call to a bundle end, we need a 1-byte NOP.
28 # CHECK: 1a: nop
29 # CHECK-NEXT: 1b: call
30
31 movsd %xmm1,%xmm2
32 movsd %xmm1,%xmm2
33 movsd %xmm1,%xmm2
34 movsd %xmm1,%xmm2
35 movl $1, %eax
36 movl $1, %eax
37 movl $1, %eax
38 call bar
39 # Here we have to pad until the end of the *next* boundary because
40 # otherwise the call crosses a boundary.
41 # The last byte of the bundle has to be a 1-byte nop so it doesn't
42 # cross the boundary itself.
43 # CHECK: 3f: nop
44 # The remaining nops can be implemented any way the compiler wants.
45 # CHECK: 5b: call
46
47 # HIDE-NOT: call
OLDNEW
« no previous file with comments | « test/MC/X86/AlignedBundling/bundle_straddle_prefix_inst.s ('k') | test/MC/X86/elf-note-nacl.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698