File: x86_64.s

package info (click to toggle)
binutils 2.31.1-16
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 309,412 kB
  • sloc: ansic: 1,161,194; asm: 638,508; cpp: 128,829; exp: 68,580; makefile: 55,828; sh: 22,360; yacc: 14,238; lisp: 13,272; perl: 2,111; ada: 1,681; lex: 1,652; pascal: 1,446; cs: 879; sed: 195; python: 154; xml: 95; awk: 25
file content (309 lines) | stat: -rw-r--r-- 5,866 bytes parent folder | download | duplicates (23)
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
.text
.intel_syntax noprefix
# REX prefix and addressing modes.
add edx,ecx
add edx,r9d
add r10d,ecx
add rdx,rcx
add r10,r9
add r8d,eax
add r8w,ax
add r8,rax
add eax,0x44332211
add rax,0xfffffffff4332211
add ax,0x4433
add rax,0x44332211
add dl,cl
add bh,dh
add dil,sil
add r15b,sil
add dil,r14b
add r15b,r14b
PUSH RAX
PUSH R8
POP R9
ADD AL,0x11
ADD AH,0x11
ADD SPL,0x11
ADD R8B,0x11
ADD R12B,0x11
MOV RAX,CR0
MOV R8,CR0
MOV RAX,CR8
MOV CR8,RAX
REP MOVSQ #[RSI],[RDI]
REP MOVSW #[RSI,[RDI]
REP MOVSQ #[RSI],[RDI]
MOV AL, 0x11
MOV AH, 0x11
MOV SPL, 0x11
MOV R12B, 0x11
MOV EAX,0x11223344
MOV R8D,0x11223344
MOV RAX,0x1122334455667788
MOV R8,0x1122334455667788
add eax,[rax]
ADD EAX,[R8]
ADD R8D,[R8]
ADD RAX,[R8]
ADD EAX,[0x22222222+RIP]
ADD EAX,[RBP+0x00]
ADD EAX,FLAT:[0x22222222]
ADD EAX,[R13+0]
ADD EAX,[RAX+RAX*4]
ADD EAX,[R8+RAX*4]
ADD R8D,[R8+RAX*4]
ADD EAX,[R8+R8*4]
ADD [RCX+R8*4],R8D
ADD EDX,[RAX+RAX*8]
ADD EDX,[RAX+RCX*8]
ADD EDX,[RAX+RDX*8]
ADD EDX,[RAX+RBX*8]
ADD EDX,[RAX]
ADD EDX,[RAX+RBP*8]
ADD EDX,[RAX+RSI*8]
ADD EDX,[RAX+RDI*8]
ADD EDX,[RAX+R8*8]
ADD EDX,[RAX+R9*8]
ADD EDX,[RAX+R10*8]
ADD EDX,[RAX+R11*8]
ADD EDX,[RAX+R12*8]
ADD EDX,[RAX+R13*8]
ADD EDX,[RAX+R14*8]
ADD EDX,[RAX+R15*8]
ADD ECX,0x11
ADD DWORD PTR [RAX],0x11
ADD QWORD PTR [RAX],0x11
ADD DWORD PTR [R8],0x11
ADD DWORD PTR [RCX+RAX*4],0x11
ADD DWORD PTR [R9+RAX*4],0x11
ADD DWORD PTR [RCX+R8*4],0x11
ADD DWORD PTR [0x22222222+RIP],0x33
ADD QWORD PTR [RIP+0x22222222],0x33
ADD DWORD PTR [RIP+0x22222222],0x33333333
ADD QWORD PTR [RIP+0x22222222],0x33333333
ADD DWORD PTR [RAX*8+0x22222222],0x33
ADD DWORD PTR [RAX+0x22222222],0x33
ADD DWORD PTR [RAX+0x22222222],0x33
ADD DWORD PTR [R8+RBP*8],0x33
ADD DWORD PTR FLAT:[0x22222222],0x33		
#new instructions
MOVABS AL,FLAT:[0x8877665544332211]
MOVABS EAX,FLAT:[0x8877665544332211]
MOVABS FLAT:[0x8877665544332211],AL
MOVABS FLAT:[0x8877665544332211],EAX
MOVABS RAX,FLAT:[0x8877665544332211]
MOVABS FLAT:[0x8877665544332211],RAX
cqo
cdqe
movsx rax, eax
movsx rax, ax
movsx rax, al
bar:
.att_syntax
#testcase for symbol references.

#immediates - various sizes:

mov $symbol, %al
mov $symbol, %ax
mov $symbol, %eax
mov $symbol, %rax

#addressing modes:

#absolute 64bit addressing
movabs symbol, %eax

#absolute 32bit addressing
mov symbol, %eax

#arithmetic
mov symbol(%rax), %eax

#RIP relative
mov symbol(%rip), %eax

.intel_syntax noprefix

#immediates - various sizes:
mov al, offset flat:symbol
mov ax, offset flat:symbol
mov eax, offset flat:symbol
mov rax, offset flat:symbol

#parts aren't supported by the parser, yet (and not at all for symbol refs)
#mov eax, high part symbol
#mov eax, low part symbol

#addressing modes

#absolute 64bit addressing
movabs eax, [symbol]

#absolute 32bit addressing
mov eax, [symbol]

#arithmetic
mov eax, [rax+symbol]

#RIP relative
mov eax, [rip+symbol]

foo:
.att_syntax
#absolute 64bit addressing
mov 0x8877665544332211,%al
mov 0x8877665544332211,%ax
mov 0x8877665544332211,%eax
mov 0x8877665544332211,%rax
mov %al,0x8877665544332211
mov %ax,0x8877665544332211
mov %eax,0x8877665544332211
mov %rax,0x8877665544332211
movb 0x8877665544332211,%al
movw 0x8877665544332211,%ax
movl 0x8877665544332211,%eax
movq 0x8877665544332211,%rax
movb %al,0x8877665544332211
movw %ax,0x8877665544332211
movl %eax,0x8877665544332211
movq %rax,0x8877665544332211

#absolute signed 32bit addressing
mov 0xffffffffff332211,%al
mov 0xffffffffff332211,%ax
mov 0xffffffffff332211,%eax
mov 0xffffffffff332211,%rax
mov %al,0xffffffffff332211
mov %ax,0xffffffffff332211
mov %eax,0xffffffffff332211
mov %rax,0xffffffffff332211
movb 0xffffffffff332211,%al
movw 0xffffffffff332211,%ax
movl 0xffffffffff332211,%eax
movq 0xffffffffff332211,%rax
movb %al,0xffffffffff332211
movw %ax,0xffffffffff332211
movl %eax,0xffffffffff332211
movq %rax,0xffffffffff332211

cmpxchg16b (%rax)

.intel_syntax noprefix
cmpxchg16b oword ptr [rax]

.att_syntax
	movsx	%al, %si
	movsx	%al, %esi
	movsx	%al, %rsi
	movsx	%ax, %esi
	movsx	%ax, %rsi
	movsx	%eax, %rsi
	movsx	(%rax), %edx
	movsx	(%rax), %rdx
	movsx	(%rax), %dx
	movsbl	(%rax), %edx
	movsbq	(%rax), %rdx
	movsbw	(%rax), %dx
	movswl	(%rax), %edx
	movswq	(%rax), %rdx

	movzx	%al, %si
	movzx	%al, %esi
	movzx	%al, %rsi
	movzx	%ax, %esi
	movzx	%ax, %rsi
	movzx	(%rax), %edx
	movzx	(%rax), %rdx
	movzx	(%rax), %dx
	movzb	(%rax), %edx
	movzb	(%rax), %rdx
	movzb	(%rax), %dx
	movzbl	(%rax), %edx
	movzbq	(%rax), %rdx
	movzbw	(%rax), %dx
	movzwl	(%rax), %edx
	movzwq	(%rax), %rdx

	.intel_syntax noprefix
	movsx	si,al
	movsx	esi,al
	movsx	rsi,al
	movsx	esi,ax
	movsx	rsi,ax
	movsx	rsi,eax
	movsx	edx,BYTE PTR [rax]
	movsx	rdx,BYTE PTR [rax]
	movsx	dx,BYTE PTR [rax]
	movsx	edx,WORD PTR [rax]
	movsx	rdx,WORD PTR [rax]

	movzx	si,al
	movzx	esi,al
	movzx	rsi,al
	movzx	esi,ax
	movzx	rsi,ax
	movzx	edx,BYTE PTR [rax]
	movzx	rdx,BYTE PTR [rax]
	movzx	dx,BYTE PTR [rax]
	movzx	edx,WORD PTR [rax]
	movzx	rdx,WORD PTR [rax]

	movq	xmm1,QWORD PTR [rsp]
	movq	xmm1,[rsp]
	movq	QWORD PTR [rsp],xmm1
	movq	[rsp],xmm1

.att_syntax
	fnstsw
	fnstsw	%ax
	fstsw
	fstsw	%ax

	.intel_syntax noprefix
	fnstsw
	fnstsw	ax
	fstsw
	fstsw	ax

.att_syntax
movsx (%rax),%ax
movsx (%rax),%eax
movsx (%rax),%rax
movsxb	(%rax), %dx
movsxb	(%rax), %edx
movsxb	(%rax), %rdx
movsxw	(%rax), %edx
movsxw	(%rax), %rdx
movsxl	(%rax), %rdx
movsxd (%rax),%rax
movzx (%rax),%ax
movzx (%rax),%eax
movzx (%rax),%rax
movzxb	(%rax), %dx
movzxb	(%rax), %edx
movzxb	(%rax), %rdx
movzxw	(%rax), %edx
movzxw	(%rax), %rdx

movnti %eax, (%rax)
movntil %eax, (%rax)
movnti %rax, (%rax)
movntiq %rax, (%rax)

.intel_syntax noprefix

movsx ax, BYTE PTR [rax]
movsx eax, BYTE PTR [rax]
movsx eax, WORD PTR [rax]
movsx rax, WORD PTR [rax]
movsx rax, DWORD PTR [rax]
movsxd rax, [rax]
movzx ax, BYTE PTR [rax]
movzx eax, BYTE PTR [rax]
movzx eax, WORD PTR [rax]
movzx rax, WORD PTR [rax]

movnti dword ptr [rax], eax
movnti qword ptr [rax], rax