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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
// Validate that we can assemble this file exactly like the platform
// assembler.
//
// RUN: llvm-mc -filetype=obj -triple i386-apple-darwin10 -o %t.mc.o %s
// RUN: as -arch i386 -o %t.as.o %s
// RUN: diff %t.mc.o %t.as.o
# 1 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
# nop
# 0x90
.align 1, 0x90
ret
# 2 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
ret
# xchg %ax,%ax
# 0x66, 0x90
.align 2, 0x90
ret
# 3 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
# nopl (%[re]ax)
# 0x0f, 0x1f, 0x00
.align 2, 0x90
ret
# 4 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
ret
ret
ret
# nopl 0(%[re]ax)
# 0x0f, 0x1f, 0x40, 0x00
.align 3, 0x90
ret
# 5 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
ret
ret
# nopl 0(%[re]ax,%[re]ax,1)
# 0x0f, 0x1f, 0x44, 0x00, 0x00
.align 3, 0x90
ret
# 6 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
ret
# nopw 0(%[re]ax,%[re]ax,1)
# 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00
.align 3, 0x90
ret
# 7 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
# nopl 0L(%[re]ax)
# 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00
.align 3, 0x90
ret
# 8 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
ret
ret
ret
ret
ret
ret
ret
# nopl 0L(%[re]ax,%[re]ax,1)
# 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00
.align 3, 0x90
ret
# 9 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
ret
ret
ret
ret
ret
ret
# nopw 0L(%[re]ax,%[re]ax,1)
# 0x66, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00
.align 4, 0x90
ret
# 10 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
ret
ret
ret
ret
ret
ret
# nopw %cs:0L(%[re]ax,%[re]ax,1)
# 0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00
.align 4, 0x90
ret
# 11 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
ret
ret
ret
ret
# nopw %cs:0L(%[re]ax,%[re]ax,1)
# 0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00
.align 4, 0x90
ret
# 12 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
ret
ret
ret
# nopw 0(%[re]ax,%[re]ax,1)
# nopw 0(%[re]ax,%[re]ax,1)
# 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00,
# 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00
.align 4, 0x90
ret
# 13 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
ret
ret
# nopw 0(%[re]ax,%[re]ax,1)
# nopl 0L(%[re]ax)
# 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00,
# 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00
.align 4, 0x90
ret
# 14 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
ret
# nopl 0L(%[re]ax)
# nopl 0L(%[re]ax)
# 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00,
# 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00
.align 4, 0x90
ret
# 15 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
ret
# nopl 0L(%[re]ax)
# nopl 0L(%[re]ax,%[re]ax,1)
# 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00,
# 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00
.align 4, 0x90
ret
|