1# RUN: llvm-mc -filetype=obj -arch=x86 -triple=x86_64-pc-linux-gnu -mcpu=pentiumpro %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP10
2# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu %s -mcpu=pentiumpro | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP10
3# RUN: llvm-mc -filetype=obj -arch=x86 -triple=x86_64-apple-darwin10.0 -mcpu=pentiumpro %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP10
4# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-apple-darwin8 -mcpu=pentiumpro %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP10
5# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=slm %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=LNOP7 %s
6# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=silvermont %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=LNOP7 %s
7# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=lakemont %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=NOP1 %s
8# RUN: llvm-mc -filetype=obj -arch=x86 -triple=x86_64-pc-linux-gnu -mcpu=bdver1 %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP11
9# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu %s -mcpu=bdver1 | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP11
10# RUN: llvm-mc -filetype=obj -arch=x86 -triple=x86_64-pc-linux-gnu -mcpu=btver1 %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP15
11# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu %s -mcpu=btver1 | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP15
12# RUN: llvm-mc -filetype=obj -arch=x86 -triple=x86_64-pc-linux-gnu -mcpu=btver2 %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP15
13# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu %s -mcpu=btver2 | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP15
14# RUN: llvm-mc -filetype=obj -arch=x86 -triple=x86_64-pc-linux-gnu -mcpu=znver1 %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP15
15# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu %s -mcpu=znver1 | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP15
16# RUN: llvm-mc -filetype=obj -arch=x86 -triple=x86_64-pc-linux-gnu -mcpu=znver2 %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP15
17# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu %s -mcpu=znver2 | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefix=LNOP15
18# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=nehalem %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=LNOP10 %s
19# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=westmere %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=LNOP10 %s
20# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=sandybridge %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=LNOP15 %s
21# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=ivybridge %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=LNOP15 %s
22# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=haswell %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=LNOP15 %s
23# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=broadwell %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=LNOP15 %s
24# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=skylake %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=LNOP15 %s
25# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=skx %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=LNOP15 %s
26# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=knl %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=LNOP10 %s
27# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=knm %s | llvm-objdump -d --no-show-raw-insn - | FileCheck --check-prefix=LNOP10 %s
28
29# Ensure alignment directives also emit sequences of 10, 11 and 15-byte NOPs on processors
30# capable of using long NOPs.
31inc %eax
32.p2align 5
33inc %eax
34# LNOP15: 0:  inc
35# LNOP15-NEXT: 1:  nop
36# LNOP15-NEXT: 10: nop
37# LNOP15-NEXT: 1f: nop
38# LNOP15-NEXT: 20: inc
39
40# LNOP11: 0:  inc
41# LNOP11-NEXT: 1:  nop
42# LNOP11-NEXT: c:  nop
43# LNOP11-NEXT: 17: nop
44# LNOP11-NEXT: 20: inc
45
46# LNOP10: 0:  inc
47# LNOP10-NEXT: 1:  nop
48# LNOP10-NEXT: b:  nop
49# LNOP10-NEXT: 15: nop
50# LNOP10-NEXT: 1f: nop
51# LNOP10-NEXT: 20: inc
52
53# On Silvermont we emit only 7 byte NOPs since longer NOPs are not profitable.
54# LNOP7: 0:  inc
55# LNOP7-NEXT: 1:  nop
56# LNOP7-NEXT: 8:  nop
57# LNOP7-NEXT: f:  nop
58# LNOP7-NEXT: 16: nop
59# LNOP7-NEXT: 1d: nop
60# LNOP7-NEXT: 20: inc
61
62# On Lakemont we emit only 1 byte NOPs since longer NOPs are not supported/legal
63# NOP1: 0:  inc
64# NOP1-NEXT: 1:  nop
65# NOP1-NEXT: 2:  nop
66# NOP1-NEXT: 3:  nop
67# NOP1-NEXT: 4:  nop
68# NOP1-NEXT: 5:  nop
69# NOP1-NEXT: 6:  nop
70# .......
71# NOP1: 17:  nop
72# NOP1-NEXT: 18:  nop
73# NOP1-NEXT: 19:  nop
74# NOP1-NEXT: 1a:  nop
75# NOP1-NEXT: 1b:  nop
76# NOP1-NEXT: 1c:  nop
77# NOP1-NEXT: 1d:  nop
78# NOP1-NEXT: 1e:  nop
79# NOP1-NEXT: 1f:  nop
80# NOP1-NEXT: 20:  inc
81