File: x86_long_nop.s

package info (click to toggle)
llvm-toolchain-6.0 1%3A6.0.1-10
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 598,080 kB
  • sloc: cpp: 3,046,253; ansic: 595,057; asm: 271,965; python: 128,926; objc: 106,554; sh: 21,906; lisp: 10,191; pascal: 6,094; ml: 5,544; perl: 5,265; makefile: 2,227; cs: 2,027; xml: 686; php: 212; csh: 117
file content (47 lines) | stat: -rw-r--r-- 1,957 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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
# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu %s -mcpu=pentiumpro | llvm-objdump -d -no-show-raw-insn - | FileCheck %s
# 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
# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-apple-darwin8 -mcpu=pentiumpro %s | llvm-objdump -d -no-show-raw-insn - | FileCheck %s
# 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
# 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
# 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

# Ensure alignment directives also emit sequences of 15-byte NOPs on processors
# capable of using long NOPs.
inc %eax
.p2align 5
inc %eax
# CHECK: 0:  inc
# CHECK-NEXT: 1:  nop
# CHECK-NEXT: 10:  nop
# CHECK-NEXT: 1f:  nop
# CHECK-NEXT: 20:  inc

# On Silvermont we emit only 7 byte NOPs since longer NOPs are not profitable.
# LNOP7: 0:  inc
# LNOP7-NEXT: 1:  nop
# LNOP7-NEXT: 8:  nop
# LNOP7-NEXT: f:  nop
# LNOP7-NEXT: 16:  nop
# LNOP7-NEXT: 1d:  nop
# LNOP7-NEXT: 20:  inc

# On Lakemont we emit only 1 byte NOPs since longer NOPs are not supported/legal
# NOP1: 0:  inc
# NOP1-NEXT: 1:  nop
# NOP1-NEXT: 2:  nop
# NOP1-NEXT: 3:  nop
# NOP1-NEXT: 4:  nop
# NOP1-NEXT: 5:  nop
# NOP1-NEXT: 6:  nop
# .......
# NOP1: 17:  nop
# NOP1-NEXT: 18:  nop
# NOP1-NEXT: 19:  nop
# NOP1-NEXT: 1a:  nop
# NOP1-NEXT: 1b:  nop
# NOP1-NEXT: 1c:  nop
# NOP1-NEXT: 1d:  nop
# NOP1-NEXT: 1e:  nop
# NOP1-NEXT: 1f:  nop
# NOP1-NEXT: 20:  inc