1 ## Check that BOLT preserves NOP instructions of different sizes correctly.
3 # REQUIRES: system-linux
5 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o
6 # RUN: ld.lld %t.o -o %t.exe -q
7 # RUN: llvm-bolt %t.exe -o %t.bolt.exe --keep-nops --relocs --print-finalized \
8 # RUN: |& FileCheck --check-prefix=CHECK-BOLT %s
9 # RUN: llvm-objdump -d %t.bolt.exe | FileCheck %s
13 .type _start,@function
35 # CHECK-NEXT: 0f 1f 00
36 # CHECK-NEXT: 0f 1f 40 00
37 # CHECK-NEXT: 0f 1f 44 00 00
38 # CHECK-NEXT: 66 0f 1f 44 00 00
39 # CHECK-NEXT: 0f 1f 80 00 00 00 00
40 # CHECK-NEXT: 0f 1f 84 00 00 00 00 00
41 # CHECK-NEXT: 66 0f 1f 84 00 00 00 00 00
42 # CHECK-NEXT: 66 2e 0f 1f 84 00 00 00 00 00
43 # CHECK-NEXT: 66 66 2e 0f 1f 84 00 00 00 00 00
44 # CHECK-NEXT: 66 66 66 2e 0f 1f 84 00 00 00 00 00
45 # CHECK-NEXT: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00
46 # CHECK-NEXT: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00
47 # CHECK-NEXT: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00
50 # CHECK-BOLT-NEXT: Size: 2
51 # CHECK-BOLT-NEXT: Size: 3
52 # CHECK-BOLT-NEXT: Size: 4
53 # CHECK-BOLT-NEXT: Size: 5
54 # CHECK-BOLT-NEXT: Size: 6
55 # CHECK-BOLT-NEXT: Size: 7
56 # CHECK-BOLT-NEXT: Size: 8
57 # CHECK-BOLT-NEXT: Size: 9
58 # CHECK-BOLT-NEXT: Size: 10
59 # CHECK-BOLT-NEXT: Size: 11
60 # CHECK-BOLT-NEXT: Size: 12
61 # CHECK-BOLT-NEXT: Size: 13
62 # CHECK-BOLT-NEXT: Size: 14
63 # CHECK-BOLT-NEXT: Size: 15
65 # Needed for relocation mode.
66 .reloc 0, R_X86_64_NONE
68 .size _start, .-_start