Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
31 halyavin 1
 
2
; Copyright (c) 1999-2005, Tomasz Grysztar.
3
; All rights reserved.
4
5
 
6
	cmp	[code_type],64
7
	je	illegal_instruction
8
simple_instruction:
9
	stos	byte [edi]
10
	jmp	instruction_assembled
11
simple_instruction_only64:
12
	cmp	[code_type],64
13
	jne	illegal_instruction
14
	jmp	simple_instruction
15
simple_instruction_16bit_except64:
16
	cmp	[code_type],64
17
	je	illegal_instruction
18
simple_instruction_16bit:
19
	cmp	[code_type],16
20
	jne	size_prefix
21
	stos	byte [edi]
22
	jmp	instruction_assembled
23
      size_prefix:
24
	mov	ah,al
25
	mov	al,66h
26
	stos	word [edi]
27
	jmp	instruction_assembled
28
simple_instruction_32bit_except64:
29
	cmp	[code_type],64
30
	je	illegal_instruction
31
simple_instruction_32bit:
32
	cmp	[code_type],16
33
	je	size_prefix
34
	stos	byte [edi]
35
	jmp	instruction_assembled
36
simple_instruction_64bit:
37
	cmp	[code_type],64
38
	jne	illegal_instruction
39
	mov	ah,al
40
	mov	al,48h
41
	stos	word [edi]
42
	jmp	instruction_assembled
43
simple_extended_instruction:
44
	mov	ah,al
45
	mov	al,0Fh
46
	stos	word [edi]
47
	jmp	instruction_assembled
48
prefix_instruction:
49
	stos	byte [edi]
50
	or	[prefixed_instruction],-1
51
	jmp	continue_line
52
segment_prefix:
53
	mov	ah,al
54
	shr	ah,4
55
	cmp	ah,6
56
	jne	illegal_instruction
57
	and	al,1111b
58
	mov	[segment_register],al
59
	call	store_segment_prefix
60
	or	[prefixed_instruction],-1
61
	jmp	continue_line
62
int_instruction:
63
	lods	byte [esi]
64
	call	get_size_operator
65
	cmp	ah,1
66
	ja	invalid_operand_size
67
	cmp	al,'('
68
	jne	invalid_operand
69
	call	get_byte_value
70
	mov	ah,al
71
	mov	al,0CDh
72
	stos	word [edi]
73
	jmp	instruction_assembled
74
iret_instruction:
75
	cmp	[code_type],64
76
	jne	simple_instruction
77
	call	operand_64bit
78
	jmp	simple_instruction
79
aa_instruction:
80
	cmp	[code_type],64
81
	je	illegal_instruction
82
	push	eax
83
	mov	bl,10
84
	cmp	byte [esi],'('
85
	jne	aa_store
86
	inc	esi
87
	xor	al,al
88
	xchg	al,[operand_size]
89
	cmp	al,1
90
	ja	invalid_operand_size
91
	call	get_byte_value
92
	mov	bl,al
93
      aa_store:
94
	cmp	[operand_size],0
95
	jne	invalid_operand
96
	pop	eax
97
	mov	ah,bl
98
	stos	word [edi]
99
	jmp	instruction_assembled
100
101
 
102
	mov	[base_code],al
103
	lods	byte [esi]
104
	call	get_size_operator
105
	cmp	al,10h
106
	je	basic_reg
107
	cmp	al,'['
108
	jne	invalid_operand
109
      basic_mem:
110
	call	get_address
111
	push	edx bx cx
112
	lods	byte [esi]
113
	cmp	al,','
114
	jne	invalid_operand
115
	lods	byte [esi]
116
	call	get_size_operator
117
	cmp	al,'('
118
	je	basic_mem_imm
119
	cmp	al,10h
120
	jne	invalid_operand
121
      basic_mem_reg:
122
	lods	byte [esi]
123
	call	convert_register
124
	mov	[postbyte_register],al
125
	pop	cx bx edx
126
	mov	al,ah
127
	cmp	al,1
128
	je	basic_mem_reg_8bit
129
	call	operand_autodetect
130
	inc	[base_code]
131
      basic_mem_reg_8bit:
132
	call	store_instruction
133
	jmp	instruction_assembled
134
      basic_mem_imm:
135
	mov	al,[operand_size]
136
	cmp	al,1
137
	je	basic_mem_imm_8bit
138
	cmp	al,2
139
	je	basic_mem_imm_16bit
140
	cmp	al,4
141
	je	basic_mem_imm_32bit
142
	cmp	al,8
143
	je	basic_mem_imm_64bit
144
	or	al,al
145
	jnz	invalid_operand_size
146
	cmp	[error_line],0
147
	jne	basic_mem_imm_8bit
148
	mov	eax,[current_line]
149
	mov	[error_line],eax
150
	mov	[error],operand_size_not_specified
151
      basic_mem_imm_8bit:
152
	call	get_byte_value
153
	mov	byte [value],al
154
	mov	al,[base_code]
155
	shr	al,3
156
	mov	[postbyte_register],al
157
	pop	cx bx edx
158
	mov	[base_code],80h
159
	call	store_instruction_with_imm8
160
	jmp	instruction_assembled
161
      basic_mem_imm_16bit:
162
	call	operand_16bit
163
	call	get_word_value
164
	mov	word [value],ax
165
	mov	al,[base_code]
166
	shr	al,3
167
	mov	[postbyte_register],al
168
	pop	cx bx edx
169
	cmp	[value_type],0
170
	jne	basic_mem_imm_16bit_store
171
	cmp	[size_declared],0
172
	jne	basic_mem_imm_16bit_store
173
	cmp	word [value],80h
174
	jb	basic_mem_simm_8bit
175
	cmp	word [value],-80h
176
	jae	basic_mem_simm_8bit
177
      basic_mem_imm_16bit_store:
178
	mov	[base_code],81h
179
	call	store_instruction_with_imm16
180
	jmp	instruction_assembled
181
      basic_mem_simm_8bit:
182
	mov	[base_code],83h
183
	call	store_instruction_with_imm8
184
	jmp	instruction_assembled
185
      basic_mem_imm_32bit:
186
	call	operand_32bit
187
	call	get_dword_value
188
      basic_mem_imm_32bit_ok:
189
	mov	dword [value],eax
190
	mov	al,[base_code]
191
	shr	al,3
192
	mov	[postbyte_register],al
193
	pop	cx bx edx
194
	cmp	[value_type],0
195
	jne	basic_mem_imm_32bit_store
196
	cmp	[size_declared],0
197
	jne	basic_mem_imm_32bit_store
198
	cmp	dword [value],80h
199
	jb	basic_mem_simm_8bit
200
	cmp	dword [value],-80h
201
	jae	basic_mem_simm_8bit
202
      basic_mem_imm_32bit_store:
203
	mov	[base_code],81h
204
	call	store_instruction_with_imm32
205
	jmp	instruction_assembled
206
      basic_mem_imm_64bit:
207
	cmp	[size_declared],0
208
	jne	long_immediate_not_encodable
209
	call	operand_64bit
210
	call	get_simm32
211
	cmp	[value_type],4
212
	jae	long_immediate_not_encodable
213
	jmp	basic_mem_imm_32bit_ok
214
      get_simm32:
215
	call	get_qword_value
216
	mov	ecx,edx
217
	cdq
218
	cmp	ecx,edx
219
	jne	value_out_of_range
220
	ret
221
      basic_reg:
222
	lods	byte [esi]
223
	call	convert_register
224
	mov	[postbyte_register],al
225
	lods	byte [esi]
226
	cmp	al,','
227
	jne	invalid_operand
228
	lods	byte [esi]
229
	call	get_size_operator
230
	cmp	al,10h
231
	je	basic_reg_reg
232
	cmp	al,'('
233
	je	basic_reg_imm
234
	cmp	al,'['
235
	jne	invalid_operand
236
      basic_reg_mem:
237
	call	get_address
238
	mov	al,[operand_size]
239
	cmp	al,1
240
	je	basic_reg_mem_8bit
241
	call	operand_autodetect
242
	add	[base_code],3
243
	call	store_instruction
244
	jmp	instruction_assembled
245
      basic_reg_mem_8bit:
246
	add	[base_code],2
247
	call	store_instruction
248
	jmp	instruction_assembled
249
      basic_reg_reg:
250
	lods	byte [esi]
251
	call	convert_register
252
	mov	bl,[postbyte_register]
253
	mov	[postbyte_register],al
254
	mov	al,ah
255
	cmp	al,1
256
	je	basic_reg_reg_8bit
257
	call	operand_autodetect
258
	inc	[base_code]
259
      basic_reg_reg_8bit:
260
	call	store_nomem_instruction
261
	jmp	instruction_assembled
262
      basic_reg_imm:
263
	mov	al,[operand_size]
264
	cmp	al,1
265
	je	basic_reg_imm_8bit
266
	cmp	al,2
267
	je	basic_reg_imm_16bit
268
	cmp	al,4
269
	je	basic_reg_imm_32bit
270
	cmp	al,8
271
	je	basic_reg_imm_64bit
272
	or	al,al
273
	jnz	invalid_operand_size
274
	cmp	[error_line],0
275
	jne	basic_reg_imm_32bit
276
	mov	eax,[current_line]
277
	mov	[error_line],eax
278
	mov	[error],operand_size_not_specified
279
	jmp	basic_reg_imm_32bit
280
      basic_reg_imm_8bit:
281
	call	get_byte_value
282
	mov	dl,al
283
	mov	bl,[base_code]
284
	shr	bl,3
285
	xchg	bl,[postbyte_register]
286
	or	bl,bl
287
	jz	basic_al_imm
288
	mov	[base_code],80h
289
	call	store_nomem_instruction
290
	mov	al,dl
291
	stos	byte [edi]
292
	jmp	instruction_assembled
293
      basic_al_imm:
294
	mov	al,[base_code]
295
	add	al,4
296
	stos	byte [edi]
297
	mov	al,dl
298
	stos	byte [edi]
299
	jmp	instruction_assembled
300
      basic_reg_imm_16bit:
301
	call	operand_16bit
302
	call	get_word_value
303
	mov	dx,ax
304
	mov	bl,[base_code]
305
	shr	bl,3
306
	xchg	bl,[postbyte_register]
307
	cmp	[value_type],0
308
	jne	basic_reg_imm_16bit_store
309
	cmp	[size_declared],0
310
	jne	basic_reg_imm_16bit_store
311
	cmp	dx,80h
312
	jb	basic_reg_simm_8bit
313
	cmp	dx,-80h
314
	jae	basic_reg_simm_8bit
315
      basic_reg_imm_16bit_store:
316
	or	bl,bl
317
	jz	basic_ax_imm
318
	mov	[base_code],81h
319
	call	store_nomem_instruction
320
	mov	ax,dx
321
	call	mark_relocation
322
	stos	word [edi]
323
	jmp	instruction_assembled
324
      basic_reg_simm_8bit:
325
	mov	[base_code],83h
326
	call	store_nomem_instruction
327
	mov	al,dl
328
	stos	byte [edi]
329
	jmp	instruction_assembled
330
      basic_ax_imm:
331
	add	[base_code],5
332
	call	store_instruction_code
333
	mov	ax,dx
334
	call	mark_relocation
335
	stos	word [edi]
336
	jmp	instruction_assembled
337
      basic_reg_imm_32bit:
338
	call	operand_32bit
339
	call	get_dword_value
340
      basic_reg_imm_32bit_ok:
341
	mov	edx,eax
342
	mov	bl,[base_code]
343
	shr	bl,3
344
	xchg	bl,[postbyte_register]
345
	cmp	[value_type],0
346
	jne	basic_reg_imm_32bit_store
347
	cmp	[size_declared],0
348
	jne	basic_reg_imm_32bit_store
349
	cmp	edx,80h
350
	jb	basic_reg_simm_8bit
351
	cmp	edx,-80h
352
	jae	basic_reg_simm_8bit
353
      basic_reg_imm_32bit_store:
354
	or	bl,bl
355
	jz	basic_eax_imm
356
	mov	[base_code],81h
357
	call	store_nomem_instruction
358
	mov	eax,edx
359
	call	mark_relocation
360
	stos	dword [edi]
361
	jmp	instruction_assembled
362
      basic_eax_imm:
363
	add	[base_code],5
364
	call	store_instruction_code
365
	mov	eax,edx
366
	call	mark_relocation
367
	stos	dword [edi]
368
	jmp	instruction_assembled
369
      basic_reg_imm_64bit:
370
	cmp	[size_declared],0
371
	jne	long_immediate_not_encodable
372
	call	operand_64bit
373
	call	get_simm32
374
	cmp	[value_type],4
375
	jae	long_immediate_not_encodable
376
	jmp	basic_reg_imm_32bit_ok
377
single_operand_instruction:
378
	mov	[base_code],0F6h
379
	mov	[postbyte_register],al
380
	lods	byte [esi]
381
	call	get_size_operator
382
	cmp	al,10h
383
	je	single_reg
384
	cmp	al,'['
385
	jne	invalid_operand
386
      single_mem:
387
	call	get_address
388
	mov	al,[operand_size]
389
	cmp	al,1
390
	je	single_mem_8bit
391
	jb	single_mem_nosize
392
	call	operand_autodetect
393
	inc	[base_code]
394
	call	store_instruction
395
	jmp	instruction_assembled
396
      single_mem_nosize:
397
	cmp	[error_line],0
398
	jne	single_mem_8bit
399
	mov	eax,[current_line]
400
	mov	[error_line],eax
401
	mov	[error],operand_size_not_specified
402
      single_mem_8bit:
403
	call	store_instruction
404
	jmp	instruction_assembled
405
      single_reg:
406
	lods	byte [esi]
407
	call	convert_register
408
	mov	bl,al
409
	mov	al,ah
410
	cmp	al,1
411
	je	single_reg_8bit
412
	call	operand_autodetect
413
	inc	[base_code]
414
      single_reg_8bit:
415
	call	store_nomem_instruction
416
	jmp	instruction_assembled
417
mov_instruction:
418
	mov	[base_code],88h
419
	lods	byte [esi]
420
	call	get_size_operator
421
	cmp	al,10h
422
	je	mov_reg
423
	cmp	al,'['
424
	jne	invalid_operand
425
      mov_mem:
426
	call	get_address
427
	push	edx bx cx
428
	lods	byte [esi]
429
	cmp	al,','
430
	jne	invalid_operand
431
	lods	byte [esi]
432
	call	get_size_operator
433
	cmp	al,'('
434
	je	mov_mem_imm
435
	cmp	al,10h
436
	jne	invalid_operand
437
      mov_mem_reg:
438
	lods	byte [esi]
439
	cmp	al,60h
440
	jb	mov_mem_general_reg
441
	cmp	al,70h
442
	jb	mov_mem_sreg
443
      mov_mem_general_reg:
444
	call	convert_register
445
	mov	[postbyte_register],al
446
	pop	cx bx edx
447
	cmp	ah,1
448
	je	mov_mem_reg_8bit
449
	mov	al,ah
450
	call	operand_autodetect
451
	mov	al,[postbyte_register]
452
	or	al,bl
453
	or	al,bh
454
	jz	mov_mem_ax
455
	inc	[base_code]
456
	call	store_instruction
457
	jmp	instruction_assembled
458
      mov_mem_reg_8bit:
459
	or	al,bl
460
	or	al,bh
461
	jz	mov_mem_al
462
	call	store_instruction
463
	jmp	instruction_assembled
464
      mov_mem_al:
465
	test	ch,22h
466
	jnz	mov_mem_address16_al
467
	test	ch,44h
468
	jnz	mov_mem_address32_al
469
	test	ch,88h
470
	jnz	mov_mem_address64_al
471
	or	ch,ch
472
	jnz	invalid_address_size
473
	cmp	[code_type],64
474
	je	mov_mem_address64_al
475
	cmp	[code_type],32
476
	je	mov_mem_address32_al
477
	cmp	edx,10000h
478
	jb	mov_mem_address16_al
479
      mov_mem_address32_al:
480
	call	store_segment_prefix_if_necessary
481
	call	address_32bit_prefix
482
	mov	[base_code],0A2h
483
      store_mov_address32:
484
	call	store_instruction_code
485
	push	instruction_assembled
486
	jmp	store_address_32bit_value
487
      mov_mem_address16_al:
488
	call	store_segment_prefix_if_necessary
489
	call	address_16bit_prefix
490
	mov	[base_code],0A2h
491
      store_mov_address16:
492
	cmp	[code_type],64
493
	je	invalid_address
494
	call	store_instruction_code
495
	mov	eax,edx
496
	stos	word [edi]
497
	cmp	edx,10000h
498
	jge	value_out_of_range
499
	jmp	instruction_assembled
500
      mov_mem_address64_al:
501
	call	store_segment_prefix_if_necessary
502
	mov	[base_code],0A2h
503
      store_mov_address64:
504
	call	store_instruction_code
505
	push	instruction_assembled
506
	jmp	store_address_64bit_value
507
      mov_mem_ax:
508
	test	ch,22h
509
	jnz	mov_mem_address16_ax
510
	test	ch,44h
511
	jnz	mov_mem_address32_ax
512
	test	ch,88h
513
	jnz	mov_mem_address64_ax
514
	or	ch,ch
515
	jnz	invalid_address_size
516
	cmp	[code_type],64
517
	je	mov_mem_address64_ax
518
	cmp	[code_type],32
519
	je	mov_mem_address32_ax
520
	cmp	edx,10000h
521
	jb	mov_mem_address16_ax
522
      mov_mem_address32_ax:
523
	call	store_segment_prefix_if_necessary
524
	call	address_32bit_prefix
525
	mov	[base_code],0A3h
526
	jmp	store_mov_address32
527
      mov_mem_address16_ax:
528
	call	store_segment_prefix_if_necessary
529
	call	address_16bit_prefix
530
	mov	[base_code],0A3h
531
	jmp	store_mov_address16
532
      mov_mem_address64_ax:
533
	call	store_segment_prefix_if_necessary
534
	mov	[base_code],0A3h
535
	jmp	store_mov_address64
536
      mov_mem_sreg:
537
	sub	al,61h
538
	mov	[postbyte_register],al
539
	pop	cx bx edx
540
	mov	ah,[operand_size]
541
	or	ah,ah
542
	jz	mov_mem_sreg_store
543
	cmp	ah,2
544
	jne	invalid_operand_size
545
      mov_mem_sreg_store:
546
	mov	[base_code],8Ch
547
	call	store_instruction
548
	jmp	instruction_assembled
549
      mov_mem_imm:
550
	mov	al,[operand_size]
551
	cmp	al,1
552
	je	mov_mem_imm_8bit
553
	cmp	al,2
554
	je	mov_mem_imm_16bit
555
	cmp	al,4
556
	je	mov_mem_imm_32bit
557
	cmp	al,8
558
	je	mov_mem_imm_64bit
559
	or	al,al
560
	jnz	invalid_operand_size
561
	cmp	[error_line],0
562
	jne	mov_mem_imm_32bit
563
	mov	eax,[current_line]
564
	mov	[error_line],eax
565
	mov	[error],operand_size_not_specified
566
	jmp	mov_mem_imm_32bit
567
      mov_mem_imm_8bit:
568
	call	get_byte_value
569
	mov	byte [value],al
570
	mov	[postbyte_register],0
571
	mov	[base_code],0C6h
572
	pop	cx bx edx
573
	call	store_instruction_with_imm8
574
	jmp	instruction_assembled
575
      mov_mem_imm_16bit:
576
	call	operand_16bit
577
	call	get_word_value
578
	mov	word [value],ax
579
	mov	[postbyte_register],0
580
	mov	[base_code],0C7h
581
	pop	cx bx edx
582
	call	store_instruction_with_imm16
583
	jmp	instruction_assembled
584
      mov_mem_imm_32bit:
585
	call	operand_32bit
586
	call	get_dword_value
587
      mov_mem_imm_32bit_store:
588
	mov	dword [value],eax
589
	mov	[postbyte_register],0
590
	mov	[base_code],0C7h
591
	pop	cx bx edx
592
	call	store_instruction_with_imm32
593
	jmp	instruction_assembled
594
      mov_mem_imm_64bit:
595
	cmp	[size_declared],0
596
	jne	long_immediate_not_encodable
597
	call	operand_64bit
598
	call	get_simm32
599
	cmp	[value_type],4
600
	jae	long_immediate_not_encodable
601
	jmp	mov_mem_imm_32bit_store
602
      mov_reg:
603
	lods	byte [esi]
604
	mov	ah,al
605
	sub	ah,10h
606
	and	ah,al
607
	test	ah,0F0h
608
	jnz	mov_sreg
609
	call	convert_register
610
	mov	[postbyte_register],al
611
	lods	byte [esi]
612
	cmp	al,','
613
	jne	invalid_operand
614
	lods	byte [esi]
615
	call	get_size_operator
616
	cmp	al,'['
617
	je	mov_reg_mem
618
	cmp	al,'('
619
	je	mov_reg_imm
620
	cmp	al,10h
621
	jne	invalid_operand
622
      mov_reg_reg:
623
	lods	byte [esi]
624
	mov	ah,al
625
	sub	ah,10h
626
	and	ah,al
627
	test	ah,0F0h
628
	jnz	mov_reg_sreg
629
	call	convert_register
630
	mov	bl,[postbyte_register]
631
	mov	[postbyte_register],al
632
	mov	al,ah
633
	cmp	al,1
634
	je	mov_reg_reg_8bit
635
	call	operand_autodetect
636
	inc	[base_code]
637
      mov_reg_reg_8bit:
638
	call	store_nomem_instruction
639
	jmp	instruction_assembled
640
      mov_reg_sreg:
641
	mov	bl,[postbyte_register]
642
	mov	ah,al
643
	and	al,1111b
644
	mov	[postbyte_register],al
645
	shr	ah,4
646
	cmp	ah,5
647
	je	mov_reg_creg
648
	cmp	ah,7
649
	je	mov_reg_dreg
650
	ja	mov_reg_treg
651
	dec	[postbyte_register]
652
	cmp	[operand_size],8
653
	je	mov_reg_sreg64
654
	cmp	[operand_size],4
655
	je	mov_reg_sreg32
656
	cmp	[operand_size],2
657
	jne	invalid_operand_size
658
	call	operand_16bit
659
	jmp	mov_reg_sreg_store
660
      mov_reg_sreg64:
661
	call	operand_64bit
662
	jmp	mov_reg_sreg_store
663
      mov_reg_sreg32:
664
	call	operand_32bit
665
      mov_reg_sreg_store:
666
	mov	[base_code],8Ch
667
	call	store_nomem_instruction
668
	jmp	instruction_assembled
669
      mov_reg_treg:
670
	cmp	ah,9
671
	jne	invalid_operand
672
	mov	[extended_code],24h
673
	jmp	mov_reg_xrx
674
      mov_reg_dreg:
675
	mov	[extended_code],21h
676
	jmp	mov_reg_xrx
677
      mov_reg_creg:
678
	mov	[extended_code],20h
679
      mov_reg_xrx:
680
	mov	[base_code],0Fh
681
	cmp	[code_type],64
682
	je	mov_reg_xrx_64bit
683
	cmp	[operand_size],4
684
	jne	invalid_operand_size
685
	call	store_nomem_instruction
686
	jmp	instruction_assembled
687
      mov_reg_xrx_64bit:
688
	cmp	[operand_size],8
689
	jne	invalid_operand_size
690
	call	store_nomem_instruction
691
	jmp	instruction_assembled
692
      mov_reg_mem:
693
	call	get_address
694
	mov	al,[operand_size]
695
	cmp	al,1
696
	je	mov_reg_mem_8bit
697
	call	operand_autodetect
698
	mov	al,[postbyte_register]
699
	or	al,bl
700
	or	al,bh
701
	jz	mov_ax_mem
702
	add	[base_code],3
703
	call	store_instruction
704
	jmp	instruction_assembled
705
      mov_reg_mem_8bit:
706
	mov	al,[postbyte_register]
707
	or	al,bl
708
	or	al,bh
709
	jz	mov_al_mem
710
	add	[base_code],2
711
	call	store_instruction
712
	jmp	instruction_assembled
713
      mov_al_mem:
714
	test	ch,22h
715
	jnz	mov_al_mem_address16
716
	test	ch,44h
717
	jnz	mov_al_mem_address32
718
	test	ch,88h
719
	jnz	mov_al_mem_address64
720
	or	ch,ch
721
	jnz	invalid_address_size
722
	cmp	[code_type],64
723
	je	mov_al_mem_address64
724
	cmp	[code_type],32
725
	je	mov_al_mem_address32
726
	cmp	edx,10000h
727
	jb	mov_al_mem_address16
728
      mov_al_mem_address32:
729
	call	store_segment_prefix_if_necessary
730
	call	address_32bit_prefix
731
	mov	[base_code],0A0h
732
	jmp	store_mov_address32
733
      mov_al_mem_address16:
734
	call	store_segment_prefix_if_necessary
735
	call	address_16bit_prefix
736
	mov	[base_code],0A0h
737
	jmp	store_mov_address16
738
      mov_al_mem_address64:
739
	call	store_segment_prefix_if_necessary
740
	mov	[base_code],0A0h
741
	jmp	store_mov_address64
742
      mov_ax_mem:
743
	test	ch,22h
744
	jnz	mov_ax_mem_address16
745
	test	ch,44h
746
	jnz	mov_ax_mem_address32
747
	test	ch,88h
748
	jnz	mov_ax_mem_address64
749
	or	ch,ch
750
	jnz	invalid_address_size
751
	cmp	[code_type],64
752
	je	mov_ax_mem_address64
753
	cmp	[code_type],32
754
	je	mov_ax_mem_address32
755
	cmp	edx,10000h
756
	jb	mov_ax_mem_address16
757
      mov_ax_mem_address32:
758
	call	store_segment_prefix_if_necessary
759
	call	address_32bit_prefix
760
	mov	[base_code],0A1h
761
	jmp	store_mov_address32
762
      mov_ax_mem_address16:
763
	call	store_segment_prefix_if_necessary
764
	mov	[base_code],0A1h
765
	jmp	store_mov_address16
766
      mov_ax_mem_address64:
767
	call	store_segment_prefix_if_necessary
768
	mov	[base_code],0A1h
769
	jmp	store_mov_address64
770
      mov_reg_imm:
771
	mov	al,[operand_size]
772
	cmp	al,1
773
	je	mov_reg_imm_8bit
774
	cmp	al,2
775
	je	mov_reg_imm_16bit
776
	cmp	al,4
777
	je	mov_reg_imm_32bit
778
	cmp	al,8
779
	je	mov_reg_imm_64bit
780
	or	al,al
781
	jnz	invalid_operand_size
782
	cmp	[error_line],0
783
	jne	mov_reg_imm_32bit
784
	mov	eax,[current_line]
785
	mov	[error_line],eax
786
	mov	[error],operand_size_not_specified
787
	jmp	mov_reg_imm_32bit
788
      mov_reg_imm_8bit:
789
	call	get_byte_value
790
	mov	dl,al
791
	mov	al,0B0h
792
	call	store_mov_reg_imm_code
793
	mov	al,dl
794
	stos	byte [edi]
795
	jmp	instruction_assembled
796
      mov_reg_imm_16bit:
797
	call	get_word_value
798
	mov	dx,ax
799
	call	operand_16bit
800
	mov	al,0B8h
801
	call	store_mov_reg_imm_code
802
	mov	ax,dx
803
	call	mark_relocation
804
	stos	word [edi]
805
	jmp	instruction_assembled
806
      mov_reg_imm_32bit:
807
	call	operand_32bit
808
	call	get_dword_value
809
	mov	edx,eax
810
	mov	al,0B8h
811
	call	store_mov_reg_imm_code
812
	mov	eax,edx
813
	call	mark_relocation
814
	stos	dword [edi]
815
	jmp	instruction_assembled
816
      mov_reg_imm_64bit:
817
	call	operand_64bit
818
	call	get_qword_value
819
	mov	ecx,edx
820
	cmp	[size_declared],0
821
	jne	mov_reg_imm_64bit_store
822
	cmp	[value_type],4
823
	jae	mov_reg_imm_64bit_store
824
	cdq
825
	cmp	ecx,edx
826
	je	mov_reg_64bit_imm_32bit
827
      mov_reg_imm_64bit_store:
828
	push	eax ecx
829
	mov	al,0B8h
830
	call	store_mov_reg_imm_code
831
	pop	edx eax
832
	call	mark_relocation
833
	stos	dword [edi]
834
	mov	eax,edx
835
	stos	dword [edi]
836
	jmp	instruction_assembled
837
      store_mov_reg_imm_code:
838
	mov	ah,[postbyte_register]
839
	test	ah,1000b
840
	jz	mov_reg_imm_prefix_ok
841
	or	[rex_prefix],41h
842
      mov_reg_imm_prefix_ok:
843
	and	ah,111b
844
	add	al,ah
845
	mov	[base_code],al
846
	call	store_instruction_code
847
	ret
848
      mov_reg_64bit_imm_32bit:
849
	mov	edx,eax
850
	mov	bl,[postbyte_register]
851
	mov	[postbyte_register],0
852
	mov	[base_code],0C7h
853
	call	store_nomem_instruction
854
	mov	eax,edx
855
	call	mark_relocation
856
	stos	dword [edi]
857
	jmp	instruction_assembled
858
      mov_sreg:
859
	mov	ah,al
860
	and	al,111b
861
	mov	[postbyte_register],al
862
	shr	ah,4
863
	cmp	ah,5
864
	je	mov_creg
865
	cmp	ah,7
866
	je	mov_dreg
867
	ja	mov_treg
868
	cmp	al,2
869
	je	illegal_instruction
870
	dec	[postbyte_register]
871
	lods	byte [esi]
872
	cmp	al,','
873
	jne	invalid_operand
874
	lods	byte [esi]
875
	call	get_size_operator
876
	cmp	al,'['
877
	je	mov_sreg_mem
878
	cmp	al,10h
879
	jne	invalid_operand
880
      mov_sreg_reg:
881
	lods	byte [esi]
882
	call	convert_register
883
	or	ah,ah
884
	jz	mov_sreg_reg_size_ok
885
	cmp	ah,2
886
	jne	invalid_operand_size
887
	mov	bl,al
888
      mov_sreg_reg_size_ok:
889
	mov	[base_code],8Eh
890
	call	store_nomem_instruction
891
	jmp	instruction_assembled
892
      mov_sreg_mem:
893
	call	get_address
894
	mov	al,[operand_size]
895
	or	al,al
896
	jz	mov_sreg_mem_size_ok
897
	cmp	al,2
898
	jne	invalid_operand_size
899
      mov_sreg_mem_size_ok:
900
	mov	[base_code],8Eh
901
	call	store_instruction
902
	jmp	instruction_assembled
903
      mov_treg:
904
	cmp	ah,9
905
	jne	invalid_operand
906
	mov	[extended_code],26h
907
	jmp	mov_xrx
908
      mov_dreg:
909
	mov	[extended_code],23h
910
	jmp	mov_xrx
911
      mov_creg:
912
	mov	[extended_code],22h
913
      mov_xrx:
914
	mov	[base_code],0Fh
915
	lods	byte [esi]
916
	cmp	al,','
917
	jne	invalid_operand
918
	lods	byte [esi]
919
	cmp	al,10h
920
	jne	invalid_operand
921
	lods	byte [esi]
922
	call	convert_register
923
	mov	bl,al
924
	cmp	[code_type],64
925
	je	mov_xrx_64bit
926
	cmp	ah,4
927
	jne	invalid_operand_size
928
	call	store_nomem_instruction
929
	jmp	instruction_assembled
930
      mov_xrx_64bit:
931
	cmp	ah,8
932
	jne	invalid_operand_size
933
	call	store_nomem_instruction
934
	jmp	instruction_assembled
935
cmov_instruction:
936
	mov	[base_code],0Fh
937
	mov	[extended_code],al
938
	lods	byte [esi]
939
	call	get_size_operator
940
	cmp	al,10h
941
	jne	invalid_operand
942
	lods	byte [esi]
943
	call	convert_register
944
	mov	[postbyte_register],al
945
	lods	byte [esi]
946
	cmp	al,','
947
	jne	invalid_operand
948
	lods	byte [esi]
949
	call	get_size_operator
950
	cmp	al,'['
951
	je	cmov_reg_mem
952
	cmp	al,10h
953
	jne	invalid_operand
954
      cmov_reg_reg:
955
	lods	byte [esi]
956
	call	convert_register
957
	mov	bl,al
958
	mov	al,ah
959
	call	operand_autodetect
960
	call	store_nomem_instruction
961
	jmp	instruction_assembled
962
      cmov_reg_mem:
963
	call	get_address
964
	mov	al,[operand_size]
965
	call	operand_autodetect
966
	call	store_instruction
967
	jmp	instruction_assembled
968
test_instruction:
969
	mov	[base_code],84h
970
	lods	byte [esi]
971
	call	get_size_operator
972
	cmp	al,10h
973
	je	test_reg
974
	cmp	al,'['
975
	jne	invalid_operand
976
      test_mem:
977
	call	get_address
978
	push	edx bx cx
979
	lods	byte [esi]
980
	cmp	al,','
981
	jne	invalid_operand
982
	lods	byte [esi]
983
	call	get_size_operator
984
	cmp	al,'('
985
	je	test_mem_imm
986
	cmp	al,10h
987
	jne	invalid_operand
988
      test_mem_reg:
989
	lods	byte [esi]
990
	call	convert_register
991
	mov	[postbyte_register],al
992
	pop	cx bx edx
993
	mov	al,ah
994
	cmp	al,1
995
	je	test_mem_reg_8bit
996
	call	operand_autodetect
997
	inc	[base_code]
998
      test_mem_reg_8bit:
999
	call	store_instruction
1000
	jmp	instruction_assembled
1001
      test_mem_imm:
1002
	mov	al,[operand_size]
1003
	cmp	al,1
1004
	je	test_mem_imm_8bit
1005
	cmp	al,2
1006
	je	test_mem_imm_16bit
1007
	cmp	al,4
1008
	je	test_mem_imm_32bit
1009
	cmp	al,8
1010
	je	test_mem_imm_64bit
1011
	or	al,al
1012
	jnz	invalid_operand_size
1013
	cmp	[error_line],0
1014
	jne	test_mem_imm_32bit
1015
	mov	eax,[current_line]
1016
	mov	[error_line],eax
1017
	mov	[error],operand_size_not_specified
1018
	jmp	test_mem_imm_32bit
1019
      test_mem_imm_8bit:
1020
	call	get_byte_value
1021
	mov	byte [value],al
1022
	mov	[postbyte_register],0
1023
	mov	[base_code],0F6h
1024
	pop	cx bx edx
1025
	call	store_instruction_with_imm8
1026
	jmp	instruction_assembled
1027
      test_mem_imm_16bit:
1028
	call	operand_16bit
1029
	call	get_word_value
1030
	mov	word [value],ax
1031
	mov	[postbyte_register],0
1032
	mov	[base_code],0F7h
1033
	pop	cx bx edx
1034
	call	store_instruction_with_imm16
1035
	jmp	instruction_assembled
1036
      test_mem_imm_32bit:
1037
	call	operand_32bit
1038
	call	get_dword_value
1039
      test_mem_imm_32bit_store:
1040
	mov	dword [value],eax
1041
	mov	[postbyte_register],0
1042
	mov	[base_code],0F7h
1043
	pop	cx bx edx
1044
	call	store_instruction_with_imm32
1045
	jmp	instruction_assembled
1046
      test_mem_imm_64bit:
1047
	cmp	[size_declared],0
1048
	jne	long_immediate_not_encodable
1049
	call	operand_64bit
1050
	call	get_simm32
1051
	cmp	[value_type],4
1052
	jae	long_immediate_not_encodable
1053
	jmp	test_mem_imm_32bit_store
1054
      test_reg:
1055
	lods	byte [esi]
1056
	call	convert_register
1057
	mov	[postbyte_register],al
1058
	lods	byte [esi]
1059
	cmp	al,','
1060
	jne	invalid_operand
1061
	lods	byte [esi]
1062
	call	get_size_operator
1063
	cmp	al,'['
1064
	je	test_reg_mem
1065
	cmp	al,'('
1066
	je	test_reg_imm
1067
	cmp	al,10h
1068
	jne	invalid_operand
1069
      test_reg_reg:
1070
	lods	byte [esi]
1071
	call	convert_register
1072
	mov	bl,[postbyte_register]
1073
	mov	[postbyte_register],al
1074
	mov	al,ah
1075
	cmp	al,1
1076
	je	test_reg_reg_8bit
1077
	call	operand_autodetect
1078
	inc	[base_code]
1079
      test_reg_reg_8bit:
1080
	call	store_nomem_instruction
1081
	jmp	instruction_assembled
1082
      test_reg_imm:
1083
	mov	al,[operand_size]
1084
	cmp	al,1
1085
	je	test_reg_imm_8bit
1086
	cmp	al,2
1087
	je	test_reg_imm_16bit
1088
	cmp	al,4
1089
	je	test_reg_imm_32bit
1090
	cmp	al,8
1091
	je	test_reg_imm_64bit
1092
	jmp	invalid_operand_size
1093
      test_reg_imm_8bit:
1094
	call	get_byte_value
1095
	mov	dl,al
1096
	mov	bl,[postbyte_register]
1097
	mov	[postbyte_register],0
1098
	mov	[base_code],0F6h
1099
	or	bl,bl
1100
	jz	test_al_imm
1101
	call	store_nomem_instruction
1102
	mov	al,dl
1103
	stos	byte [edi]
1104
	jmp	instruction_assembled
1105
      test_al_imm:
1106
	mov	[base_code],0A8h
1107
	call	store_instruction_code
1108
	mov	al,dl
1109
	stos	byte [edi]
1110
	jmp	instruction_assembled
1111
      test_reg_imm_16bit:
1112
	call	operand_16bit
1113
	call	get_word_value
1114
	mov	dx,ax
1115
	mov	bl,[postbyte_register]
1116
	mov	[postbyte_register],0
1117
	mov	[base_code],0F7h
1118
	or	bl,bl
1119
	jz	test_ax_imm
1120
	call	store_nomem_instruction
1121
	mov	ax,dx
1122
	call	mark_relocation
1123
	stos	word [edi]
1124
	jmp	instruction_assembled
1125
      test_ax_imm:
1126
	mov	[base_code],0A9h
1127
	call	store_instruction_code
1128
	mov	ax,dx
1129
	stos	word [edi]
1130
	jmp	instruction_assembled
1131
      test_reg_imm_32bit:
1132
	call	operand_32bit
1133
	call	get_dword_value
1134
      test_reg_imm_32bit_store:
1135
	mov	edx,eax
1136
	mov	bl,[postbyte_register]
1137
	mov	[postbyte_register],0
1138
	mov	[base_code],0F7h
1139
	or	bl,bl
1140
	jz	test_eax_imm
1141
	call	store_nomem_instruction
1142
	mov	eax,edx
1143
	call	mark_relocation
1144
	stos	dword [edi]
1145
	jmp	instruction_assembled
1146
      test_eax_imm:
1147
	mov	[base_code],0A9h
1148
	call	store_instruction_code
1149
	mov	eax,edx
1150
	stos	dword [edi]
1151
	jmp	instruction_assembled
1152
      test_reg_imm_64bit:
1153
	cmp	[size_declared],0
1154
	jne	long_immediate_not_encodable
1155
	call	operand_64bit
1156
	call	get_simm32
1157
	cmp	[value_type],4
1158
	jae	long_immediate_not_encodable
1159
	jmp	test_reg_imm_32bit_store
1160
      test_reg_mem:
1161
	call	get_address
1162
	mov	al,[operand_size]
1163
	cmp	al,1
1164
	je	test_reg_mem_8bit
1165
	call	operand_autodetect
1166
	inc	[base_code]
1167
      test_reg_mem_8bit:
1168
	call	store_instruction
1169
	jmp	instruction_assembled
1170
xchg_instruction:
1171
	mov	[base_code],86h
1172
	lods	byte [esi]
1173
	call	get_size_operator
1174
	cmp	al,10h
1175
	je	xchg_reg
1176
	cmp	al,'['
1177
	jne	invalid_operand
1178
      xchg_mem:
1179
	call	get_address
1180
	push	edx bx cx
1181
	lods	byte [esi]
1182
	cmp	al,','
1183
	jne	invalid_operand
1184
	lods	byte [esi]
1185
	call	get_size_operator
1186
	cmp	al,10h
1187
	je	test_mem_reg
1188
	jmp	invalid_operand
1189
      xchg_reg:
1190
	lods	byte [esi]
1191
	call	convert_register
1192
	mov	[postbyte_register],al
1193
	lods	byte [esi]
1194
	cmp	al,','
1195
	jne	invalid_operand
1196
	lods	byte [esi]
1197
	call	get_size_operator
1198
	cmp	al,'['
1199
	je	test_reg_mem
1200
	cmp	al,10h
1201
	jne	invalid_operand
1202
      xchg_reg_reg:
1203
	lods	byte [esi]
1204
	call	convert_register
1205
	mov	bl,al
1206
	mov	al,ah
1207
	cmp	al,1
1208
	je	xchg_reg_reg_8bit
1209
	call	operand_autodetect
1210
	cmp	[postbyte_register],0
1211
	je	xchg_ax_reg
1212
	or	bl,bl
1213
	jnz	xchg_reg_reg_store
1214
	mov	bl,[postbyte_register]
1215
      xchg_ax_reg:
1216
	cmp	[code_type],64
1217
	jne	xchg_ax_reg_ok
1218
	cmp	ah,4
1219
	jne	xchg_ax_reg_ok
1220
	or	bl,bl
1221
	jz	xchg_reg_reg_store
1222
      xchg_ax_reg_ok:
1223
	test	bl,1000b
1224
	jz	xchg_ax_reg_store
1225
	or	[rex_prefix],41h
1226
	and	bl,111b
1227
      xchg_ax_reg_store:
1228
	add	bl,90h
1229
	mov	[base_code],bl
1230
	call	store_instruction_code
1231
	jmp	instruction_assembled
1232
      xchg_reg_reg_store:
1233
	inc	[base_code]
1234
      xchg_reg_reg_8bit:
1235
	call	store_nomem_instruction
1236
	jmp	instruction_assembled
1237
push_instruction:
1238
	mov	[extended_code],al
1239
      push_next:
1240
	lods	byte [esi]
1241
	call	get_size_operator
1242
	cmp	al,10h
1243
	je	push_reg
1244
	cmp	al,'('
1245
	je	push_imm
1246
	cmp	al,'['
1247
	jne	invalid_operand
1248
      push_mem:
1249
	call	get_address
1250
	mov	al,[operand_size]
1251
	mov	ah,[extended_code]
1252
	cmp	al,2
1253
	je	push_mem_16bit
1254
	cmp	al,4
1255
	je	push_mem_32bit
1256
	cmp	al,8
1257
	je	push_mem_64bit
1258
	or	al,al
1259
	jnz	invalid_operand_size
1260
	cmp	ah,2
1261
	je	push_mem_16bit
1262
	cmp	ah,4
1263
	je	push_mem_32bit
1264
	cmp	ah,8
1265
	je	push_mem_64bit
1266
	cmp	[error_line],0
1267
	jne	push_mem_store
1268
	mov	eax,[current_line]
1269
	mov	[error_line],eax
1270
	mov	[error],operand_size_not_specified
1271
	jmp	push_mem_store
1272
      push_mem_16bit:
1273
	test	ah,not 2
1274
	jnz	invalid_operand_size
1275
	call	operand_16bit
1276
	jmp	push_mem_store
1277
      push_mem_32bit:
1278
	test	ah,not 4
1279
	jnz	invalid_operand_size
1280
	cmp	[code_type],64
1281
	je	illegal_instruction
1282
	call	operand_32bit
1283
	jmp	push_mem_store
1284
      push_mem_64bit:
1285
	test	ah,not 8
1286
	jnz	invalid_operand_size
1287
	cmp	[code_type],64
1288
	jne	illegal_instruction
1289
      push_mem_store:
1290
	mov	[base_code],0FFh
1291
	mov	[postbyte_register],110b
1292
	call	store_instruction
1293
	jmp	push_done
1294
      push_reg:
1295
	lods	byte [esi]
1296
	mov	ah,al
1297
	sub	ah,10h
1298
	and	ah,al
1299
	test	ah,0F0h
1300
	jnz	push_sreg
1301
	call	convert_register
1302
	test	al,1000b
1303
	jz	push_reg_ok
1304
	or	[rex_prefix],41h
1305
	and	al,111b
1306
      push_reg_ok:
1307
	add	al,50h
1308
	mov	[base_code],al
1309
	mov	al,ah
1310
	mov	ah,[extended_code]
1311
	cmp	al,2
1312
	je	push_reg_16bit
1313
	cmp	al,4
1314
	je	push_reg_32bit
1315
	cmp	al,8
1316
	jne	invalid_operand_size
1317
      push_reg_64bit:
1318
	test	ah,not 8
1319
	jnz	invalid_operand_size
1320
	cmp	[code_type],64
1321
	jne	illegal_instruction
1322
	jmp	push_reg_store
1323
      push_reg_32bit:
1324
	test	ah,not 4
1325
	jnz	invalid_operand_size
1326
	cmp	[code_type],64
1327
	je	illegal_instruction
1328
	call	operand_32bit
1329
	jmp	push_reg_store
1330
      push_reg_16bit:
1331
	test	ah,not 2
1332
	jnz	invalid_operand_size
1333
	call	operand_16bit
1334
      push_reg_store:
1335
	call	store_instruction_code
1336
	jmp	push_done
1337
      push_sreg:
1338
	mov	bl,al
1339
	mov	dl,[operand_size]
1340
	mov	dh,[extended_code]
1341
	cmp	dl,2
1342
	je	push_sreg16
1343
	cmp	dl,4
1344
	je	push_sreg32
1345
	cmp	dl,8
1346
	je	push_sreg64
1347
	or	dl,dl
1348
	jnz	invalid_operand_size
1349
	cmp	dh,2
1350
	je	push_sreg16
1351
	cmp	dh,4
1352
	je	push_sreg32
1353
	cmp	dh,8
1354
	je	push_sreg64
1355
	jmp	push_sreg_store
1356
      push_sreg16:
1357
	test	dh,not 2
1358
	jnz	invalid_operand_size
1359
	call	operand_16bit
1360
	jmp	push_sreg_store
1361
      push_sreg32:
1362
	test	dh,not 4
1363
	jnz	invalid_operand_size
1364
	cmp	[code_type],64
1365
	je	illegal_instruction
1366
	call	operand_32bit
1367
	jmp	push_sreg_store
1368
      push_sreg64:
1369
	test	dh,not 8
1370
	jnz	invalid_operand_size
1371
	cmp	[code_type],64
1372
	jne	illegal_instruction
1373
      push_sreg_store:
1374
	mov	al,bl
1375
	cmp	al,70h
1376
	jae	invalid_operand
1377
	sub	al,61h
1378
	cmp	al,4
1379
	jae	push_sreg_386
1380
	shl	al,3
1381
	add	al,6
1382
	mov	[base_code],al
1383
	cmp	[code_type],64
1384
	je	illegal_instruction
1385
	jmp	push_reg_store
1386
      push_sreg_386:
1387
	sub	al,4
1388
	shl	al,3
1389
	add	al,0A0h
1390
	mov	[extended_code],al
1391
	mov	[base_code],0Fh
1392
	jmp	push_reg_store
1393
      push_imm:
1394
	mov	al,[operand_size]
1395
	mov	ah,[extended_code]
1396
	or	al,al
1397
	je	push_imm_size_ok
1398
	or	ah,ah
1399
	je	push_imm_size_ok
1400
	cmp	al,ah
1401
	jne	invalid_operand_size
1402
      push_imm_size_ok:
1403
	cmp	al,2
1404
	je	push_imm_16bit
1405
	cmp	al,4
1406
	je	push_imm_32bit
1407
	cmp	al,8
1408
	je	push_imm_64bit
1409
	cmp	ah,2
1410
	je	push_imm_optimized_16bit
1411
	cmp	ah,4
1412
	je	push_imm_optimized_32bit
1413
	cmp	ah,8
1414
	je	push_imm_optimized_64bit
1415
	or	al,al
1416
	jnz	invalid_operand_size
1417
	cmp	[code_type],16
1418
	je	push_imm_optimized_16bit
1419
	cmp	[code_type],32
1420
	je	push_imm_optimized_32bit
1421
      push_imm_optimized_64bit:
1422
	cmp	[code_type],64
1423
	jne	illegal_instruction
1424
	call	get_simm32
1425
	mov	edx,eax
1426
	cmp	[value_type],0
1427
	jne	push_imm_32bit_store
1428
	cmp	eax,-80h
1429
	jl	push_imm_32bit_store
1430
	cmp	eax,80h
1431
	jge	push_imm_32bit_store
1432
	jmp	push_imm_8bit
1433
      push_imm_optimized_32bit:
1434
	cmp	[code_type],64
1435
	je	illegal_instruction
1436
	call	get_dword_value
1437
	mov	edx,eax
1438
	cmp	[value_type],0
1439
	jne	push_imm_32bit_store
1440
	cmp	eax,-80h
1441
	jl	push_imm_32bit_store
1442
	cmp	eax,80h
1443
	jge	push_imm_32bit_store
1444
	call	operand_32bit
1445
	jmp	push_imm_8bit
1446
      push_imm_optimized_16bit:
1447
	call	get_word_value
1448
	mov	dx,ax
1449
	cmp	[value_type],0
1450
	jne	push_imm_16bit_store
1451
	cmp	ax,-80h
1452
	jl	push_imm_16bit_store
1453
	cmp	ax,80h
1454
	jge	push_imm_16bit_store
1455
	call	operand_16bit
1456
      push_imm_8bit:
1457
	mov	ah,al
1458
	mov	al,6Ah
1459
	stos	word [edi]
1460
	jmp	push_done
1461
      push_imm_16bit:
1462
	call	get_word_value
1463
	mov	dx,ax
1464
	call	operand_16bit
1465
      push_imm_16bit_store:
1466
	mov	[base_code],68h
1467
	call	store_instruction_code
1468
	mov	ax,dx
1469
	call	mark_relocation
1470
	stos	word [edi]
1471
	jmp	push_done
1472
      push_imm_64bit:
1473
	cmp	[code_type],64
1474
	jne	illegal_instruction
1475
	call	get_simm32
1476
	mov	edx,eax
1477
	jmp	push_imm_32bit_store
1478
      push_imm_32bit:
1479
	cmp	[code_type],64
1480
	je	illegal_instruction
1481
	call	get_dword_value
1482
	mov	edx,eax
1483
	call	operand_32bit
1484
      push_imm_32bit_store:
1485
	mov	[base_code],68h
1486
	call	store_instruction_code
1487
	mov	eax,edx
1488
	call	mark_relocation
1489
	stos	dword [edi]
1490
      push_done:
1491
	lods	byte [esi]
1492
	dec	esi
1493
	cmp	al,0Fh
1494
	je	instruction_assembled
1495
	or	al,al
1496
	jz	instruction_assembled
1497
	mov	[operand_size],0
1498
	mov	[size_override],0
1499
	mov	[operand_prefix],0
1500
	mov	[rex_prefix],0
1501
	jmp	push_next
1502
pop_instruction:
1503
	mov	[extended_code],al
1504
      pop_next:
1505
	lods	byte [esi]
1506
	call	get_size_operator
1507
	cmp	al,10h
1508
	je	pop_reg
1509
	cmp	al,'['
1510
	jne	invalid_operand
1511
      pop_mem:
1512
	call	get_address
1513
	mov	al,[operand_size]
1514
	mov	ah,[extended_code]
1515
	cmp	al,2
1516
	je	pop_mem_16bit
1517
	cmp	al,4
1518
	je	pop_mem_32bit
1519
	cmp	al,8
1520
	je	pop_mem_64bit
1521
	or	al,al
1522
	jnz	invalid_operand_size
1523
	cmp	ah,2
1524
	je	pop_mem_16bit
1525
	cmp	ah,4
1526
	je	pop_mem_32bit
1527
	cmp	ah,8
1528
	je	pop_mem_64bit
1529
	cmp	[error_line],0
1530
	jne	pop_mem_store
1531
	mov	eax,[current_line]
1532
	mov	[error_line],eax
1533
	mov	[error],operand_size_not_specified
1534
	jmp	pop_mem_store
1535
      pop_mem_16bit:
1536
	test	ah,not 2
1537
	jnz	invalid_operand_size
1538
	call	operand_16bit
1539
	jmp	pop_mem_store
1540
      pop_mem_32bit:
1541
	test	ah,not 4
1542
	jnz	invalid_operand_size
1543
	cmp	[code_type],64
1544
	je	illegal_instruction
1545
	call	operand_32bit
1546
	jmp	pop_mem_store
1547
      pop_mem_64bit:
1548
	test	ah,not 8
1549
	jnz	invalid_operand_size
1550
	cmp	[code_type],64
1551
	jne	illegal_instruction
1552
      pop_mem_store:
1553
	mov	[base_code],08Fh
1554
	mov	[postbyte_register],0
1555
	call	store_instruction
1556
	jmp	pop_done
1557
      pop_reg:
1558
	lods	byte [esi]
1559
	mov	ah,al
1560
	sub	ah,10h
1561
	and	ah,al
1562
	test	ah,0F0h
1563
	jnz	pop_sreg
1564
	call	convert_register
1565
	test	al,1000b
1566
	jz	pop_reg_ok
1567
	or	[rex_prefix],41h
1568
	and	al,111b
1569
      pop_reg_ok:
1570
	add	al,58h
1571
	mov	[base_code],al
1572
	mov	al,ah
1573
	mov	ah,[extended_code]
1574
	cmp	al,2
1575
	je	pop_reg_16bit
1576
	cmp	al,4
1577
	je	pop_reg_32bit
1578
	cmp	al,8
1579
	je	pop_reg_64bit
1580
	jmp	invalid_operand_size
1581
      pop_reg_64bit:
1582
	test	ah,not 8
1583
	jnz	invalid_operand_size
1584
	cmp	[code_type],64
1585
	jne	illegal_instruction
1586
	jmp	pop_reg_store
1587
      pop_reg_32bit:
1588
	test	ah,not 4
1589
	jnz	invalid_operand_size
1590
	cmp	[code_type],64
1591
	je	illegal_instruction
1592
	call	operand_32bit
1593
	jmp	pop_reg_store
1594
      pop_reg_16bit:
1595
	test	ah,not 2
1596
	jnz	invalid_operand_size
1597
	call	operand_16bit
1598
      pop_reg_store:
1599
	call	store_instruction_code
1600
      pop_done:
1601
	lods	byte [esi]
1602
	dec	esi
1603
	cmp	al,0Fh
1604
	je	instruction_assembled
1605
	or	al,al
1606
	jz	instruction_assembled
1607
	mov	[operand_size],0
1608
	mov	[size_override],0
1609
	mov	[operand_prefix],0
1610
	mov	[rex_prefix],0
1611
	jmp	pop_next
1612
      pop_sreg:
1613
	mov	bl,al
1614
	mov	dl,[operand_size]
1615
	mov	dh,[extended_code]
1616
	cmp	dl,2
1617
	je	pop_sreg16
1618
	cmp	dl,4
1619
	je	pop_sreg32
1620
	cmp	dl,8
1621
	je	pop_sreg64
1622
	or	dl,dl
1623
	jnz	invalid_operand_size
1624
	cmp	dh,2
1625
	je	pop_sreg16
1626
	cmp	dh,4
1627
	je	pop_sreg32
1628
	cmp	dh,8
1629
	je	pop_sreg64
1630
	jmp	pop_sreg_store
1631
      pop_sreg16:
1632
	test	dh,not 2
1633
	jnz	invalid_operand_size
1634
	call	operand_16bit
1635
	jmp	pop_sreg_store
1636
      pop_sreg32:
1637
	test	dh,not 4
1638
	jnz	invalid_operand_size
1639
	cmp	[code_type],64
1640
	je	illegal_instruction
1641
	call	operand_32bit
1642
	jmp	pop_sreg_store
1643
      pop_sreg64:
1644
	test	dh,not 8
1645
	jnz	invalid_operand_size
1646
	cmp	[code_type],64
1647
	jne	illegal_instruction
1648
      pop_sreg_store:
1649
	mov	al,bl
1650
	cmp	al,70h
1651
	jae	invalid_operand
1652
	sub	al,61h
1653
	cmp	al,4
1654
	jae	pop_sreg_386
1655
	shl	al,3
1656
	add	al,7
1657
	mov	[base_code],al
1658
	cmp	[code_type],64
1659
	je	illegal_instruction
1660
	jmp	pop_reg_store
1661
      pop_sreg_386:
1662
	sub	al,4
1663
	shl	al,3
1664
	add	al,0A1h
1665
	mov	[extended_code],al
1666
	mov	[base_code],0Fh
1667
	jmp	pop_reg_store
1668
inc_instruction:
1669
	mov	[base_code],al
1670
	lods	byte [esi]
1671
	call	get_size_operator
1672
	cmp	al,10h
1673
	je	inc_reg
1674
	cmp	al,'['
1675
	je	inc_mem
1676
	jne	invalid_operand
1677
      inc_mem:
1678
	call	get_address
1679
	mov	al,[operand_size]
1680
	cmp	al,1
1681
	je	inc_mem_8bit
1682
	jb	inc_mem_nosize
1683
	call	operand_autodetect
1684
	mov	al,0FFh
1685
	xchg	al,[base_code]
1686
	mov	[postbyte_register],al
1687
	call	store_instruction
1688
	jmp	instruction_assembled
1689
      inc_mem_nosize:
1690
	cmp	[error_line],0
1691
	jne	inc_mem_8bit
1692
	mov	eax,[current_line]
1693
	mov	[error_line],eax
1694
	mov	[error],operand_size_not_specified
1695
      inc_mem_8bit:
1696
	mov	al,0FEh
1697
	xchg	al,[base_code]
1698
	mov	[postbyte_register],al
1699
	call	store_instruction
1700
	jmp	instruction_assembled
1701
      inc_reg:
1702
	lods	byte [esi]
1703
	call	convert_register
1704
	mov	bl,al
1705
	mov	al,0FEh
1706
	xchg	al,[base_code]
1707
	mov	[postbyte_register],al
1708
	mov	al,ah
1709
	cmp	al,1
1710
	je	inc_reg_8bit
1711
	call	operand_autodetect
1712
	cmp	[code_type],64
1713
	je	inc_reg_long_form
1714
	mov	al,[postbyte_register]
1715
	shl	al,3
1716
	add	al,bl
1717
	add	al,40h
1718
	mov	[base_code],al
1719
	call	store_instruction_code
1720
	jmp	instruction_assembled
1721
      inc_reg_long_form:
1722
	inc	[base_code]
1723
      inc_reg_8bit:
1724
	call	store_nomem_instruction
1725
	jmp	instruction_assembled
1726
set_instruction:
1727
	mov	[base_code],0Fh
1728
	mov	[extended_code],al
1729
	lods	byte [esi]
1730
	call	get_size_operator
1731
	cmp	al,10h
1732
	je	set_reg
1733
	cmp	al,'['
1734
	jne	invalid_operand
1735
      set_mem:
1736
	call	get_address
1737
	cmp	[operand_size],1
1738
	ja	invalid_operand_size
1739
	mov	[postbyte_register],0
1740
	call	store_instruction
1741
	jmp	instruction_assembled
1742
      set_reg:
1743
	lods	byte [esi]
1744
	call	convert_register
1745
	cmp	ah,1
1746
	jne	invalid_operand_size
1747
	mov	bl,al
1748
	mov	[postbyte_register],0
1749
	call	store_nomem_instruction
1750
	jmp	instruction_assembled
1751
arpl_instruction:
1752
	cmp	[code_type],64
1753
	je	illegal_instruction
1754
	mov	[base_code],63h
1755
	lods	byte [esi]
1756
	call	get_size_operator
1757
	cmp	al,10h
1758
	je	arpl_reg
1759
	cmp	al,'['
1760
	jne	invalid_operand
1761
	call	get_address
1762
	lods	byte [esi]
1763
	cmp	al,','
1764
	jne	invalid_operand
1765
	lods	byte [esi]
1766
	cmp	al,10h
1767
	jne	invalid_operand
1768
	lods	byte [esi]
1769
	call	convert_register
1770
	mov	[postbyte_register],al
1771
	cmp	ah,2
1772
	jne	invalid_operand_size
1773
	call	store_instruction
1774
	jmp	instruction_assembled
1775
      arpl_reg:
1776
	lods	byte [esi]
1777
	call	convert_register
1778
	cmp	ah,2
1779
	jne	invalid_operand_size
1780
	mov	bl,al
1781
	lods	byte [esi]
1782
	cmp	al,','
1783
	jne	invalid_operand
1784
	lods	byte [esi]
1785
	cmp	al,10h
1786
	jne	invalid_operand
1787
	lods	byte [esi]
1788
	call	convert_register
1789
	cmp	ah,2
1790
	jne	invalid_operand_size
1791
	mov	[postbyte_register],al
1792
	call	store_nomem_instruction
1793
	jmp	instruction_assembled
1794
bound_instruction:
1795
	cmp	[code_type],64
1796
	je	illegal_instruction
1797
	lods	byte [esi]
1798
	call	get_size_operator
1799
	cmp	al,10h
1800
	jne	invalid_operand
1801
	lods	byte [esi]
1802
	call	convert_register
1803
	mov	[postbyte_register],al
1804
	lods	byte [esi]
1805
	cmp	al,','
1806
	jne	invalid_operand
1807
	lods	byte [esi]
1808
	call	get_size_operator
1809
	cmp	al,'['
1810
	jne	invalid_operand
1811
	call	get_address
1812
	mov	al,[operand_size]
1813
	cmp	al,2
1814
	je	bound_16bit
1815
	cmp	al,4
1816
	je	bound_32bit
1817
	jmp	invalid_operand_size
1818
      bound_32bit:
1819
	call	operand_32bit
1820
	mov	[base_code],62h
1821
	call	store_instruction
1822
	jmp	instruction_assembled
1823
      bound_16bit:
1824
	call	operand_16bit
1825
	mov	[base_code],62h
1826
	call	store_instruction
1827
	jmp	instruction_assembled
1828
enter_instruction:
1829
	lods	byte [esi]
1830
	call	get_size_operator
1831
	cmp	ah,2
1832
	je	enter_imm16_size_ok
1833
	or	ah,ah
1834
	jnz	invalid_operand_size
1835
      enter_imm16_size_ok:
1836
	cmp	al,'('
1837
	jne	invalid_operand
1838
	call	get_word_value
1839
	cmp	[next_pass_needed],0
1840
	jne	enter_imm16_ok
1841
	cmp	[value_type],0
1842
	jne	invalid_use_of_symbol
1843
      enter_imm16_ok:
1844
	push	eax
1845
	mov	[operand_size],0
1846
	lods	byte [esi]
1847
	cmp	al,','
1848
	jne	invalid_operand
1849
	lods	byte [esi]
1850
	call	get_size_operator
1851
	cmp	ah,1
1852
	je	enter_imm8_size_ok
1853
	or	ah,ah
1854
	jnz	invalid_operand_size
1855
      enter_imm8_size_ok:
1856
	cmp	al,'('
1857
	jne	invalid_operand
1858
	call	get_byte_value
1859
	mov	dl,al
1860
	pop	ebx
1861
	mov	al,0C8h
1862
	stos	byte [edi]
1863
	mov	ax,bx
1864
	stos	word [edi]
1865
	mov	al,dl
1866
	stos	byte [edi]
1867
	jmp	instruction_assembled
1868
ret_instruction_only64:
1869
	cmp	[code_type],64
1870
	jne	illegal_instruction
1871
	jmp	ret_instruction
1872
ret_instruction_32bit_except64:
1873
	cmp	[code_type],64
1874
	je	illegal_instruction
1875
ret_instruction_32bit:
1876
	call	operand_32bit
1877
	jmp	ret_instruction
1878
ret_instruction_16bit:
1879
	call	operand_16bit
1880
	jmp	ret_instruction
1881
retf_instruction:
1882
	cmp	[code_type],64
1883
	jne	ret_instruction
1884
ret_instruction_64bit:
1885
	call	operand_64bit
1886
ret_instruction:
1887
	mov	[base_code],al
1888
	lods	byte [esi]
1889
	dec	esi
1890
	or	al,al
1891
	jz	simple_ret
1892
	cmp	al,0Fh
1893
	je	simple_ret
1894
	lods	byte [esi]
1895
	call	get_size_operator
1896
	or	ah,ah
1897
	jz	ret_imm
1898
	cmp	ah,2
1899
	je	ret_imm
1900
	jmp	invalid_operand_size
1901
      ret_imm:
1902
	cmp	al,'('
1903
	jne	invalid_operand
1904
	call	get_word_value
1905
	cmp	[next_pass_needed],0
1906
	jne	ret_imm_ok
1907
	cmp	[value_type],0
1908
	jne	invalid_use_of_symbol
1909
      ret_imm_ok:
1910
	mov	dx,ax
1911
	call	store_instruction_code
1912
	mov	ax,dx
1913
	stos	word [edi]
1914
	jmp	instruction_assembled
1915
      simple_ret:
1916
	inc	[base_code]
1917
	call	store_instruction_code
1918
	jmp	instruction_assembled
1919
lea_instruction:
1920
	mov	[base_code],8Dh
1921
	lods	byte [esi]
1922
	call	get_size_operator
1923
	cmp	al,10h
1924
	jne	invalid_operand
1925
	lods	byte [esi]
1926
	call	convert_register
1927
	mov	[postbyte_register],al
1928
	lods	byte [esi]
1929
	cmp	al,','
1930
	jne	invalid_operand
1931
	xor	al,al
1932
	xchg	al,[operand_size]
1933
	push	eax
1934
	lods	byte [esi]
1935
	call	get_size_operator
1936
	cmp	al,'['
1937
	jne	invalid_operand
1938
	call	get_address
1939
	pop	eax
1940
	call	operand_autodetect
1941
	call	store_instruction
1942
	jmp	instruction_assembled
1943
ls_instruction:
1944
	or	al,al
1945
	jz	les_instruction
1946
	cmp	al,3
1947
	jz	lds_instruction
1948
	add	al,0B0h
1949
	mov	[extended_code],al
1950
	mov	[base_code],0Fh
1951
	jmp	ls_code_ok
1952
      les_instruction:
1953
	mov	[base_code],0C4h
1954
	jmp	ls_short_code
1955
      lds_instruction:
1956
	mov	[base_code],0C5h
1957
      ls_short_code:
1958
	cmp	[code_type],64
1959
	je	illegal_instruction
1960
      ls_code_ok:
1961
	lods	byte [esi]
1962
	call	get_size_operator
1963
	cmp	al,10h
1964
	jne	invalid_operand
1965
	lods	byte [esi]
1966
	call	convert_register
1967
	mov	[postbyte_register],al
1968
	lods	byte [esi]
1969
	cmp	al,','
1970
	jne	invalid_operand
1971
	add	[operand_size],2
1972
	lods	byte [esi]
1973
	call	get_size_operator
1974
	cmp	al,'['
1975
	jne	invalid_operand
1976
	call	get_address
1977
	mov	al,[operand_size]
1978
	cmp	al,4
1979
	je	ls_16bit
1980
	cmp	al,6
1981
	je	ls_32bit
1982
	cmp	al,10
1983
	je	ls_64bit
1984
	jmp	invalid_operand_size
1985
      ls_16bit:
1986
	call	operand_16bit
1987
	call	store_instruction
1988
	jmp	instruction_assembled
1989
      ls_32bit:
1990
	call	operand_32bit
1991
	call	store_instruction
1992
	jmp	instruction_assembled
1993
      ls_64bit:
1994
	call	operand_64bit
1995
	call	store_instruction
1996
	jmp	instruction_assembled
1997
sh_instruction:
1998
	mov	[postbyte_register],al
1999
	lods	byte [esi]
2000
	call	get_size_operator
2001
	cmp	al,10h
2002
	je	sh_reg
2003
	cmp	al,'['
2004
	jne	invalid_operand
2005
      sh_mem:
2006
	call	get_address
2007
	push	edx bx cx
2008
	mov	al,[operand_size]
2009
	push	eax
2010
	mov	[operand_size],0
2011
	lods	byte [esi]
2012
	cmp	al,','
2013
	jne	invalid_operand
2014
	lods	byte [esi]
2015
	call	get_size_operator
2016
	cmp	al,'('
2017
	je	sh_mem_imm
2018
	cmp	al,10h
2019
	jne	invalid_operand
2020
      sh_mem_reg:
2021
	lods	byte [esi]
2022
	cmp	al,11h
2023
	jne	invalid_operand
2024
	pop	eax cx bx edx
2025
	cmp	al,1
2026
	je	sh_mem_cl_8bit
2027
	jb	sh_mem_cl_nosize
2028
	call	operand_autodetect
2029
	mov	[base_code],0D3h
2030
	call	store_instruction
2031
	jmp	instruction_assembled
2032
      sh_mem_cl_nosize:
2033
	cmp	[error_line],0
2034
	jne	sh_mem_cl_8bit
2035
	mov	eax,[current_line]
2036
	mov	[error_line],eax
2037
	mov	[error],operand_size_not_specified
2038
      sh_mem_cl_8bit:
2039
	mov	[base_code],0D2h
2040
	call	store_instruction
2041
	jmp	instruction_assembled
2042
      sh_mem_imm:
2043
	mov	al,[operand_size]
2044
	or	al,al
2045
	jz	sh_mem_imm_size_ok
2046
	cmp	al,1
2047
	jne	invalid_operand_size
2048
      sh_mem_imm_size_ok:
2049
	call	get_byte_value
2050
	mov	byte [value],al
2051
	pop	eax cx bx edx
2052
	cmp	al,1
2053
	je	sh_mem_imm_8bit
2054
	jb	sh_mem_imm_nosize
2055
	call	operand_autodetect
2056
	cmp	byte [value],1
2057
	je	sh_mem_1
2058
	mov	[base_code],0C1h
2059
	call	store_instruction_with_imm8
2060
	jmp	instruction_assembled
2061
      sh_mem_1:
2062
	mov	[base_code],0D1h
2063
	call	store_instruction
2064
	jmp	instruction_assembled
2065
      sh_mem_imm_nosize:
2066
	cmp	[error_line],0
2067
	jne	sh_mem_imm_8bit
2068
	mov	eax,[current_line]
2069
	mov	[error_line],eax
2070
	mov	[error],operand_size_not_specified
2071
      sh_mem_imm_8bit:
2072
	cmp	byte [value],1
2073
	je	sh_mem_1_8bit
2074
	mov	[base_code],0C0h
2075
	call	store_instruction_with_imm8
2076
	jmp	instruction_assembled
2077
      sh_mem_1_8bit:
2078
	mov	[base_code],0D0h
2079
	call	store_instruction
2080
	jmp	instruction_assembled
2081
      sh_reg:
2082
	lods	byte [esi]
2083
	call	convert_register
2084
	mov	bx,ax
2085
	mov	[operand_size],0
2086
	lods	byte [esi]
2087
	cmp	al,','
2088
	jne	invalid_operand
2089
	lods	byte [esi]
2090
	call	get_size_operator
2091
	cmp	al,'('
2092
	je	sh_reg_imm
2093
	cmp	al,10h
2094
	jne	invalid_operand
2095
      sh_reg_reg:
2096
	lods	byte [esi]
2097
	cmp	al,11h
2098
	jne	invalid_operand
2099
	mov	al,bh
2100
	cmp	al,1
2101
	je	sh_reg_cl_8bit
2102
	call	operand_autodetect
2103
	mov	[base_code],0D3h
2104
	call	store_nomem_instruction
2105
	jmp	instruction_assembled
2106
      sh_reg_cl_8bit:
2107
	mov	[base_code],0D2h
2108
	call	store_nomem_instruction
2109
	jmp	instruction_assembled
2110
      sh_reg_imm:
2111
	mov	al,[operand_size]
2112
	or	al,al
2113
	jz	sh_reg_imm_size_ok
2114
	cmp	al,1
2115
	jne	invalid_operand_size
2116
      sh_reg_imm_size_ok:
2117
	push	ebx
2118
	call	get_byte_value
2119
	mov	dl,al
2120
	pop	ebx
2121
	mov	al,bh
2122
	cmp	al,1
2123
	je	sh_reg_imm_8bit
2124
	call	operand_autodetect
2125
	cmp	dl,1
2126
	je	sh_reg_1
2127
	mov	[base_code],0C1h
2128
	call	store_nomem_instruction
2129
	mov	al,dl
2130
	stos	byte [edi]
2131
	jmp	instruction_assembled
2132
      sh_reg_1:
2133
	mov	[base_code],0D1h
2134
	call	store_nomem_instruction
2135
	jmp	instruction_assembled
2136
      sh_reg_imm_8bit:
2137
	cmp	dl,1
2138
	je	sh_reg_1_8bit
2139
	mov	[base_code],0C0h
2140
	call	store_nomem_instruction
2141
	mov	al,dl
2142
	stos	byte [edi]
2143
	jmp	instruction_assembled
2144
      sh_reg_1_8bit:
2145
	mov	[base_code],0D0h
2146
	call	store_nomem_instruction
2147
	jmp	instruction_assembled
2148
shd_instruction:
2149
	mov	[base_code],0Fh
2150
	mov	[extended_code],al
2151
	lods	byte [esi]
2152
	call	get_size_operator
2153
	cmp	al,10h
2154
	je	shd_reg
2155
	cmp	al,'['
2156
	jne	invalid_operand
2157
      shd_mem:
2158
	call	get_address
2159
	push	edx bx cx
2160
	lods	byte [esi]
2161
	cmp	al,','
2162
	jne	invalid_operand
2163
	lods	byte [esi]
2164
	call	get_size_operator
2165
	cmp	al,10h
2166
	jne	invalid_operand
2167
	lods	byte [esi]
2168
	call	convert_register
2169
	mov	[postbyte_register],al
2170
	lods	byte [esi]
2171
	cmp	al,','
2172
	jne	invalid_operand
2173
	mov	al,ah
2174
	mov	[operand_size],0
2175
	push	eax
2176
	lods	byte [esi]
2177
	call	get_size_operator
2178
	cmp	al,'('
2179
	je	shd_mem_reg_imm
2180
	cmp	al,10h
2181
	jne	invalid_operand
2182
	lods	byte [esi]
2183
	cmp	al,11h
2184
	jne	invalid_operand
2185
	pop	eax cx bx edx
2186
	call	operand_autodetect
2187
	inc	[extended_code]
2188
	call	store_instruction
2189
	jmp	instruction_assembled
2190
      shd_mem_reg_imm:
2191
	mov	al,[operand_size]
2192
	or	al,al
2193
	jz	shd_mem_reg_imm_size_ok
2194
	cmp	al,1
2195
	jne	invalid_operand_size
2196
      shd_mem_reg_imm_size_ok:
2197
	call	get_byte_value
2198
	mov	byte [value],al
2199
	pop	eax cx bx edx
2200
	call	operand_autodetect
2201
	call	store_instruction_with_imm8
2202
	jmp	instruction_assembled
2203
      shd_reg:
2204
	lods	byte [esi]
2205
	call	convert_register
2206
	mov	[postbyte_register],al
2207
	lods	byte [esi]
2208
	cmp	al,','
2209
	jne	invalid_operand
2210
	lods	byte [esi]
2211
	call	get_size_operator
2212
	cmp	al,10h
2213
	jne	invalid_operand
2214
	lods	byte [esi]
2215
	call	convert_register
2216
	mov	bl,[postbyte_register]
2217
	mov	[postbyte_register],al
2218
	mov	al,ah
2219
	push	eax ebx
2220
	lods	byte [esi]
2221
	cmp	al,','
2222
	jne	invalid_operand
2223
	mov	[operand_size],0
2224
	lods	byte [esi]
2225
	call	get_size_operator
2226
	cmp	al,'('
2227
	je	shd_reg_reg_imm
2228
	cmp	al,10h
2229
	jne	invalid_operand
2230
	lods	byte [esi]
2231
	cmp	al,11h
2232
	jne	invalid_operand
2233
	pop	ebx eax
2234
	call	operand_autodetect
2235
	inc	[extended_code]
2236
	call	store_nomem_instruction
2237
	jmp	instruction_assembled
2238
      shd_reg_reg_imm:
2239
	mov	al,[operand_size]
2240
	or	al,al
2241
	jz	shd_reg_reg_imm_size_ok
2242
	cmp	al,1
2243
	jne	invalid_operand_size
2244
      shd_reg_reg_imm_size_ok:
2245
	call	get_byte_value
2246
	mov	dl,al
2247
	pop	ebx eax
2248
	call	operand_autodetect
2249
	call	store_nomem_instruction
2250
	mov	al,dl
2251
	stos	byte [edi]
2252
	jmp	instruction_assembled
2253
movx_instruction:
2254
	mov	[base_code],0Fh
2255
	mov	[extended_code],al
2256
	lods	byte [esi]
2257
	call	get_size_operator
2258
	cmp	al,10h
2259
	jne	invalid_operand
2260
	lods	byte [esi]
2261
	call	convert_register
2262
	mov	[postbyte_register],al
2263
	mov	al,ah
2264
	push	eax
2265
	lods	byte [esi]
2266
	cmp	al,','
2267
	jne	invalid_operand
2268
	mov	[operand_size],0
2269
	lods	byte [esi]
2270
	call	get_size_operator
2271
	cmp	al,10h
2272
	je	movx_reg
2273
	cmp	al,'['
2274
	jne	invalid_operand
2275
	call	get_address
2276
	pop	eax
2277
	mov	ah,[operand_size]
2278
	cmp	ah,al
2279
	jae	invalid_operand_size
2280
	cmp	ah,1
2281
	je	movx_mem_8bit
2282
	cmp	ah,2
2283
	je	movx_mem_16bit
2284
	or	ah,ah
2285
	jnz	invalid_operand_size
2286
	cmp	[error_line],0
2287
	jne	movx_mem_8bit
2288
	mov	eax,[current_line]
2289
	mov	[error_line],eax
2290
	mov	[error],operand_size_not_specified
2291
      movx_mem_8bit:
2292
	call	operand_autodetect
2293
	call	store_instruction
2294
	jmp	instruction_assembled
2295
      movx_mem_16bit:
2296
	inc	[extended_code]
2297
	call	operand_autodetect
2298
	call	store_instruction
2299
	jmp	instruction_assembled
2300
      movx_reg:
2301
	lods	byte [esi]
2302
	call	convert_register
2303
	pop	ebx
2304
	xchg	bl,al
2305
	cmp	ah,al
2306
	jae	invalid_operand_size
2307
	cmp	ah,1
2308
	je	movx_reg_8bit
2309
	cmp	ah,2
2310
	je	movx_reg_16bit
2311
	jmp	invalid_operand_size
2312
      movx_reg_8bit:
2313
	call	operand_autodetect
2314
	call	store_nomem_instruction
2315
	jmp	instruction_assembled
2316
      movx_reg_16bit:
2317
	call	operand_autodetect
2318
	inc	[extended_code]
2319
	call	store_nomem_instruction
2320
	jmp	instruction_assembled
2321
movsxd_instruction:
2322
	mov	[base_code],al
2323
	lods	byte [esi]
2324
	call	get_size_operator
2325
	cmp	al,10h
2326
	jne	invalid_operand
2327
	lods	byte [esi]
2328
	call	convert_register
2329
	mov	[postbyte_register],al
2330
	cmp	ah,8
2331
	jne	invalid_operand_size
2332
	lods	byte [esi]
2333
	cmp	al,','
2334
	jne	invalid_operand
2335
	mov	[operand_size],0
2336
	lods	byte [esi]
2337
	call	get_size_operator
2338
	cmp	al,10h
2339
	je	movsxd_reg
2340
	cmp	al,'['
2341
	jne	invalid_operand
2342
	call	get_address
2343
	cmp	[operand_size],4
2344
	je	movsxd_mem_store
2345
	cmp	[operand_size],0
2346
	jne	invalid_operand_size
2347
      movsxd_mem_store:
2348
	call	operand_64bit
2349
	call	store_instruction
2350
	jmp	instruction_assembled
2351
      movsxd_reg:
2352
	lods	byte [esi]
2353
	call	convert_register
2354
	cmp	ah,4
2355
	jne	invalid_operand_size
2356
	call	operand_64bit
2357
	call	store_nomem_instruction
2358
	jmp	instruction_assembled
2359
bt_instruction:
2360
	mov	[postbyte_register],al
2361
	shl	al,3
2362
	add	al,83h
2363
	mov	[extended_code],al
2364
	mov	[base_code],0Fh
2365
	lods	byte [esi]
2366
	call	get_size_operator
2367
	cmp	al,10h
2368
	je	bt_reg
2369
	cmp	al,'['
2370
	jne	invalid_operand
2371
	call	get_address
2372
	push	eax bx cx
2373
	lods	byte [esi]
2374
	cmp	al,','
2375
	jne	invalid_operand
2376
	cmp	byte [esi],'('
2377
	je	bt_mem_imm
2378
	cmp	byte [esi],11h
2379
	jne	bt_mem_reg
2380
	cmp	byte [esi+2],'('
2381
	je	bt_mem_imm
2382
      bt_mem_reg:
2383
	lods	byte [esi]
2384
	call	get_size_operator
2385
	cmp	al,10h
2386
	jne	invalid_operand
2387
	lods	byte [esi]
2388
	call	convert_register
2389
	mov	[postbyte_register],al
2390
	pop	cx bx edx
2391
	mov	al,ah
2392
	call	operand_autodetect
2393
	call	store_instruction
2394
	jmp	instruction_assembled
2395
      bt_mem_imm:
2396
	xor	al,al
2397
	xchg	al,[operand_size]
2398
	push	eax
2399
	lods	byte [esi]
2400
	call	get_size_operator
2401
	cmp	al,'('
2402
	jne	invalid_operand
2403
	mov	al,[operand_size]
2404
	or	al,al
2405
	jz	bt_mem_imm_size_ok
2406
	cmp	al,1
2407
	jne	invalid_operand_size
2408
      bt_mem_imm_size_ok:
2409
	call	get_byte_value
2410
	mov	byte [value],al
2411
	pop	eax
2412
	or	al,al
2413
	jz	bt_mem_imm_nosize
2414
	call	operand_autodetect
2415
      bt_mem_imm_store:
2416
	pop	cx bx edx
2417
	mov	[extended_code],0BAh
2418
	call	store_instruction_with_imm8
2419
	jmp	instruction_assembled
2420
      bt_mem_imm_nosize:
2421
	cmp	[error_line],0
2422
	jne	bt_mem_imm_store
2423
	mov	eax,[current_line]
2424
	mov	[error_line],eax
2425
	mov	[error],operand_size_not_specified
2426
	jmp	bt_mem_imm_store
2427
      bt_reg:
2428
	lods	byte [esi]
2429
	call	convert_register
2430
	mov	bl,al
2431
	lods	byte [esi]
2432
	cmp	al,','
2433
	jne	invalid_operand
2434
	cmp	byte [esi],'('
2435
	je	bt_reg_imm
2436
	cmp	byte [esi],11h
2437
	jne	bt_reg_reg
2438
	cmp	byte [esi+2],'('
2439
	je	bt_reg_imm
2440
      bt_reg_reg:
2441
	lods	byte [esi]
2442
	call	get_size_operator
2443
	cmp	al,10h
2444
	jne	invalid_operand
2445
	lods	byte [esi]
2446
	call	convert_register
2447
	mov	[postbyte_register],al
2448
	mov	al,ah
2449
	call	operand_autodetect
2450
	call	store_nomem_instruction
2451
	jmp	instruction_assembled
2452
      bt_reg_imm:
2453
	xor	al,al
2454
	xchg	al,[operand_size]
2455
	push	eax
2456
	lods	byte [esi]
2457
	call	get_size_operator
2458
	cmp	al,'('
2459
	jne	invalid_operand
2460
	mov	al,[operand_size]
2461
	or	al,al
2462
	jz	bt_reg_imm_size_ok
2463
	cmp	al,1
2464
	jne	invalid_operand_size
2465
      bt_reg_imm_size_ok:
2466
	call	get_byte_value
2467
	mov	byte [value],al
2468
	pop	eax
2469
	call	operand_autodetect
2470
      bt_reg_imm_store:
2471
	mov	[extended_code],0BAh
2472
	call	store_nomem_instruction
2473
	mov	al,byte [value]
2474
	stos	byte [edi]
2475
	jmp	instruction_assembled
2476
bs_instruction:
2477
	mov	[extended_code],al
2478
	mov	[base_code],0Fh
2479
	lods	byte [esi]
2480
	call	get_size_operator
2481
	cmp	al,10h
2482
	jne	invalid_operand
2483
	lods	byte [esi]
2484
	call	convert_register
2485
	mov	[postbyte_register],al
2486
	lods	byte [esi]
2487
	cmp	al,','
2488
	jne	invalid_operand
2489
	lods	byte [esi]
2490
	call	get_size_operator
2491
	cmp	al,10h
2492
	je	bs_reg_reg
2493
	cmp	al,'['
2494
	jne	invalid_argument
2495
	call	get_address
2496
	mov	al,[operand_size]
2497
	call	operand_autodetect
2498
	call	store_instruction
2499
	jmp	instruction_assembled
2500
      bs_reg_reg:
2501
	lods	byte [esi]
2502
	call	convert_register
2503
	mov	bl,al
2504
	mov	al,ah
2505
	call	operand_autodetect
2506
	call	store_nomem_instruction
2507
	jmp	instruction_assembled
2508
imul_instruction:
2509
	mov	[base_code],0F6h
2510
	mov	[postbyte_register],5
2511
	lods	byte [esi]
2512
	call	get_size_operator
2513
	cmp	al,10h
2514
	je	imul_reg
2515
	cmp	al,'['
2516
	jne	invalid_operand
2517
      imul_mem:
2518
	call	get_address
2519
	mov	al,[operand_size]
2520
	cmp	al,1
2521
	je	imul_mem_8bit
2522
	jb	imul_mem_nosize
2523
	call	operand_autodetect
2524
	inc	[base_code]
2525
	call	store_instruction
2526
	jmp	instruction_assembled
2527
      imul_mem_nosize:
2528
	cmp	[error_line],0
2529
	jne	imul_mem_8bit
2530
	mov	eax,[current_line]
2531
	mov	[error_line],eax
2532
	mov	[error],operand_size_not_specified
2533
      imul_mem_8bit:
2534
	call	store_instruction
2535
	jmp	instruction_assembled
2536
      imul_reg:
2537
	lods	byte [esi]
2538
	call	convert_register
2539
	cmp	byte [esi],','
2540
	je	imul_reg_
2541
	mov	bl,al
2542
	mov	al,ah
2543
	cmp	al,1
2544
	je	imul_reg_8bit
2545
	call	operand_autodetect
2546
	inc	[base_code]
2547
	call	store_nomem_instruction
2548
	jmp	instruction_assembled
2549
      imul_reg_8bit:
2550
	call	store_nomem_instruction
2551
	jmp	instruction_assembled
2552
      imul_reg_:
2553
	mov	[postbyte_register],al
2554
	inc	esi
2555
	cmp	byte [esi],'('
2556
	je	imul_reg_imm
2557
	cmp	byte [esi],11h
2558
	jne	imul_reg_noimm
2559
	cmp	byte [esi+2],'('
2560
	je	imul_reg_imm
2561
      imul_reg_noimm:
2562
	lods	byte [esi]
2563
	call	get_size_operator
2564
	cmp	al,10h
2565
	je	imul_reg_reg
2566
	cmp	al,'['
2567
	jne	invalid_operand
2568
      imul_reg_mem:
2569
	call	get_address
2570
	push	edx bx cx
2571
	cmp	byte [esi],','
2572
	je	imul_reg_mem_imm
2573
	mov	al,[operand_size]
2574
	call	operand_autodetect
2575
	pop	cx bx edx
2576
	mov	[base_code],0Fh
2577
	mov	[extended_code],0AFh
2578
	call	store_instruction
2579
	jmp	instruction_assembled
2580
      imul_reg_mem_imm:
2581
	inc	esi
2582
	lods	byte [esi]
2583
	call	get_size_operator
2584
	cmp	al,'('
2585
	jne	invalid_operand
2586
	mov	al,[operand_size]
2587
	cmp	al,2
2588
	je	imul_reg_mem_imm_16bit
2589
	cmp	al,4
2590
	je	imul_reg_mem_imm_32bit
2591
	cmp	al,8
2592
	je	imul_reg_mem_imm_64bit
2593
	jmp	invalid_operand_size
2594
      imul_reg_mem_imm_16bit:
2595
	call	operand_16bit
2596
	call	get_word_value
2597
	mov	word [value],ax
2598
	cmp	[value_type],0
2599
	jne	imul_reg_mem_imm_16bit_store
2600
	cmp	[size_declared],0
2601
	jne	imul_reg_mem_imm_16bit_store
2602
	cmp	ax,-80h
2603
	jl	imul_reg_mem_imm_16bit_store
2604
	cmp	ax,80h
2605
	jl	imul_reg_mem_imm_8bit_store
2606
      imul_reg_mem_imm_16bit_store:
2607
	pop	cx bx edx
2608
	mov	[base_code],69h
2609
	call	store_instruction_with_imm16
2610
	jmp	instruction_assembled
2611
      imul_reg_mem_imm_32bit:
2612
	call	operand_32bit
2613
	call	get_dword_value
2614
      imul_reg_mem_imm_32bit_ok:
2615
	mov	dword [value],eax
2616
	cmp	[value_type],0
2617
	jne	imul_reg_mem_imm_32bit_store
2618
	cmp	[size_declared],0
2619
	jne	imul_reg_mem_imm_32bit_store
2620
	cmp	eax,-80h
2621
	jl	imul_reg_mem_imm_32bit_store
2622
	cmp	eax,80h
2623
	jl	imul_reg_mem_imm_8bit_store
2624
      imul_reg_mem_imm_32bit_store:
2625
	pop	cx bx edx
2626
	mov	[base_code],69h
2627
	call	store_instruction_with_imm32
2628
	jmp	instruction_assembled
2629
      imul_reg_mem_imm_64bit:
2630
	cmp	[size_declared],0
2631
	jne	long_immediate_not_encodable
2632
	call	operand_64bit
2633
	call	get_simm32
2634
	cmp	[value_type],4
2635
	jae	long_immediate_not_encodable
2636
	jmp	imul_reg_mem_imm_32bit_ok
2637
      imul_reg_mem_imm_8bit_store:
2638
	pop	cx bx edx
2639
	mov	[base_code],6Bh
2640
	call	store_instruction_with_imm8
2641
	jmp	instruction_assembled
2642
      imul_reg_imm:
2643
	mov	bl,[postbyte_register]
2644
	dec	esi
2645
	jmp	imul_reg_reg_imm
2646
      imul_reg_reg:
2647
	lods	byte [esi]
2648
	call	convert_register
2649
	mov	bl,al
2650
	cmp	byte [esi],','
2651
	je	imul_reg_reg_imm
2652
	mov	al,ah
2653
	call	operand_autodetect
2654
	mov	[base_code],0Fh
2655
	mov	[extended_code],0AFh
2656
	call	store_nomem_instruction
2657
	jmp	instruction_assembled
2658
      imul_reg_reg_imm:
2659
	inc	esi
2660
	lods	byte [esi]
2661
	call	get_size_operator
2662
	cmp	al,'('
2663
	jne	invalid_operand
2664
	mov	al,[operand_size]
2665
	cmp	al,2
2666
	je	imul_reg_reg_imm_16bit
2667
	cmp	al,4
2668
	je	imul_reg_reg_imm_32bit
2669
	cmp	al,8
2670
	je	imul_reg_reg_imm_64bit
2671
	jmp	invalid_operand_size
2672
      imul_reg_reg_imm_16bit:
2673
	call	operand_16bit
2674
	push	ebx
2675
	call	get_word_value
2676
	pop	ebx
2677
	mov	dx,ax
2678
	cmp	[value_type],0
2679
	jne	imul_reg_reg_imm_16bit_store
2680
	cmp	[size_declared],0
2681
	jne	imul_reg_reg_imm_16bit_store
2682
	cmp	ax,-80h
2683
	jl	imul_reg_reg_imm_16bit_store
2684
	cmp	ax,80h
2685
	jl	imul_reg_reg_imm_8bit_store
2686
      imul_reg_reg_imm_16bit_store:
2687
	mov	[base_code],69h
2688
	call	store_nomem_instruction
2689
	mov	ax,dx
2690
	call	mark_relocation
2691
	stos	word [edi]
2692
	jmp	instruction_assembled
2693
      imul_reg_reg_imm_32bit:
2694
	call	operand_32bit
2695
	push	ebx
2696
	call	get_dword_value
2697
      imul_reg_reg_imm_32bit_ok:
2698
	pop	ebx
2699
	mov	edx,eax
2700
	cmp	[value_type],0
2701
	jne	imul_reg_reg_imm_32bit_store
2702
	cmp	[size_declared],0
2703
	jne	imul_reg_reg_imm_32bit_store
2704
	cmp	eax,-80h
2705
	jl	imul_reg_reg_imm_32bit_store
2706
	cmp	eax,80h
2707
	jl	imul_reg_reg_imm_8bit_store
2708
      imul_reg_reg_imm_32bit_store:
2709
	mov	[base_code],69h
2710
	call	store_nomem_instruction
2711
	mov	eax,edx
2712
	call	mark_relocation
2713
	stos	dword [edi]
2714
	jmp	instruction_assembled
2715
      imul_reg_reg_imm_64bit:
2716
	cmp	[size_declared],0
2717
	jne	long_immediate_not_encodable
2718
	call	operand_64bit
2719
	push	ebx
2720
	call	get_simm32
2721
	cmp	[value_type],4
2722
	jae	long_immediate_not_encodable
2723
	jmp	imul_reg_reg_imm_32bit_ok
2724
      imul_reg_reg_imm_8bit_store:
2725
	mov	[base_code],6Bh
2726
	call	store_nomem_instruction
2727
	mov	al,dl
2728
	stos	byte [edi]
2729
	jmp	instruction_assembled
2730
in_instruction:
2731
	lods	byte [esi]
2732
	call	get_size_operator
2733
	cmp	al,10h
2734
	jne	invalid_operand
2735
	lods	byte [esi]
2736
	call	convert_register
2737
	or	al,al
2738
	jnz	invalid_operand
2739
	lods	byte [esi]
2740
	cmp	al,','
2741
	jne	invalid_operand
2742
	mov	al,ah
2743
	push	eax
2744
	mov	[operand_size],0
2745
	lods	byte [esi]
2746
	call	get_size_operator
2747
	cmp	al,'('
2748
	je	in_imm
2749
	cmp	al,10h
2750
	je	in_reg
2751
	jmp	invalid_operand
2752
      in_reg:
2753
	lods	byte [esi]
2754
	cmp	al,22h
2755
	jne	invalid_operand
2756
	pop	eax
2757
	cmp	al,1
2758
	je	in_al_dx
2759
	cmp	al,2
2760
	je	in_ax_dx
2761
	cmp	al,4
2762
	je	in_eax_dx
2763
	jmp	invalid_operand_size
2764
      in_al_dx:
2765
	mov	al,0ECh
2766
	stos	byte [edi]
2767
	jmp	instruction_assembled
2768
      in_ax_dx:
2769
	call	operand_16bit
2770
	mov	[base_code],0EDh
2771
	call	store_instruction_code
2772
	jmp	instruction_assembled
2773
      in_eax_dx:
2774
	call	operand_32bit
2775
	mov	[base_code],0EDh
2776
	call	store_instruction_code
2777
	jmp	instruction_assembled
2778
      in_imm:
2779
	mov	al,[operand_size]
2780
	or	al,al
2781
	jz	in_imm_size_ok
2782
	cmp	al,1
2783
	jne	invalid_operand_size
2784
      in_imm_size_ok:
2785
	call	get_byte_value
2786
	mov	dl,al
2787
	pop	eax
2788
	cmp	al,1
2789
	je	in_al_imm
2790
	cmp	al,2
2791
	je	in_ax_imm
2792
	cmp	al,4
2793
	je	in_eax_imm
2794
	jmp	invalid_operand_size
2795
      in_al_imm:
2796
	mov	al,0E4h
2797
	stos	byte [edi]
2798
	mov	al,dl
2799
	stos	byte [edi]
2800
	jmp	instruction_assembled
2801
      in_ax_imm:
2802
	call	operand_16bit
2803
	mov	[base_code],0E5h
2804
	call	store_instruction_code
2805
	mov	al,dl
2806
	stos	byte [edi]
2807
	jmp	instruction_assembled
2808
      in_eax_imm:
2809
	call	operand_32bit
2810
	mov	[base_code],0E5h
2811
	call	store_instruction_code
2812
	mov	al,dl
2813
	stos	byte [edi]
2814
	jmp	instruction_assembled
2815
out_instruction:
2816
	lods	byte [esi]
2817
	call	get_size_operator
2818
	cmp	al,'('
2819
	je	out_imm
2820
	cmp	al,10h
2821
	jne	invalid_operand
2822
	lods	byte [esi]
2823
	cmp	al,22h
2824
	jne	invalid_operand
2825
	lods	byte [esi]
2826
	cmp	al,','
2827
	jne	invalid_operand
2828
	mov	[operand_size],0
2829
	lods	byte [esi]
2830
	call	get_size_operator
2831
	cmp	al,10h
2832
	jne	invalid_operand
2833
	lods	byte [esi]
2834
	call	convert_register
2835
	or	al,al
2836
	jnz	invalid_operand
2837
	mov	al,ah
2838
	cmp	al,1
2839
	je	out_dx_al
2840
	cmp	al,2
2841
	je	out_dx_ax
2842
	cmp	al,4
2843
	je	out_dx_eax
2844
	jmp	invalid_operand_size
2845
      out_dx_al:
2846
	mov	al,0EEh
2847
	stos	byte [edi]
2848
	jmp	instruction_assembled
2849
      out_dx_ax:
2850
	call	operand_16bit
2851
	mov	[base_code],0EFh
2852
	call	store_instruction_code
2853
	jmp	instruction_assembled
2854
      out_dx_eax:
2855
	call	operand_32bit
2856
	mov	[base_code],0EFh
2857
	call	store_instruction_code
2858
	jmp	instruction_assembled
2859
      out_imm:
2860
	mov	al,[operand_size]
2861
	or	al,al
2862
	jz	out_imm_size_ok
2863
	cmp	al,1
2864
	jne	invalid_operand_size
2865
      out_imm_size_ok:
2866
	call	get_byte_value
2867
	mov	dl,al
2868
	lods	byte [esi]
2869
	cmp	al,','
2870
	jne	invalid_operand
2871
	mov	[operand_size],0
2872
	lods	byte [esi]
2873
	call	get_size_operator
2874
	cmp	al,10h
2875
	jne	invalid_operand
2876
	lods	byte [esi]
2877
	call	convert_register
2878
	or	al,al
2879
	jnz	invalid_operand
2880
	mov	al,ah
2881
	cmp	al,1
2882
	je	out_imm_al
2883
	cmp	al,2
2884
	je	out_imm_ax
2885
	cmp	al,4
2886
	je	out_imm_eax
2887
	jmp	invalid_operand_size
2888
      out_imm_al:
2889
	mov	al,0E6h
2890
	stos	byte [edi]
2891
	mov	al,dl
2892
	stos	byte [edi]
2893
	jmp	instruction_assembled
2894
      out_imm_ax:
2895
	call	operand_16bit
2896
	mov	[base_code],0E7h
2897
	call	store_instruction_code
2898
	mov	al,dl
2899
	stos	byte [edi]
2900
	jmp	instruction_assembled
2901
      out_imm_eax:
2902
	call	operand_32bit
2903
	mov	[base_code],0E7h
2904
	call	store_instruction_code
2905
	mov	al,dl
2906
	stos	byte [edi]
2907
	jmp	instruction_assembled
2908
2909
 
2910
	mov	[base_code],al
2911
	lods	byte [esi]
2912
	call	get_jump_operator
2913
	cmp	[jump_type],2
2914
	je	invalid_operand
2915
	call	get_size_operator
2916
	cmp	al,'('
2917
	jne	invalid_operand
2918
	cmp	byte [esi],'.'
2919
	je	invalid_value
2920
	call	get_relative_offset
2921
	sub	eax,2
2922
	jo	jump_out_of_range
2923
	cmp	[next_pass_needed],0
2924
	jne	conditional_jump_value_ok
2925
	cmp	[value_type],1
2926
	je	invalid_use_of_symbol
2927
	ja	conditional_jump_32bit
2928
      conditional_jump_value_ok:
2929
	mov	bl,[operand_size]
2930
	cmp	bl,1
2931
	je	conditional_jump_8bit
2932
	cmp	bl,2
2933
	je	conditional_jump_16bit
2934
	cmp	bl,4
2935
	je	conditional_jump_32bit
2936
	or	bl,bl
2937
	jnz	invalid_operand_size
2938
	cmp	eax,80h
2939
	jb	conditional_jump_8bit
2940
	cmp	eax,-80h
2941
	jae	conditional_jump_8bit
2942
	cmp	[code_type],16
2943
	je	conditional_jump_16bit
2944
      conditional_jump_32bit:
2945
	sub	eax,2
2946
	jo	jump_out_of_range
2947
	mov	edx,eax
2948
	mov	ecx,edi
2949
	call	operand_32bit
2950
	mov	al,[base_code]
2951
	add	al,10h
2952
	mov	[extended_code],al
2953
	mov	[base_code],0Fh
2954
	call	store_instruction_code
2955
	mov	eax,edi
2956
	sub	eax,ecx
2957
	sub	edx,eax
2958
	jo	jump_out_of_range
2959
	mov	eax,edx
2960
	call	mark_relocation
2961
	stos	dword [edi]
2962
	jmp	instruction_assembled
2963
      conditional_jump_16bit:
2964
	mov	edx,eax
2965
	mov	ecx,edi
2966
	call	operand_16bit
2967
	mov	al,[base_code]
2968
	add	al,10h
2969
	mov	[extended_code],al
2970
	mov	[base_code],0Fh
2971
	call	store_instruction_code
2972
	mov	eax,edi
2973
	sub	eax,ecx
2974
	sub	edx,eax
2975
	jo	jump_out_of_range
2976
	mov	eax,edx
2977
	stos	word [edi]
2978
	cmp	eax,10000h
2979
	jge	jump_out_of_range
2980
	cmp	eax,-10000h
2981
	jl	jump_out_of_range
2982
	jmp	instruction_assembled
2983
      conditional_jump_8bit:
2984
	mov	edx,eax
2985
	mov	ah,al
2986
	mov	al,[base_code]
2987
	stos	word [edi]
2988
	cmp	edx,80h
2989
	jge	jump_out_of_range
2990
	cmp	edx,-80h
2991
	jl	jump_out_of_range
2992
	jmp	instruction_assembled
2993
      jump_out_of_range:
2994
	cmp	[error_line],0
2995
	jne	instruction_assembled
2996
	mov	eax,[current_line]
2997
	mov	[error_line],eax
2998
	mov	[error],relative_jump_out_of_range
2999
	jmp	instruction_assembled
3000
loop_instruction_16bit:
3001
	cmp	[code_type],64
3002
	je	illegal_instruction
3003
	mov	dl,al
3004
	call	address_16bit_prefix
3005
	mov	al,dl
3006
	jmp	loop_instruction
3007
loop_instruction_32bit:
3008
	mov	dl,al
3009
	call	address_32bit_prefix
3010
	mov	al,dl
3011
	jmp	loop_instruction
3012
loop_instruction_64bit:
3013
	cmp	[code_type],64
3014
	jne	illegal_instruction
3015
loop_instruction:
3016
	mov	[base_code],al
3017
	lods	byte [esi]
3018
	call	get_jump_operator
3019
	cmp	[jump_type],2
3020
	je	invalid_operand
3021
	call	get_size_operator
3022
	cmp	al,'('
3023
	jne	invalid_operand
3024
	cmp	byte [esi],'.'
3025
	je	invalid_value
3026
	call	get_relative_offset
3027
	cmp	[next_pass_needed],0
3028
	jne	loop_value_ok
3029
	cmp	[value_type],0
3030
	jne	invalid_use_of_symbol
3031
      loop_value_ok:
3032
	mov	bl,[operand_size]
3033
	cmp	bl,1
3034
	je	loop_8bit
3035
	or	bl,bl
3036
	jnz	invalid_operand_size
3037
      loop_8bit:
3038
	sub	eax,2
3039
	jo	jump_out_of_range
3040
	mov	edx,eax
3041
	mov	al,[base_code]
3042
	stos	byte [edi]
3043
	mov	al,dl
3044
	stos	byte [edi]
3045
	cmp	edx,80h
3046
	jge	jump_out_of_range
3047
	cmp	edx,-80h
3048
	jl	jump_out_of_range
3049
	jmp	instruction_assembled
3050
call_instruction:
3051
	mov	[postbyte_register],10b
3052
	mov	[base_code],0E8h
3053
	mov	[extended_code],9Ah
3054
	jmp	process_jmp
3055
jmp_instruction:
3056
	mov	[postbyte_register],100b
3057
	mov	[base_code],0E9h
3058
	mov	[extended_code],0EAh
3059
      process_jmp:
3060
	lods	byte [esi]
3061
	call	get_jump_operator
3062
	call	get_size_operator
3063
	cmp	al,'('
3064
	je	jmp_imm
3065
	mov	[base_code],0FFh
3066
	cmp	al,10h
3067
	je	jmp_reg
3068
	cmp	al,'['
3069
	jne	invalid_operand
3070
      jmp_mem:
3071
	call	get_address
3072
	mov	edx,eax
3073
	mov	al,[operand_size]
3074
	or	al,al
3075
	jz	jmp_mem_size_not_specified
3076
	cmp	al,2
3077
	je	jmp_mem_16bit
3078
	cmp	al,4
3079
	je	jmp_mem_32bit
3080
	cmp	al,6
3081
	je	jmp_mem_48bit
3082
	cmp	al,8
3083
	je	jmp_mem_64bit
3084
	cmp	al,10
3085
	je	jmp_mem_80bit
3086
	jmp	invalid_operand_size
3087
      jmp_mem_size_not_specified:
3088
	cmp	[jump_type],2
3089
	je	jmp_mem_far
3090
	cmp	[jump_type],1
3091
	je	jmp_mem_near
3092
	cmp	[error_line],0
3093
	jne	jmp_mem_near
3094
	mov	eax,[current_line]
3095
	mov	[error_line],eax
3096
	mov	[error],operand_size_not_specified
3097
      jmp_mem_near:
3098
	cmp	[code_type],16
3099
	je	jmp_mem_16bit
3100
	cmp	[code_type],32
3101
	je	jmp_mem_near_32bit
3102
      jmp_mem_64bit:
3103
	cmp	[jump_type],2
3104
	je	invalid_operand_size
3105
	cmp	[code_type],64
3106
	jne	illegal_instruction
3107
	call	store_instruction
3108
	jmp	instruction_assembled
3109
      jmp_mem_far:
3110
	cmp	[code_type],16
3111
	je	jmp_mem_far_32bit
3112
      jmp_mem_48bit:
3113
	call	operand_32bit
3114
      jmp_mem_far_store:
3115
	cmp	[jump_type],1
3116
	je	invalid_operand_size
3117
	inc	[postbyte_register]
3118
	call	store_instruction
3119
	jmp	instruction_assembled
3120
      jmp_mem_80bit:
3121
	call	operand_64bit
3122
	jmp	jmp_mem_far_store
3123
      jmp_mem_far_32bit:
3124
	call	operand_16bit
3125
	jmp	jmp_mem_far_store
3126
      jmp_mem_32bit:
3127
	cmp	[jump_type],2
3128
	je	jmp_mem_far_32bit
3129
	cmp	[jump_type],1
3130
	je	jmp_mem_near_32bit
3131
	cmp	[code_type],16
3132
	je	jmp_mem_far_32bit
3133
      jmp_mem_near_32bit:
3134
	cmp	[code_type],64
3135
	je	illegal_instruction
3136
	call	operand_32bit
3137
	call	store_instruction
3138
	jmp	instruction_assembled
3139
      jmp_mem_16bit:
3140
	cmp	[jump_type],2
3141
	je	invalid_operand_size
3142
	call	operand_16bit
3143
	call	store_instruction
3144
	jmp	instruction_assembled
3145
      jmp_reg:
3146
	cmp	[jump_type],2
3147
	je	invalid_operand
3148
	lods	byte [esi]
3149
	call	convert_register
3150
	mov	bl,al
3151
	mov	al,ah
3152
	cmp	al,2
3153
	je	jmp_reg_16bit
3154
	cmp	al,4
3155
	je	jmp_reg_32bit
3156
	cmp	al,8
3157
	jne	invalid_operand_size
3158
      jmp_reg_64bit:
3159
	cmp	[code_type],64
3160
	jne	illegal_instruction
3161
	call	store_nomem_instruction
3162
	jmp	instruction_assembled
3163
      jmp_reg_32bit:
3164
	cmp	[code_type],64
3165
	je	illegal_instruction
3166
	call	store_nomem_instruction
3167
	jmp	instruction_assembled
3168
      jmp_reg_16bit:
3169
	call	operand_16bit
3170
	call	store_nomem_instruction
3171
	jmp	instruction_assembled
3172
      jmp_imm:
3173
	cmp	byte [esi],'.'
3174
	je	invalid_value
3175
	mov	ebx,esi
3176
	dec	esi
3177
	call	skip_symbol
3178
	xchg	esi,ebx
3179
	cmp	byte [ebx],':'
3180
	je	jmp_far
3181
	call	get_relative_offset
3182
	cmp	[jump_type],2
3183
	je	invalid_operand
3184
	sub	eax,2
3185
	jo	jump_out_of_range
3186
	cmp	[next_pass_needed],0
3187
	jne	jmp_value_ok
3188
	cmp	[value_type],1
3189
	je	invalid_use_of_symbol
3190
	ja	jmp_32bit
3191
      jmp_value_ok:
3192
	mov	bl,[operand_size]
3193
	cmp	bl,1
3194
	je	jmp_8bit
3195
	cmp	bl,2
3196
	je	jmp_16bit
3197
	cmp	bl,4
3198
	je	jmp_32bit
3199
	or	bl,bl
3200
	jnz	invalid_operand_size
3201
	cmp	[base_code],0E9h
3202
	jne	jmp_no8bit
3203
	cmp	eax,80h
3204
	jb	jmp_8bit
3205
	cmp	eax,-80h
3206
	jae	jmp_8bit
3207
      jmp_no8bit:
3208
	cmp	[code_type],16
3209
	je	jmp_16bit
3210
      jmp_32bit:
3211
	test	[operand_size],not 4
3212
	jnz	invalid_operand_size
3213
	sub	eax,2
3214
	jo	jump_out_of_range
3215
	mov	edx,eax
3216
	mov	ecx,edi
3217
	call	operand_32bit
3218
	call	store_instruction_code
3219
	mov	eax,edi
3220
	sub	eax,ecx
3221
	sub	edx,eax
3222
	jo	jump_out_of_range
3223
	mov	eax,edx
3224
	call	mark_relocation
3225
	stos	dword [edi]
3226
	jmp	instruction_assembled
3227
      jmp_16bit:
3228
	mov	edx,eax
3229
	mov	ecx,edi
3230
	call	operand_16bit
3231
	call	store_instruction_code
3232
	mov	eax,edi
3233
	sub	eax,ecx
3234
	sub	edx,eax
3235
	jo	jump_out_of_range
3236
	mov	eax,edx
3237
	stos	word [edi]
3238
	cmp	eax,10000h
3239
	jge	jump_out_of_range
3240
	cmp	eax,-10000h
3241
	jl	jump_out_of_range
3242
	jmp	instruction_assembled
3243
      jmp_8bit:
3244
	cmp	[base_code],0E9h
3245
	jne	invalid_operand_size
3246
	mov	edx,eax
3247
	mov	ah,al
3248
	mov	al,0EBh
3249
	stos	word [edi]
3250
	cmp	edx,80h
3251
	jge	jump_out_of_range
3252
	cmp	edx,-80h
3253
	jl	jump_out_of_range
3254
	jmp	instruction_assembled
3255
      jmp_far:
3256
	cmp	[jump_type],1
3257
	je	invalid_operand
3258
	cmp	[code_type],64
3259
	je	illegal_instruction
3260
	mov	al,[extended_code]
3261
	mov	[base_code],al
3262
	call	get_word_value
3263
	push	eax
3264
	inc	esi
3265
	lods	byte [esi]
3266
	cmp	al,'('
3267
	jne	invalid_operand
3268
	mov	al,[value_type]
3269
	push	eax [symbol_identifier]
3270
	cmp	byte [esi],'.'
3271
	je	invalid_value
3272
	mov	al,[operand_size]
3273
	cmp	al,4
3274
	je	jmp_far_16bit
3275
	cmp	al,6
3276
	je	jmp_far_32bit
3277
	or	al,al
3278
	jnz	invalid_operand_size
3279
	cmp	[code_type],16
3280
	jne	jmp_far_32bit
3281
      jmp_far_16bit:
3282
	call	get_word_value
3283
	mov	ebx,eax
3284
	call	operand_16bit
3285
	call	store_instruction_code
3286
	mov	ax,bx
3287
	call	mark_relocation
3288
	stos	word [edi]
3289
      jmp_far_segment:
3290
	pop	[symbol_identifier] eax
3291
	mov	[value_type],al
3292
	pop	eax
3293
	call	mark_relocation
3294
	stos	word [edi]
3295
	jmp	instruction_assembled
3296
      jmp_far_32bit:
3297
	call	get_dword_value
3298
	mov	ebx,eax
3299
	call	operand_32bit
3300
	call	store_instruction_code
3301
	mov	eax,ebx
3302
	call	mark_relocation
3303
	stos	dword [edi]
3304
	jmp	jmp_far_segment
3305
3306
 
3307
	lods	byte [esi]
3308
	call	get_size_operator
3309
	cmp	al,'['
3310
	jne	invalid_operand
3311
	call	get_address
3312
	or	eax,eax
3313
	jnz	invalid_address
3314
	or	bl,ch
3315
	jnz	invalid_address
3316
	cmp	[segment_register],1
3317
	ja	invalid_address
3318
	push	ebx
3319
	lods	byte [esi]
3320
	cmp	al,','
3321
	jne	invalid_operand
3322
	lods	byte [esi]
3323
	call	get_size_operator
3324
	cmp	al,'['
3325
	jne	invalid_operand
3326
	call	get_address
3327
	pop	edx
3328
	or	eax,eax
3329
	jnz	invalid_address
3330
	or	bl,ch
3331
	jnz	invalid_address
3332
	mov	al,dh
3333
	mov	ah,bh
3334
	shr	al,4
3335
	shr	ah,4
3336
	cmp	al,ah
3337
	jne	address_sizes_do_not_agree
3338
	and	bh,111b
3339
	and	dh,111b
3340
	cmp	bh,6
3341
	jne	invalid_address
3342
	cmp	dh,7
3343
	jne	invalid_address
3344
	cmp	al,2
3345
	je	movs_address_16bit
3346
	cmp	al,4
3347
	je	movs_address_32bit
3348
	cmp	[code_type],64
3349
	jne	invalid_address_size
3350
	jmp	movs_store
3351
      movs_address_32bit:
3352
	call	address_32bit_prefix
3353
	jmp	movs_store
3354
      movs_address_16bit:
3355
	cmp	[code_type],64
3356
	je	invalid_address_size
3357
	call	address_16bit_prefix
3358
      movs_store:
3359
	cmp	[segment_register],4
3360
	je	movs_segment_ok
3361
	call	store_segment_prefix
3362
      movs_segment_ok:
3363
	mov	al,0A4h
3364
	mov	bl,[operand_size]
3365
	cmp	bl,1
3366
	je	simple_instruction
3367
	inc	al
3368
	cmp	bl,2
3369
	je	simple_instruction_16bit
3370
	cmp	bl,4
3371
	je	simple_instruction_32bit
3372
	cmp	bl,8
3373
	je	simple_instruction_64bit
3374
	or	bl,bl
3375
	jz	operand_size_not_specified
3376
	jmp	invalid_operand_size
3377
lods_instruction:
3378
	lods	byte [esi]
3379
	call	get_size_operator
3380
	cmp	al,'['
3381
	jne	invalid_operand
3382
	call	get_address
3383
	or	eax,eax
3384
	jnz	invalid_address
3385
	or	bl,ch
3386
	jnz	invalid_address
3387
	cmp	bh,26h
3388
	je	lods_address_16bit
3389
	cmp	bh,46h
3390
	je	lods_address_32bit
3391
	cmp	bh,86h
3392
	jne	invalid_address
3393
	cmp	[code_type],64
3394
	jne	invalid_address_size
3395
	jmp	lods_store
3396
      lods_address_32bit:
3397
	call	address_32bit_prefix
3398
	jmp	lods_store
3399
      lods_address_16bit:
3400
	cmp	[code_type],64
3401
	je	invalid_address_size
3402
	call	address_16bit_prefix
3403
      lods_store:
3404
	cmp	[segment_register],4
3405
	je	lods_segment_ok
3406
	call	store_segment_prefix
3407
      lods_segment_ok:
3408
	mov	al,0ACh
3409
	mov	bl,[operand_size]
3410
	cmp	bl,1
3411
	je	simple_instruction
3412
	inc	al
3413
	cmp	bl,2
3414
	je	simple_instruction_16bit
3415
	cmp	bl,4
3416
	je	simple_instruction_32bit
3417
	cmp	bl,8
3418
	je	simple_instruction_64bit
3419
	or	bl,bl
3420
	jz	operand_size_not_specified
3421
	jmp	invalid_operand_size
3422
stos_instruction:
3423
	mov	[base_code],al
3424
	lods	byte [esi]
3425
	call	get_size_operator
3426
	cmp	al,'['
3427
	jne	invalid_operand
3428
	call	get_address
3429
	or	eax,eax
3430
	jnz	invalid_address
3431
	or	bl,ch
3432
	jnz	invalid_address
3433
	cmp	bh,27h
3434
	je	stos_address_16bit
3435
	cmp	bh,47h
3436
	je	stos_address_32bit
3437
	cmp	bh,87h
3438
	jne	invalid_address
3439
	cmp	[code_type],64
3440
	jne	invalid_address_size
3441
	jmp	stos_store
3442
      stos_address_32bit:
3443
	call	address_32bit_prefix
3444
	jmp	stos_store
3445
      stos_address_16bit:
3446
	cmp	[code_type],64
3447
	je	invalid_address_size
3448
	call	address_16bit_prefix
3449
      stos_store:
3450
	cmp	[segment_register],1
3451
	ja	invalid_address
3452
	mov	al,[base_code]
3453
	mov	bl,[operand_size]
3454
	cmp	bl,1
3455
	je	simple_instruction
3456
	inc	al
3457
	cmp	bl,2
3458
	je	simple_instruction_16bit
3459
	cmp	bl,4
3460
	je	simple_instruction_32bit
3461
	cmp	bl,8
3462
	je	simple_instruction_64bit
3463
	or	bl,bl
3464
	jz	operand_size_not_specified
3465
	jmp	invalid_operand_size
3466
cmps_instruction:
3467
	lods	byte [esi]
3468
	call	get_size_operator
3469
	cmp	al,'['
3470
	jne	invalid_operand
3471
	call	get_address
3472
	or	eax,eax
3473
	jnz	invalid_address
3474
	or	bl,ch
3475
	jnz	invalid_address
3476
	mov	al,[segment_register]
3477
	push	ax bx
3478
	lods	byte [esi]
3479
	cmp	al,','
3480
	jne	invalid_operand
3481
	lods	byte [esi]
3482
	call	get_size_operator
3483
	cmp	al,'['
3484
	jne	invalid_operand
3485
	call	get_address
3486
	or	eax,eax
3487
	jnz	invalid_address
3488
	or	bl,ch
3489
	jnz	invalid_address
3490
	pop	dx ax
3491
	cmp	[segment_register],1
3492
	ja	invalid_address
3493
	mov	[segment_register],al
3494
	mov	al,dh
3495
	mov	ah,bh
3496
	shr	al,4
3497
	shr	ah,4
3498
	cmp	al,ah
3499
	jne	address_sizes_do_not_agree
3500
	and	bh,111b
3501
	and	dh,111b
3502
	cmp	bh,7
3503
	jne	invalid_address
3504
	cmp	dh,6
3505
	jne	invalid_address
3506
	cmp	al,2
3507
	je	cmps_address_16bit
3508
	cmp	al,4
3509
	je	cmps_address_32bit
3510
	cmp	[code_type],64
3511
	jne	invalid_address_size
3512
	jmp	cmps_store
3513
      cmps_address_32bit:
3514
	call	address_32bit_prefix
3515
	jmp	cmps_store
3516
      cmps_address_16bit:
3517
	cmp	[code_type],64
3518
	je	invalid_address_size
3519
	call	address_16bit_prefix
3520
      cmps_store:
3521
	cmp	[segment_register],4
3522
	je	cmps_segment_ok
3523
	call	store_segment_prefix
3524
      cmps_segment_ok:
3525
	mov	al,0A6h
3526
	mov	bl,[operand_size]
3527
	cmp	bl,1
3528
	je	simple_instruction
3529
	inc	al
3530
	cmp	bl,2
3531
	je	simple_instruction_16bit
3532
	cmp	bl,4
3533
	je	simple_instruction_32bit
3534
	cmp	bl,8
3535
	je	simple_instruction_64bit
3536
	or	bl,bl
3537
	jz	operand_size_not_specified
3538
	jmp	invalid_operand_size
3539
ins_instruction:
3540
	lods	byte [esi]
3541
	call	get_size_operator
3542
	cmp	al,'['
3543
	jne	invalid_operand
3544
	call	get_address
3545
	or	eax,eax
3546
	jnz	invalid_address
3547
	or	bl,ch
3548
	jnz	invalid_address
3549
	cmp	bh,27h
3550
	je	ins_address_16bit
3551
	cmp	bh,47h
3552
	je	ins_address_32bit
3553
	cmp	bh,87h
3554
	jne	invalid_address
3555
	cmp	[code_type],64
3556
	jne	invalid_address_size
3557
	jmp	ins_store
3558
      ins_address_32bit:
3559
	call	address_32bit_prefix
3560
	jmp	ins_store
3561
      ins_address_16bit:
3562
	cmp	[code_type],64
3563
	je	invalid_address_size
3564
	call	address_16bit_prefix
3565
      ins_store:
3566
	cmp	[segment_register],1
3567
	ja	invalid_address
3568
	lods	byte [esi]
3569
	cmp	al,','
3570
	jne	invalid_operand
3571
	lods	byte [esi]
3572
	cmp	al,10h
3573
	jne	invalid_operand
3574
	lods	byte [esi]
3575
	cmp	al,22h
3576
	jne	invalid_operand
3577
	mov	al,6Ch
3578
	mov	bl,[operand_size]
3579
	cmp	bl,1
3580
	je	simple_instruction
3581
	inc	al
3582
	cmp	bl,2
3583
	je	simple_instruction_16bit
3584
	cmp	bl,4
3585
	je	simple_instruction_32bit
3586
	or	bl,bl
3587
	jz	operand_size_not_specified
3588
	jmp	invalid_operand_size
3589
outs_instruction:
3590
	lods	byte [esi]
3591
	cmp	al,10h
3592
	jne	invalid_operand
3593
	lods	byte [esi]
3594
	cmp	al,22h
3595
	jne	invalid_operand
3596
	lods	byte [esi]
3597
	cmp	al,','
3598
	jne	invalid_operand
3599
	lods	byte [esi]
3600
	call	get_size_operator
3601
	cmp	al,'['
3602
	jne	invalid_operand
3603
	call	get_address
3604
	or	eax,eax
3605
	jnz	invalid_address
3606
	or	bl,ch
3607
	jnz	invalid_address
3608
	cmp	bh,26h
3609
	je	outs_address_16bit
3610
	cmp	bh,46h
3611
	je	outs_address_32bit
3612
	cmp	bh,86h
3613
	jne	invalid_address
3614
	cmp	[code_type],64
3615
	jne	invalid_address_size
3616
	jmp	outs_store
3617
      outs_address_32bit:
3618
	call	address_32bit_prefix
3619
	jmp	outs_store
3620
      outs_address_16bit:
3621
	cmp	[code_type],64
3622
	je	invalid_address_size
3623
	call	address_16bit_prefix
3624
      outs_store:
3625
	cmp	[segment_register],4
3626
	je	outs_segment_ok
3627
	call	store_segment_prefix
3628
      outs_segment_ok:
3629
	mov	al,6Eh
3630
	mov	bl,[operand_size]
3631
	cmp	bl,1
3632
	je	simple_instruction
3633
	inc	al
3634
	cmp	bl,2
3635
	je	simple_instruction_16bit
3636
	cmp	bl,4
3637
	je	simple_instruction_32bit
3638
	or	bl,bl
3639
	jz	operand_size_not_specified
3640
	jmp	invalid_operand_size
3641
xlat_instruction:
3642
	lods	byte [esi]
3643
	call	get_size_operator
3644
	cmp	al,'['
3645
	jne	invalid_operand
3646
	call	get_address
3647
	or	eax,eax
3648
	jnz	invalid_address
3649
	or	bl,ch
3650
	jnz	invalid_address
3651
	cmp	bh,23h
3652
	je	xlat_address_16bit
3653
	cmp	bh,43h
3654
	je	xlat_address_32bit
3655
	cmp	bh,83h
3656
	jne	invalid_address
3657
	cmp	[code_type],64
3658
	jne	invalid_address_size
3659
	jmp	xlat_store
3660
      xlat_address_32bit:
3661
	call	address_32bit_prefix
3662
	jmp	xlat_store
3663
      xlat_address_16bit:
3664
	cmp	[code_type],64
3665
	je	invalid_address_size
3666
	call	address_16bit_prefix
3667
      xlat_store:
3668
	call	store_segment_prefix_if_necessary
3669
	mov	al,0D7h
3670
	cmp	[operand_size],1
3671
	jbe	simple_instruction
3672
	jmp	invalid_operand_size
3673
3674
 
3675
	mov	ah,al
3676
	shr	ah,4
3677
	and	al,111b
3678
	mov	[base_code],0Fh
3679
	mov	[extended_code],ah
3680
	mov	[postbyte_register],al
3681
	lods	byte [esi]
3682
	call	get_size_operator
3683
	cmp	al,10h
3684
	je	pm_reg
3685
      pm_mem:
3686
	cmp	al,'['
3687
	jne	invalid_operand
3688
	call	get_address
3689
	mov	al,[operand_size]
3690
	cmp	al,2
3691
	je	pm_mem_store
3692
	or	al,al
3693
	jnz	invalid_operand_size
3694
      pm_mem_store:
3695
	call	store_instruction
3696
	jmp	instruction_assembled
3697
      pm_reg:
3698
	lods	byte [esi]
3699
	call	convert_register
3700
	mov	bl,al
3701
	cmp	ah,2
3702
	jne	invalid_operand_size
3703
	call	store_nomem_instruction
3704
	jmp	instruction_assembled
3705
pm_store_word_instruction:
3706
	mov	ah,al
3707
	shr	ah,4
3708
	and	al,111b
3709
	mov	[base_code],0Fh
3710
	mov	[extended_code],ah
3711
	mov	[postbyte_register],al
3712
	lods	byte [esi]
3713
	call	get_size_operator
3714
	cmp	al,10h
3715
	jne	pm_mem
3716
	lods	byte [esi]
3717
	call	convert_register
3718
	mov	bl,al
3719
	mov	al,ah
3720
	call	operand_autodetect
3721
	call	store_nomem_instruction
3722
	jmp	instruction_assembled
3723
lgdt_instruction:
3724
	mov	[base_code],0Fh
3725
	mov	[extended_code],1
3726
	mov	[postbyte_register],al
3727
	lods	byte [esi]
3728
	call	get_size_operator
3729
	cmp	al,'['
3730
	jne	invalid_operand
3731
	call	get_address
3732
	mov	al,[operand_size]
3733
	cmp	al,6
3734
	je	lgdt_mem_48bit
3735
	cmp	al,10
3736
	je	lgdt_mem_80bit
3737
	or	al,al
3738
	jnz	invalid_operand_size
3739
	cmp	[code_type],64
3740
	je	lgdt_mem_80bit
3741
      lgdt_mem_48bit:
3742
	cmp	[code_type],64
3743
	je	illegal_instruction
3744
	call	store_instruction
3745
	jmp	instruction_assembled
3746
      lgdt_mem_80bit:
3747
	cmp	[code_type],64
3748
	jne	illegal_instruction
3749
	call	store_instruction
3750
	jmp	instruction_assembled
3751
lar_instruction:
3752
	mov	[extended_code],al
3753
	mov	[base_code],0Fh
3754
	lods	byte [esi]
3755
	call	get_size_operator
3756
	cmp	al,10h
3757
	jne	invalid_operand
3758
	lods	byte [esi]
3759
	call	convert_register
3760
	mov	[postbyte_register],al
3761
	lods	byte [esi]
3762
	cmp	al,','
3763
	jne	invalid_operand
3764
	xor	al,al
3765
	xchg	al,[operand_size]
3766
	call	operand_autodetect
3767
	lods	byte [esi]
3768
	call	get_size_operator
3769
	cmp	al,10h
3770
	je	lar_reg_reg
3771
	cmp	al,'['
3772
	jne	invalid_operand
3773
	call	get_address
3774
	mov	al,[operand_size]
3775
	or	al,al
3776
	jz	lar_reg_mem
3777
	cmp	al,2
3778
	jne	invalid_operand_size
3779
      lar_reg_mem:
3780
	call	store_instruction
3781
	jmp	instruction_assembled
3782
      lar_reg_reg:
3783
	lods	byte [esi]
3784
	call	convert_register
3785
	cmp	ah,2
3786
	jne	invalid_operand_size
3787
	mov	bl,al
3788
	call	store_nomem_instruction
3789
	jmp	instruction_assembled
3790
invlpg_instruction:
3791
	mov	[base_code],0Fh
3792
	mov	[extended_code],1
3793
	mov	[postbyte_register],7
3794
	lods	byte [esi]
3795
	call	get_size_operator
3796
	cmp	al,'['
3797
	jne	invalid_operand
3798
	call	get_address
3799
	call	store_instruction
3800
	jmp	instruction_assembled
3801
swapgs_instruction:
3802
	mov	[base_code],0Fh
3803
	mov	[extended_code],1
3804
	mov	[postbyte_register],7
3805
	mov	bl,al
3806
	call	store_nomem_instruction
3807
	jmp	instruction_assembled
3808
3809
 
3810
	mov	[base_code],0Fh
3811
	mov	[extended_code],al
3812
	lods	byte [esi]
3813
	call	get_size_operator
3814
	cmp	al,10h
3815
	je	basic_486_reg
3816
	cmp	al,'['
3817
	jne	invalid_operand
3818
	call	get_address
3819
	push	edx bx cx
3820
	lods	byte [esi]
3821
	cmp	al,','
3822
	jne	invalid_operand
3823
	lods	byte [esi]
3824
	call	get_size_operator
3825
	cmp	al,10h
3826
	jne	invalid_operand
3827
	lods	byte [esi]
3828
	call	convert_register
3829
	mov	[postbyte_register],al
3830
	pop	cx bx edx
3831
	mov	al,ah
3832
	cmp	al,1
3833
	je	basic_486_mem_reg_8bit
3834
	call	operand_autodetect
3835
	inc	[extended_code]
3836
      basic_486_mem_reg_8bit:
3837
	call	store_instruction
3838
	jmp	instruction_assembled
3839
      basic_486_reg:
3840
	lods	byte [esi]
3841
	call	convert_register
3842
	mov	[postbyte_register],al
3843
	lods	byte [esi]
3844
	cmp	al,','
3845
	jne	invalid_operand
3846
	lods	byte [esi]
3847
	call	get_size_operator
3848
	cmp	al,10h
3849
	jne	invalid_operand
3850
	lods	byte [esi]
3851
	call	convert_register
3852
	mov	bl,[postbyte_register]
3853
	mov	[postbyte_register],al
3854
	mov	al,ah
3855
	cmp	al,1
3856
	je	basic_486_reg_reg_8bit
3857
	call	operand_autodetect
3858
	inc	[extended_code]
3859
      basic_486_reg_reg_8bit:
3860
	call	store_nomem_instruction
3861
	jmp	instruction_assembled
3862
bswap_instruction:
3863
	lods	byte [esi]
3864
	call	get_size_operator
3865
	cmp	al,10h
3866
	jne	invalid_operand
3867
	lods	byte [esi]
3868
	call	convert_register
3869
	add	al,0C8h
3870
	mov	[extended_code],al
3871
	mov	[base_code],0Fh
3872
	cmp	ah,8
3873
	je	bswap_reg64
3874
	cmp	ah,4
3875
	jne	invalid_operand_size
3876
	call	operand_32bit
3877
	call	store_instruction_code
3878
	jmp	instruction_assembled
3879
      bswap_reg64:
3880
	call	operand_64bit
3881
	call	store_instruction_code
3882
	jmp	instruction_assembled
3883
cmpxchgx_instruction:
3884
	mov	[base_code],0Fh
3885
	mov	[extended_code],0C7h
3886
	mov	[postbyte_register],al
3887
	lods	byte [esi]
3888
	call	get_size_operator
3889
	cmp	al,'['
3890
	jne	invalid_operand
3891
	call	get_address
3892
	mov	ah,1
3893
	xchg	[postbyte_register],ah
3894
	mov	al,[operand_size]
3895
	or	al,al
3896
	jz	cmpxchgx_size_ok
3897
	cmp	al,ah
3898
	jne	invalid_operand_size
3899
      cmpxchgx_size_ok:
3900
	cmp	ah,16
3901
	jne	cmpxchgx_store
3902
	call	operand_64bit
3903
      cmpxchgx_store:
3904
	call	store_instruction
3905
	jmp	instruction_assembled
3906
3907
 
3908
	mov	[postbyte_register],al
3909
	mov	[base_code],0D8h
3910
	lods	byte [esi]
3911
	call	get_size_operator
3912
	cmp	al,10h
3913
	je	basic_fpu_streg
3914
	cmp	al,'['
3915
	je	basic_fpu_mem
3916
	dec	esi
3917
	mov	ah,[postbyte_register]
3918
	cmp	ah,2
3919
	jb	invalid_operand
3920
	cmp	ah,3
3921
	ja	invalid_operand
3922
	mov	bl,1
3923
	call	store_nomem_instruction
3924
	jmp	instruction_assembled
3925
      basic_fpu_mem:
3926
	call	get_address
3927
	mov	al,[operand_size]
3928
	cmp	al,4
3929
	je	basic_fpu_mem_32bit
3930
	cmp	al,8
3931
	je	basic_fpu_mem_64bit
3932
	or	al,al
3933
	jnz	invalid_operand_size
3934
	cmp	[error_line],0
3935
	jne	basic_fpu_mem_32bit
3936
	mov	eax,[current_line]
3937
	mov	[error_line],eax
3938
	mov	[error],operand_size_not_specified
3939
      basic_fpu_mem_32bit:
3940
	call	store_instruction
3941
	jmp	instruction_assembled
3942
      basic_fpu_mem_64bit:
3943
	mov	[base_code],0DCh
3944
	call	store_instruction
3945
	jmp	instruction_assembled
3946
      basic_fpu_streg:
3947
	lods	byte [esi]
3948
	call	convert_fpu_register
3949
	mov	bl,al
3950
	mov	ah,[postbyte_register]
3951
	cmp	ah,2
3952
	je	basic_fpu_single_streg
3953
	cmp	ah,3
3954
	je	basic_fpu_single_streg
3955
	or	al,al
3956
	jz	basic_fpu_st0
3957
	test	ah,110b
3958
	jz	basic_fpu_streg_st0
3959
	xor	[postbyte_register],1
3960
      basic_fpu_streg_st0:
3961
	lods	byte [esi]
3962
	cmp	al,','
3963
	jne	invalid_operand
3964
	lods	byte [esi]
3965
	call	get_size_operator
3966
	cmp	al,10h
3967
	jne	invalid_operand
3968
	lods	byte [esi]
3969
	call	convert_fpu_register
3970
	or	al,al
3971
	jnz	invalid_operand
3972
	mov	[base_code],0DCh
3973
	call	store_nomem_instruction
3974
	jmp	instruction_assembled
3975
      basic_fpu_st0:
3976
	lods	byte [esi]
3977
	cmp	al,','
3978
	jne	invalid_operand
3979
	lods	byte [esi]
3980
	call	get_size_operator
3981
	cmp	al,10h
3982
	jne	invalid_operand
3983
	lods	byte [esi]
3984
	call	convert_fpu_register
3985
	mov	bl,al
3986
      basic_fpu_single_streg:
3987
	mov	[base_code],0D8h
3988
	call	store_nomem_instruction
3989
	jmp	instruction_assembled
3990
simple_fpu_instruction:
3991
	mov	ah,al
3992
	or	ah,11000000b
3993
	mov	al,0D9h
3994
	stos	word [edi]
3995
	jmp	instruction_assembled
3996
fi_instruction:
3997
	mov	[postbyte_register],al
3998
	lods	byte [esi]
3999
	call	get_size_operator
4000
	cmp	al,'['
4001
	jne	invalid_operand
4002
	call	get_address
4003
	mov	al,[operand_size]
4004
	cmp	al,2
4005
	je	fi_mem_16bit
4006
	cmp	al,4
4007
	je	fi_mem_32bit
4008
	or	al,al
4009
	jnz	invalid_operand_size
4010
	cmp	[error_line],0
4011
	jne	fi_mem_32bit
4012
	mov	eax,[current_line]
4013
	mov	[error_line],eax
4014
	mov	[error],operand_size_not_specified
4015
      fi_mem_32bit:
4016
	mov	[base_code],0DAh
4017
	call	store_instruction
4018
	jmp	instruction_assembled
4019
      fi_mem_16bit:
4020
	mov	[base_code],0DEh
4021
	call	store_instruction
4022
	jmp	instruction_assembled
4023
fld_instruction:
4024
	mov	[postbyte_register],al
4025
	lods	byte [esi]
4026
	call	get_size_operator
4027
	cmp	al,10h
4028
	je	fld_streg
4029
	cmp	al,'['
4030
	jne	invalid_operand
4031
	call	get_address
4032
	mov	al,[operand_size]
4033
	cmp	al,4
4034
	je	fld_mem_32bit
4035
	cmp	al,8
4036
	je	fld_mem_64bit
4037
	cmp	al,10
4038
	je	fld_mem_80bit
4039
	or	al,al
4040
	jnz	invalid_operand_size
4041
	cmp	[error_line],0
4042
	jne	fld_mem_32bit
4043
	mov	eax,[current_line]
4044
	mov	[error_line],eax
4045
	mov	[error],operand_size_not_specified
4046
      fld_mem_32bit:
4047
	mov	[base_code],0D9h
4048
	call	store_instruction
4049
	jmp	instruction_assembled
4050
      fld_mem_64bit:
4051
	mov	[base_code],0DDh
4052
	call	store_instruction
4053
	jmp	instruction_assembled
4054
      fld_mem_80bit:
4055
	mov	al,[postbyte_register]
4056
	cmp	al,0
4057
	je	fld_mem_80bit_store
4058
	dec	[postbyte_register]
4059
	cmp	al,3
4060
	je	fld_mem_80bit_store
4061
	jmp	invalid_operand_size
4062
      fld_mem_80bit_store:
4063
	add	[postbyte_register],5
4064
	mov	[base_code],0DBh
4065
	call	store_instruction
4066
	jmp	instruction_assembled
4067
      fld_streg:
4068
	lods	byte [esi]
4069
	call	convert_fpu_register
4070
	mov	bl,al
4071
	cmp	[postbyte_register],2
4072
	jae	fst_streg
4073
	mov	[base_code],0D9h
4074
	call	store_nomem_instruction
4075
	jmp	instruction_assembled
4076
      fst_streg:
4077
	mov	[base_code],0DDh
4078
	call	store_nomem_instruction
4079
	jmp	instruction_assembled
4080
fild_instruction:
4081
	mov	[postbyte_register],al
4082
	lods	byte [esi]
4083
	call	get_size_operator
4084
	cmp	al,'['
4085
	jne	invalid_operand
4086
	call	get_address
4087
	mov	al,[operand_size]
4088
	cmp	al,2
4089
	je	fild_mem_16bit
4090
	cmp	al,4
4091
	je	fild_mem_32bit
4092
	cmp	al,8
4093
	je	fild_mem_64bit
4094
	or	al,al
4095
	jnz	invalid_operand_size
4096
	cmp	[error_line],0
4097
	jne	fild_mem_32bit
4098
	mov	eax,[current_line]
4099
	mov	[error_line],eax
4100
	mov	[error],operand_size_not_specified
4101
      fild_mem_32bit:
4102
	mov	[base_code],0DBh
4103
	call	store_instruction
4104
	jmp	instruction_assembled
4105
      fild_mem_16bit:
4106
	mov	[base_code],0DFh
4107
	call	store_instruction
4108
	jmp	instruction_assembled
4109
      fild_mem_64bit:
4110
	mov	al,[postbyte_register]
4111
	cmp	al,1
4112
	je	fisttp_64bit_store
4113
	jb	fild_mem_64bit_store
4114
	dec	[postbyte_register]
4115
	cmp	al,3
4116
	je	fild_mem_64bit_store
4117
	jmp	invalid_operand_size
4118
      fild_mem_64bit_store:
4119
	add	[postbyte_register],5
4120
	mov	[base_code],0DFh
4121
	call	store_instruction
4122
	jmp	instruction_assembled
4123
      fisttp_64bit_store:
4124
	mov	[base_code],0DDh
4125
	call	store_instruction
4126
	jmp	instruction_assembled
4127
fbld_instruction:
4128
	mov	[postbyte_register],al
4129
	lods	byte [esi]
4130
	call	get_size_operator
4131
	cmp	al,'['
4132
	jne	invalid_operand
4133
	call	get_address
4134
	mov	al,[operand_size]
4135
	or	al,al
4136
	jz	fbld_mem_80bit
4137
	cmp	al,10
4138
	je	fbld_mem_80bit
4139
	jmp	invalid_operand_size
4140
      fbld_mem_80bit:
4141
	mov	[base_code],0DFh
4142
	call	store_instruction
4143
	jmp	instruction_assembled
4144
faddp_instruction:
4145
	mov	[postbyte_register],al
4146
	mov	[base_code],0DEh
4147
	mov	edx,esi
4148
	lods	byte [esi]
4149
	call	get_size_operator
4150
	cmp	al,10h
4151
	je	faddp_streg
4152
	mov	esi,edx
4153
	mov	bl,1
4154
	call	store_nomem_instruction
4155
	jmp	instruction_assembled
4156
      faddp_streg:
4157
	lods	byte [esi]
4158
	call	convert_fpu_register
4159
	mov	bl,al
4160
	lods	byte [esi]
4161
	cmp	al,','
4162
	jne	invalid_operand
4163
	lods	byte [esi]
4164
	call	get_size_operator
4165
	cmp	al,10h
4166
	jne	invalid_operand
4167
	lods	byte [esi]
4168
	call	convert_fpu_register
4169
	or	al,al
4170
	jnz	invalid_operand
4171
	call	store_nomem_instruction
4172
	jmp	instruction_assembled
4173
fcompp_instruction:
4174
	mov	ax,0D9DEh
4175
	stos	word [edi]
4176
	jmp	instruction_assembled
4177
fucompp_instruction:
4178
	mov	ax,0E9DAh
4179
	stos	word [edi]
4180
	jmp	instruction_assembled
4181
fxch_instruction:
4182
	mov	dx,01D9h
4183
	jmp	fpu_single_operand
4184
ffreep_instruction:
4185
	mov	dx,00DFh
4186
	jmp	fpu_single_operand
4187
ffree_instruction:
4188
	mov	dl,0DDh
4189
	mov	dh,al
4190
      fpu_single_operand:
4191
	mov	ebx,esi
4192
	lods	byte [esi]
4193
	call	get_size_operator
4194
	cmp	al,10h
4195
	je	fpu_streg
4196
	or	dh,dh
4197
	jz	invalid_operand
4198
	mov	esi,ebx
4199
	shl	dh,3
4200
	or	dh,11000001b
4201
	mov	ax,dx
4202
	stos	word [edi]
4203
	jmp	instruction_assembled
4204
      fpu_streg:
4205
	lods	byte [esi]
4206
	call	convert_fpu_register
4207
	shl	dh,3
4208
	or	dh,al
4209
	or	dh,11000000b
4210
	mov	ax,dx
4211
	stos	word [edi]
4212
	jmp	instruction_assembled
4213
fstenv_instruction:
4214
	mov	byte [edi],9Bh
4215
	inc	edi
4216
fldenv_instruction:
4217
	mov	[base_code],0D9h
4218
	jmp	fpu_mem
4219
fsave_instruction:
4220
	mov	byte [edi],9Bh
4221
	inc	edi
4222
fnsave_instruction:
4223
	mov	[base_code],0DDh
4224
      fpu_mem:
4225
	mov	[postbyte_register],al
4226
	lods	byte [esi]
4227
	call	get_size_operator
4228
	cmp	al,'['
4229
	jne	invalid_operand
4230
	call	get_address
4231
	cmp	[operand_size],0
4232
	jne	invalid_operand_size
4233
	call	store_instruction
4234
	jmp	instruction_assembled
4235
fstcw_instruction:
4236
	mov	byte [edi],9Bh
4237
	inc	edi
4238
fldcw_instruction:
4239
	mov	[postbyte_register],al
4240
	mov	[base_code],0D9h
4241
	lods	byte [esi]
4242
	call	get_size_operator
4243
	cmp	al,'['
4244
	jne	invalid_operand
4245
	call	get_address
4246
	mov	al,[operand_size]
4247
	or	al,al
4248
	jz	fldcw_mem_16bit
4249
	cmp	al,2
4250
	je	fldcw_mem_16bit
4251
	jmp	invalid_operand_size
4252
      fldcw_mem_16bit:
4253
	call	store_instruction
4254
	jmp	instruction_assembled
4255
fstsw_instruction:
4256
	mov	al,9Bh
4257
	stos	byte [edi]
4258
fnstsw_instruction:
4259
	mov	[base_code],0DDh
4260
	mov	[postbyte_register],7
4261
	lods	byte [esi]
4262
	call	get_size_operator
4263
	cmp	al,10h
4264
	je	fstsw_reg
4265
	cmp	al,'['
4266
	jne	invalid_operand
4267
	call	get_address
4268
	mov	al,[operand_size]
4269
	or	al,al
4270
	jz	fstsw_mem_16bit
4271
	cmp	al,2
4272
	je	fstsw_mem_16bit
4273
	jmp	invalid_operand_size
4274
      fstsw_mem_16bit:
4275
	call	store_instruction
4276
	jmp	instruction_assembled
4277
      fstsw_reg:
4278
	lods	byte [esi]
4279
	call	convert_register
4280
	cmp	ax,0200h
4281
	jne	invalid_operand
4282
	mov	ax,0E0DFh
4283
	stos	word [edi]
4284
	jmp	instruction_assembled
4285
finit_instruction:
4286
	mov	byte [edi],9Bh
4287
	inc	edi
4288
fninit_instruction:
4289
	mov	ah,al
4290
	mov	al,0DBh
4291
	stos	word [edi]
4292
	jmp	instruction_assembled
4293
fcmov_instruction:
4294
	mov	dh,0DAh
4295
	jmp	fcomi_streg
4296
fcomi_instruction:
4297
	mov	dh,0DBh
4298
	jmp	fcomi_streg
4299
fcomip_instruction:
4300
	mov	dh,0DFh
4301
      fcomi_streg:
4302
	mov	dl,al
4303
	lods	byte [esi]
4304
	call	get_size_operator
4305
	cmp	al,10h
4306
	jne	invalid_operand
4307
	lods	byte [esi]
4308
	call	convert_fpu_register
4309
	mov	ah,al
4310
	cmp	byte [esi],','
4311
	je	fcomi_st0_streg
4312
	add	ah,dl
4313
	mov	al,dh
4314
	stos	word [edi]
4315
	jmp	instruction_assembled
4316
      fcomi_st0_streg:
4317
	or	ah,ah
4318
	jnz	invalid_operand
4319
	inc	esi
4320
	lods	byte [esi]
4321
	call	get_size_operator
4322
	cmp	al,10h
4323
	jne	invalid_operand
4324
	lods	byte [esi]
4325
	call	convert_fpu_register
4326
	mov	ah,al
4327
	add	ah,dl
4328
	mov	al,dh
4329
	stos	word [edi]
4330
	jmp	instruction_assembled
4331
4332
 
4333
	mov	[base_code],0Fh
4334
	mov	[extended_code],al
4335
	lods	byte [esi]
4336
	call	get_size_operator
4337
	cmp	al,10h
4338
	jne	invalid_operand
4339
	lods	byte [esi]
4340
	call	convert_mmx_register
4341
	call	make_mmx_prefix
4342
	mov	[postbyte_register],al
4343
	lods	byte [esi]
4344
	cmp	al,','
4345
	jne	invalid_operand
4346
	lods	byte [esi]
4347
	call	get_size_operator
4348
	cmp	al,10h
4349
	je	mmx_mmreg_mmreg
4350
	cmp	al,'['
4351
	jne	invalid_operand
4352
      mmx_mmreg_mem:
4353
	call	get_address
4354
	call	store_instruction
4355
	jmp	instruction_assembled
4356
      mmx_mmreg_mmreg:
4357
	lods	byte [esi]
4358
	call	convert_mmx_register
4359
	mov	bl,al
4360
	call	store_nomem_instruction
4361
	jmp	instruction_assembled
4362
mmx_ps_instruction:
4363
	mov	[base_code],0Fh
4364
	mov	[extended_code],al
4365
	lods	byte [esi]
4366
	call	get_size_operator
4367
	cmp	al,10h
4368
	jne	invalid_operand
4369
	lods	byte [esi]
4370
	call	convert_mmx_register
4371
	call	make_mmx_prefix
4372
	mov	[postbyte_register],al
4373
	lods	byte [esi]
4374
	cmp	al,','
4375
	jne	invalid_operand
4376
	mov	[operand_size],0
4377
	lods	byte [esi]
4378
	call	get_size_operator
4379
	cmp	al,10h
4380
	je	mmx_mmreg_mmreg
4381
	cmp	al,'('
4382
	je	mmx_ps_mmreg_imm8
4383
	cmp	al,'['
4384
	je	mmx_mmreg_mem
4385
	jmp	invalid_operand
4386
      mmx_ps_mmreg_imm8:
4387
	call	get_byte_value
4388
	mov	byte [value],al
4389
	test	[operand_size],not 1
4390
	jnz	invalid_value
4391
	mov	bl,[extended_code]
4392
	mov	al,bl
4393
	shr	bl,4
4394
	and	al,1111b
4395
	add	al,70h
4396
	mov	[extended_code],al
4397
	sub	bl,0Ch
4398
	shl	bl,1
4399
	xchg	bl,[postbyte_register]
4400
	call	store_nomem_instruction
4401
	mov	al,byte [value]
4402
	stos	byte [edi]
4403
	jmp	instruction_assembled
4404
pextrw_instruction:
4405
	mov	[base_code],0Fh
4406
	mov	[extended_code],al
4407
	lods	byte [esi]
4408
	call	get_size_operator
4409
	cmp	al,10h
4410
	jne	invalid_operand
4411
	lods	byte [esi]
4412
	call	convert_register
4413
	cmp	ah,4
4414
	jnz	invalid_operand_size
4415
	mov	[postbyte_register],al
4416
	mov	[operand_size],0
4417
	lods	byte [esi]
4418
	cmp	al,','
4419
	jne	invalid_operand
4420
	lods	byte [esi]
4421
	call	get_size_operator
4422
	cmp	al,10h
4423
	jne	invalid_operand
4424
	lods	byte [esi]
4425
	call	convert_mmx_register
4426
	mov	bl,al
4427
	call	make_mmx_prefix
4428
	cmp	[extended_code],0C5h
4429
	je	mmx_nomem_imm8
4430
	call	store_nomem_instruction
4431
	jmp	instruction_assembled
4432
      mmx_imm8:
4433
	push	bx cx edx
4434
	mov	[operand_size],0
4435
	lods	byte [esi]
4436
	cmp	al,','
4437
	jne	invalid_operand
4438
	lods	byte [esi]
4439
	call	get_size_operator
4440
	test	ah,not 1
4441
	jnz	invalid_operand_size
4442
	cmp	al,'('
4443
	jne	invalid_operand
4444
	call	get_byte_value
4445
	mov	byte [value],al
4446
	pop	edx cx bx
4447
	call	store_instruction_with_imm8
4448
	jmp	instruction_assembled
4449
      mmx_nomem_imm8:
4450
	call	store_nomem_instruction
4451
	mov	[operand_size],0
4452
	lods	byte [esi]
4453
	cmp	al,','
4454
	jne	invalid_operand
4455
	lods	byte [esi]
4456
	call	get_size_operator
4457
	test	ah,not 1
4458
	jnz	invalid_operand_size
4459
	cmp	al,'('
4460
	jne	invalid_operand
4461
	call	get_byte_value
4462
	stosb
4463
	jmp	instruction_assembled
4464
pinsrw_instruction:
4465
	mov	[extended_code],al
4466
	mov	[base_code],0Fh
4467
	lods	byte [esi]
4468
	call	get_size_operator
4469
	cmp	al,10h
4470
	jne	invalid_operand
4471
	lods	byte [esi]
4472
	call	convert_mmx_register
4473
	call	make_mmx_prefix
4474
	mov	[postbyte_register],al
4475
	mov	[operand_size],0
4476
	lods	byte [esi]
4477
	cmp	al,','
4478
	jne	invalid_operand
4479
	lods	byte [esi]
4480
	call	get_size_operator
4481
	cmp	al,10h
4482
	je	pinsrw_mmreg_reg
4483
	cmp	al,'['
4484
	jne	invalid_operand
4485
	call	get_address
4486
	cmp	[operand_size],0
4487
	je	mmx_imm8
4488
	cmp	[operand_size],2
4489
	jne	invalid_operand_size
4490
	jmp	mmx_imm8
4491
      pinsrw_mmreg_reg:
4492
	lods	byte [esi]
4493
	call	convert_register
4494
	cmp	ah,4
4495
	jne	invalid_operand_size
4496
	mov	bl,al
4497
	jmp	mmx_nomem_imm8
4498
pshufw_instruction:
4499
	mov	[mmx_size],8
4500
	mov	[operand_prefix],al
4501
	jmp	pshuf_instruction
4502
pshufd_instruction:
4503
	mov	[mmx_size],16
4504
	mov	[operand_prefix],al
4505
      pshuf_instruction:
4506
	mov	[base_code],0Fh
4507
	mov	[extended_code],70h
4508
	lods	byte [esi]
4509
	call	get_size_operator
4510
	cmp	al,10h
4511
	jne	invalid_operand
4512
	lods	byte [esi]
4513
	call	convert_mmx_register
4514
	cmp	ah,[mmx_size]
4515
	jne	invalid_operand_size
4516
	mov	[postbyte_register],al
4517
	lods	byte [esi]
4518
	cmp	al,','
4519
	jne	invalid_operand
4520
	lods	byte [esi]
4521
	call	get_size_operator
4522
	cmp	al,10h
4523
	je	pshuf_mmreg_mmreg
4524
	cmp	al,'['
4525
	jne	invalid_operand
4526
	call	get_address
4527
	jmp	mmx_imm8
4528
      pshuf_mmreg_mmreg:
4529
	lods	byte [esi]
4530
	call	convert_mmx_register
4531
	mov	bl,al
4532
	jmp	mmx_nomem_imm8
4533
movd_instruction:
4534
	mov	[base_code],0Fh
4535
	mov	[extended_code],7Eh
4536
	lods	byte [esi]
4537
	call	get_size_operator
4538
	cmp	al,10h
4539
	je	movd_reg
4540
	cmp	al,'['
4541
	jne	invalid_operand
4542
	call	get_address
4543
	test	[operand_size],not 4
4544
	jnz	invalid_operand_size
4545
	mov	[operand_size],0
4546
	lods	byte [esi]
4547
	cmp	al,','
4548
	jne	invalid_operand
4549
	lods	byte [esi]
4550
	call	get_size_operator
4551
	cmp	al,10h
4552
	jne	invalid_operand
4553
	lods	byte [esi]
4554
	call	convert_mmx_register
4555
	call	make_mmx_prefix
4556
	mov	[postbyte_register],al
4557
	call	store_instruction
4558
	jmp	instruction_assembled
4559
      movd_reg:
4560
	lods	byte [esi]
4561
	cmp	al,0B0h
4562
	jae	movd_mmreg
4563
	call	convert_register
4564
	cmp	ah,4
4565
	jne	invalid_operand_size
4566
	mov	[operand_size],0
4567
	mov	bl,al
4568
	lods	byte [esi]
4569
	cmp	al,','
4570
	jne	invalid_operand
4571
	lods	byte [esi]
4572
	call	get_size_operator
4573
	cmp	al,10h
4574
	jne	invalid_operand
4575
	lods	byte [esi]
4576
	call	convert_mmx_register
4577
	mov	[postbyte_register],al
4578
	call	make_mmx_prefix
4579
	call	store_nomem_instruction
4580
	jmp	instruction_assembled
4581
      movd_mmreg:
4582
	mov	[extended_code],6Eh
4583
	call	convert_mmx_register
4584
	call	make_mmx_prefix
4585
	mov	[postbyte_register],al
4586
	mov	[operand_size],0
4587
	lods	byte [esi]
4588
	cmp	al,','
4589
	jne	invalid_operand
4590
	lods	byte [esi]
4591
	call	get_size_operator
4592
	cmp	al,10h
4593
	je	movd_mmreg_reg
4594
	cmp	al,'['
4595
	jne	invalid_operand
4596
	call	get_address
4597
	test	[operand_size],not 4
4598
	jnz	invalid_operand_size
4599
	call	store_instruction
4600
	jmp	instruction_assembled
4601
      movd_mmreg_reg:
4602
	lods	byte [esi]
4603
	call	convert_register
4604
	cmp	ah,4
4605
	jne	invalid_operand_size
4606
	mov	bl,al
4607
	call	store_nomem_instruction
4608
	jmp	instruction_assembled
4609
      make_mmx_prefix:
4610
	cmp	[operand_size],16
4611
	jne	no_mmx_prefix
4612
	mov	[operand_prefix],66h
4613
      no_mmx_prefix:
4614
	ret
4615
movq_instruction:
4616
	mov	[base_code],0Fh
4617
	lods	byte [esi]
4618
	call	get_size_operator
4619
	cmp	al,10h
4620
	je	movq_reg
4621
	cmp	al,'['
4622
	jne	invalid_operand
4623
	call	get_address
4624
	test	[operand_size],not 8
4625
	jnz	invalid_operand_size
4626
	mov	[operand_size],0
4627
	lods	byte [esi]
4628
	cmp	al,','
4629
	jne	invalid_operand
4630
	lods	byte [esi]
4631
	cmp	al,10h
4632
	jne	invalid_operand
4633
	lods	byte [esi]
4634
	call	convert_mmx_register
4635
	mov	[postbyte_register],al
4636
	cmp	ah,16
4637
	je	movq_mem_xmmreg
4638
	mov	[extended_code],7Fh
4639
	call	store_instruction
4640
	jmp	instruction_assembled
4641
     movq_mem_xmmreg:
4642
	mov	[extended_code],0D6h
4643
	mov	[operand_prefix],66h
4644
	call	store_instruction
4645
	jmp	instruction_assembled
4646
     movq_reg:
4647
	lods	byte [esi]
4648
	cmp	al,0B0h
4649
	jae	movq_mmreg
4650
	call	convert_register
4651
	cmp	ah,8
4652
	jne	invalid_operand_size
4653
	mov	[operand_size],0
4654
	mov	bl,al
4655
	lods	byte [esi]
4656
	cmp	al,','
4657
	jne	invalid_operand
4658
	lods	byte [esi]
4659
	call	get_size_operator
4660
	cmp	al,10h
4661
	jne	invalid_operand
4662
	lods	byte [esi]
4663
	call	convert_mmx_register
4664
	mov	[postbyte_register],al
4665
	call	make_mmx_prefix
4666
	mov	[extended_code],7Eh
4667
	call	operand_64bit
4668
	call	store_nomem_instruction
4669
	jmp	instruction_assembled
4670
     movq_mmreg:
4671
	call	convert_mmx_register
4672
	mov	[postbyte_register],al
4673
	mov	[extended_code],6Fh
4674
	cmp	ah,16
4675
	jne	movq_mmreg_
4676
	mov	[extended_code],7Eh
4677
	mov	[operand_prefix],0F3h
4678
      movq_mmreg_:
4679
	lods	byte [esi]
4680
	cmp	al,','
4681
	jne	invalid_operand
4682
	mov	[operand_size],0
4683
	lods	byte [esi]
4684
	call	get_size_operator
4685
	cmp	al,10h
4686
	je	movq_mmreg_reg
4687
	call	get_address
4688
	test	[operand_size],not 8
4689
	jnz	invalid_operand_size
4690
	call	store_instruction
4691
	jmp	instruction_assembled
4692
      movq_mmreg_reg:
4693
	lods	byte [esi]
4694
	cmp	al,0B0h
4695
	jae	movq_mmreg_mmreg
4696
	mov	[operand_size],0
4697
	call	convert_register
4698
	cmp	ah,8
4699
	jne	invalid_operand_size
4700
	mov	[extended_code],6Eh
4701
	mov	[operand_prefix],0
4702
	mov	bl,al
4703
	call	make_mmx_prefix
4704
	call	operand_64bit
4705
	call	store_nomem_instruction
4706
	jmp	instruction_assembled
4707
      movq_mmreg_mmreg:
4708
	call	convert_mmx_register
4709
	mov	bl,al
4710
	call	store_nomem_instruction
4711
	jmp	instruction_assembled
4712
movdq_instruction:
4713
	mov	[operand_prefix],al
4714
	mov	[base_code],0Fh
4715
	mov	[extended_code],6Fh
4716
	lods	byte [esi]
4717
	call	get_size_operator
4718
	cmp	al,10h
4719
	je	movdq_mmreg
4720
	cmp	al,'['
4721
	jne	invalid_operand
4722
	call	get_address
4723
	lods	byte [esi]
4724
	cmp	al,','
4725
	jne	invalid_operand
4726
	lods	byte [esi]
4727
	call	get_size_operator
4728
	cmp	al,10h
4729
	jne	invalid_operand
4730
	lods	byte [esi]
4731
	call	convert_mmx_register
4732
	cmp	ah,16
4733
	jne	invalid_operand_size
4734
	mov	[postbyte_register],al
4735
	mov	[extended_code],7Fh
4736
	call	store_instruction
4737
	jmp	instruction_assembled
4738
      movdq_mmreg:
4739
	lods	byte [esi]
4740
	call	convert_mmx_register
4741
	cmp	ah,16
4742
	jne	invalid_operand_size
4743
	mov	[postbyte_register],al
4744
	lods	byte [esi]
4745
	cmp	al,','
4746
	jne	invalid_operand
4747
	lods	byte [esi]
4748
	call	get_size_operator
4749
	cmp	al,10h
4750
	je	movdq_mmreg_mmreg
4751
	cmp	al,'['
4752
	jne	invalid_operand
4753
	call	get_address
4754
	call	store_instruction
4755
	jmp	instruction_assembled
4756
      movdq_mmreg_mmreg:
4757
	lods	byte [esi]
4758
	call	convert_mmx_register
4759
	cmp	ah,16
4760
	jne	invalid_operand_size
4761
	mov	bl,al
4762
	call	store_nomem_instruction
4763
	jmp	instruction_assembled
4764
lddqu_instruction:
4765
	lods	byte [esi]
4766
	call	get_size_operator
4767
	cmp	al,10h
4768
	jne	invalid_operand
4769
	lods	byte [esi]
4770
	call	convert_mmx_register
4771
	cmp	ah,16
4772
	jne	invalid_operand_size
4773
	push	eax
4774
	lods	byte [esi]
4775
	cmp	al,','
4776
	jne	invalid_operand
4777
	lods	byte [esi]
4778
	call	get_size_operator
4779
	cmp	al,'['
4780
	jne	invalid_operand
4781
	call	get_address
4782
	pop	eax
4783
	mov	[postbyte_register],al
4784
	mov	[operand_prefix],0F2h
4785
	mov	[base_code],0Fh
4786
	mov	[extended_code],0F0h
4787
	call	store_instruction
4788
	jmp	instruction_assembled
4789
movq2dq_instruction:
4790
	lods	byte [esi]
4791
	call	get_size_operator
4792
	cmp	al,10h
4793
	jne	invalid_operand
4794
	lods	byte [esi]
4795
	call	convert_mmx_register
4796
	cmp	ah,16
4797
	jne	invalid_operand_size
4798
	mov	[postbyte_register],al
4799
	mov	[operand_size],0
4800
	lods	byte [esi]
4801
	cmp	al,','
4802
	jne	invalid_operand
4803
	lods	byte [esi]
4804
	call	get_size_operator
4805
	cmp	al,10h
4806
	jne	invalid_operand
4807
	lods	byte [esi]
4808
	call	convert_mmx_register
4809
	cmp	ah,8
4810
	jne	invalid_operand_size
4811
	mov	bl,al
4812
	mov	[operand_prefix],0F3h
4813
	mov	[base_code],0Fh
4814
	mov	[extended_code],0D6h
4815
	call	store_nomem_instruction
4816
	jmp	instruction_assembled
4817
movdq2q_instruction:
4818
	lods	byte [esi]
4819
	call	get_size_operator
4820
	cmp	al,10h
4821
	jne	invalid_operand
4822
	lods	byte [esi]
4823
	call	convert_mmx_register
4824
	cmp	ah,8
4825
	jne	invalid_operand_size
4826
	mov	[postbyte_register],al
4827
	mov	[operand_size],0
4828
	lods	byte [esi]
4829
	cmp	al,','
4830
	jne	invalid_operand
4831
	lods	byte [esi]
4832
	call	get_size_operator
4833
	cmp	al,10h
4834
	jne	invalid_operand
4835
	lods	byte [esi]
4836
	call	convert_mmx_register
4837
	cmp	ah,16
4838
	jne	invalid_operand_size
4839
	mov	bl,al
4840
	mov	[operand_prefix],0F2h
4841
	mov	[base_code],0Fh
4842
	mov	[extended_code],0D6h
4843
	call	store_nomem_instruction
4844
	jmp	instruction_assembled
4845
4846
 
4847
	mov	[mmx_size],16
4848
	jmp	sse_instruction
4849
sse_pd_instruction:
4850
	mov	[mmx_size],16
4851
	mov	[operand_prefix],66h
4852
	jmp	sse_instruction
4853
sse_ss_instruction:
4854
	mov	[mmx_size],4
4855
	mov	[operand_prefix],0F3h
4856
	jmp	sse_instruction
4857
sse_sd_instruction:
4858
	mov	[mmx_size],8
4859
	mov	[operand_prefix],0F2h
4860
	jmp	sse_instruction
4861
comiss_instruction:
4862
	mov	[mmx_size],4
4863
	jmp	sse_instruction
4864
comisd_instruction:
4865
	mov	[mmx_size],8
4866
	mov	[operand_prefix],66h
4867
	jmp	sse_instruction
4868
cvtps2pd_instruction:
4869
	mov	[mmx_size],8
4870
	jmp	sse_instruction
4871
cvtpd2dq_instruction:
4872
	mov	[mmx_size],16
4873
	mov	[operand_prefix],0F2h
4874
	jmp	sse_instruction
4875
cvtdq2pd_instruction:
4876
	mov	[mmx_size],16
4877
	mov	[operand_prefix],0F3h
4878
sse_instruction:
4879
	mov	[base_code],0Fh
4880
	mov	[extended_code],al
4881
	lods	byte [esi]
4882
	call	get_size_operator
4883
	cmp	al,10h
4884
	jne	invalid_operand
4885
      sse_xmmreg:
4886
	lods	byte [esi]
4887
	call	convert_mmx_register
4888
	cmp	ah,16
4889
	jne	invalid_operand_size
4890
      sse_reg:
4891
	mov	[postbyte_register],al
4892
	mov	[operand_size],0
4893
	lods	byte [esi]
4894
	cmp	al,','
4895
	jne	invalid_operand
4896
	lods	byte [esi]
4897
	call	get_size_operator
4898
	cmp	al,10h
4899
	je	sse_xmmreg_xmmreg
4900
      sse_reg_mem:
4901
	cmp	al,'['
4902
	jne	invalid_operand
4903
	call	get_address
4904
	cmp	[operand_size],0
4905
	je	sse_mem_size_ok
4906
	mov	al,[mmx_size]
4907
	cmp	[operand_size],al
4908
	jne	invalid_operand_size
4909
      sse_mem_size_ok:
4910
	cmp	[extended_code],0C6h
4911
	je	mmx_imm8
4912
	call	store_instruction
4913
	jmp	instruction_assembled
4914
      sse_xmmreg_xmmreg:
4915
	cmp	[operand_prefix],66h
4916
	jne	sse_xmmreg_xmmreg_ok
4917
	cmp	[extended_code],12h
4918
	je	invalid_operand
4919
	cmp	[extended_code],16h
4920
	je	invalid_operand
4921
      sse_xmmreg_xmmreg_ok:
4922
	lods	byte [esi]
4923
	call	convert_mmx_register
4924
	cmp	ah,16
4925
	jne	invalid_operand_size
4926
	mov	bl,al
4927
	cmp	[extended_code],0C6h
4928
	je	mmx_nomem_imm8
4929
	call	store_nomem_instruction
4930
	jmp	instruction_assembled
4931
ps_dq_instruction:
4932
	mov	[postbyte_register],al
4933
	mov	[operand_prefix],66h
4934
	mov	[base_code],0Fh
4935
	mov	[extended_code],73h
4936
	lods	byte [esi]
4937
	call	get_size_operator
4938
	cmp	al,10h
4939
	jne	invalid_operand
4940
	lods	byte [esi]
4941
	call	convert_mmx_register
4942
	cmp	ah,16
4943
	jne	invalid_operand_size
4944
	mov	bl,al
4945
	jmp	mmx_nomem_imm8
4946
movpd_instruction:
4947
	mov	[operand_prefix],66h
4948
movps_instruction:
4949
	mov	[base_code],0Fh
4950
	mov	[extended_code],al
4951
	mov	[mmx_size],16
4952
	jmp	sse_mov_instruction
4953
movss_instruction:
4954
	mov	[mmx_size],4
4955
	mov	[operand_prefix],0F3h
4956
	jmp	sse_movs
4957
movsd_instruction:
4958
	mov	al,0A5h
4959
	mov	ah,[esi]
4960
	or	ah,ah
4961
	jz	simple_instruction_32bit
4962
	cmp	ah,0Fh
4963
	je	simple_instruction_32bit
4964
	mov	[mmx_size],8
4965
	mov	[operand_prefix],0F2h
4966
      sse_movs:
4967
	mov	[base_code],0Fh
4968
	mov	[extended_code],10h
4969
	jmp	sse_mov_instruction
4970
sse_mov_instruction:
4971
	lods	byte [esi]
4972
	call	get_size_operator
4973
	cmp	al,10h
4974
	je	sse_xmmreg
4975
      sse_mem:
4976
	cmp	al,'['
4977
	jne	invalid_operand
4978
	inc	[extended_code]
4979
	call	get_address
4980
	cmp	[operand_size],0
4981
	je	sse_mem_xmmreg
4982
	mov	al,[mmx_size]
4983
	cmp	[operand_size],al
4984
	jne	invalid_operand_size
4985
	mov	[operand_size],0
4986
      sse_mem_xmmreg:
4987
	lods	byte [esi]
4988
	cmp	al,','
4989
	jne	invalid_operand
4990
	lods	byte [esi]
4991
	call	get_size_operator
4992
	cmp	al,10h
4993
	jne	invalid_operand
4994
	lods	byte [esi]
4995
	call	convert_mmx_register
4996
	cmp	ah,16
4997
	jne	invalid_operand_size
4998
	mov	[postbyte_register],al
4999
	call	store_instruction
5000
	jmp	instruction_assembled
5001
movlpd_instruction:
5002
	mov	[operand_prefix],66h
5003
movlps_instruction:
5004
	mov	[base_code],0Fh
5005
	mov	[extended_code],al
5006
	mov	[mmx_size],8
5007
	lods	byte [esi]
5008
	call	get_size_operator
5009
	cmp	al,10h
5010
	jne	sse_mem
5011
	lods	byte [esi]
5012
	call	convert_mmx_register
5013
	cmp	ah,16
5014
	jne	invalid_operand_size
5015
	mov	[postbyte_register],al
5016
	mov	[operand_size],0
5017
	lods	byte [esi]
5018
	cmp	al,','
5019
	jne	invalid_operand
5020
	lods	byte [esi]
5021
	call	get_size_operator
5022
	jmp	sse_reg_mem
5023
movhlps_instruction:
5024
	mov	[base_code],0Fh
5025
	mov	[extended_code],al
5026
	mov	[mmx_size],0
5027
	lods	byte [esi]
5028
	call	get_size_operator
5029
	cmp	al,10h
5030
	jne	invalid_operand
5031
	lods	byte [esi]
5032
	call	convert_mmx_register
5033
	cmp	ah,16
5034
	jne	invalid_operand_size
5035
	mov	[postbyte_register],al
5036
	lods	byte [esi]
5037
	cmp	al,','
5038
	jne	invalid_operand
5039
	lods	byte [esi]
5040
	call	get_size_operator
5041
	cmp	al,10h
5042
	je	sse_xmmreg_xmmreg_ok
5043
	jmp	invalid_operand
5044
maskmovq_instruction:
5045
	mov	cl,8
5046
	jmp	maskmov_instruction
5047
maskmovdqu_instruction:
5048
	mov	cl,16
5049
	mov	[operand_prefix],66h
5050
      maskmov_instruction:
5051
	mov	[base_code],0Fh
5052
	mov	[extended_code],0F7h
5053
	lods	byte [esi]
5054
	call	get_size_operator
5055
	cmp	al,10h
5056
	jne	invalid_operand
5057
	lods	byte [esi]
5058
	call	convert_mmx_register
5059
	cmp	ah,cl
5060
	jne	invalid_operand_size
5061
	mov	[postbyte_register],al
5062
	lods	byte [esi]
5063
	cmp	al,','
5064
	jne	invalid_operand
5065
	lods	byte [esi]
5066
	call	get_size_operator
5067
	cmp	al,10h
5068
	jne	invalid_operand
5069
	lods	byte [esi]
5070
	call	convert_mmx_register
5071
	mov	bl,al
5072
	call	store_nomem_instruction
5073
	jmp	instruction_assembled
5074
movmskpd_instruction:
5075
	mov	[operand_prefix],66h
5076
movmskps_instruction:
5077
	mov	[base_code],0Fh
5078
	mov	[extended_code],50h
5079
	lods	byte [esi]
5080
	call	get_size_operator
5081
	cmp	al,10h
5082
	jne	invalid_operand
5083
	lods	byte [esi]
5084
	call	convert_register
5085
	cmp	ah,4
5086
	jne	invalid_operand_size
5087
	mov	[operand_size],0
5088
	mov	[postbyte_register],al
5089
	lods	byte [esi]
5090
	cmp	al,','
5091
	jne	invalid_operand
5092
	lods	byte [esi]
5093
	call	get_size_operator
5094
	cmp	al,10h
5095
	jne	invalid_operand
5096
	lods	byte [esi]
5097
	call	convert_mmx_register
5098
	cmp	ah,16
5099
	jne	invalid_operand_size
5100
	mov	bl,al
5101
	call	store_nomem_instruction
5102
	jmp	instruction_assembled
5103
cmppd_instruction:
5104
	mov	[operand_prefix],66h
5105
cmpps_instruction:
5106
	mov	[base_code],0Fh
5107
	mov	[extended_code],0C2h
5108
	mov	[mmx_size],16
5109
	mov	byte [value],-1
5110
	jmp	sse_cmp_instruction
5111
cmp_pd_instruction:
5112
	mov	[operand_prefix],66h
5113
cmp_ps_instruction:
5114
	mov	[base_code],0Fh
5115
	mov	[extended_code],0C2h
5116
	mov	[mmx_size],16
5117
	mov	byte [value],al
5118
	jmp	sse_cmp_instruction
5119
cmpss_instruction:
5120
	mov	[mmx_size],4
5121
	mov	[operand_prefix],0F3h
5122
	jmp	cmpsx_instruction
5123
cmpsd_instruction:
5124
	mov	al,0A7h
5125
	mov	ah,[esi]
5126
	or	ah,ah
5127
	jz	simple_instruction_32bit
5128
	cmp	ah,0Fh
5129
	je	simple_instruction_32bit
5130
	mov	[mmx_size],8
5131
	mov	[operand_prefix],0F2h
5132
      cmpsx_instruction:
5133
	mov	[base_code],0Fh
5134
	mov	[extended_code],0C2h
5135
	mov	byte [value],-1
5136
	jmp	sse_cmp_instruction
5137
cmp_ss_instruction:
5138
	mov	[mmx_size],4
5139
	mov	[operand_prefix],0F3h
5140
	jmp	cmp_sx_instruction
5141
cmp_sd_instruction:
5142
	mov	[mmx_size],8
5143
	mov	[operand_prefix],0F2h
5144
      cmp_sx_instruction:
5145
	mov	[base_code],0Fh
5146
	mov	[extended_code],0C2h
5147
	mov	byte [value],al
5148
sse_cmp_instruction:
5149
	lods	byte [esi]
5150
	call	get_size_operator
5151
	cmp	al,10h
5152
	jne	invalid_operand
5153
	lods	byte [esi]
5154
	call	convert_mmx_register
5155
	cmp	ah,16
5156
	jne	invalid_operand_size
5157
	mov	[postbyte_register],al
5158
	lods	byte [esi]
5159
	cmp	al,','
5160
	jne	invalid_operand
5161
	mov	[operand_size],0
5162
	lods	byte [esi]
5163
	call	get_size_operator
5164
	cmp	al,10h
5165
	je	sse_cmp_xmmreg_xmmreg
5166
	cmp	al,'['
5167
	jne	invalid_operand
5168
	call	get_address
5169
	mov	al,[operand_size]
5170
	or	al,al
5171
	jz	sse_cmp_size_ok
5172
	cmp	al,[mmx_size]
5173
	jne	invalid_operand_size
5174
      sse_cmp_size_ok:
5175
	push	bx cx edx
5176
	call	get_nextbyte
5177
	pop	edx cx bx
5178
	call	store_instruction_with_imm8
5179
	jmp	instruction_assembled
5180
      sse_cmp_xmmreg_xmmreg:
5181
	lods	byte [esi]
5182
	call	convert_mmx_register
5183
	cmp	ah,16
5184
	jne	invalid_operand_size
5185
	mov	bl,al
5186
	call	store_nomem_instruction
5187
	call	get_nextbyte
5188
	mov	al,byte [value]
5189
	stos	byte [edi]
5190
	jmp	instruction_assembled
5191
      get_nextbyte:
5192
	cmp	byte [value],-1
5193
	jne	nextbyte_ok
5194
	mov	[operand_size],0
5195
	lods	byte [esi]
5196
	cmp	al,','
5197
	jne	invalid_operand
5198
	lods	byte [esi]
5199
	call	get_size_operator
5200
	test	[operand_size],not 1
5201
	jnz	invalid_value
5202
	cmp	al,'('
5203
	jne	invalid_operand
5204
	call	get_byte_value
5205
	cmp	al,7
5206
	ja	invalid_value
5207
	mov	byte [value],al
5208
      nextbyte_ok:
5209
	ret
5210
cvtpi2pd_instruction:
5211
	mov	[operand_prefix],66h
5212
cvtpi2ps_instruction:
5213
	mov	[base_code],0Fh
5214
	mov	[extended_code],al
5215
	lods	byte [esi]
5216
	call	get_size_operator
5217
	cmp	al,10h
5218
	jne	invalid_operand
5219
	lods	byte [esi]
5220
	call	convert_mmx_register
5221
	cmp	ah,16
5222
	jne	invalid_operand_size
5223
	mov	[postbyte_register],al
5224
	mov	[operand_size],0
5225
	lods	byte [esi]
5226
	cmp	al,','
5227
	jne	invalid_operand
5228
	lods	byte [esi]
5229
	call	get_size_operator
5230
	cmp	al,10h
5231
	je	cvtpi_xmmreg_xmmreg
5232
	cmp	al,'['
5233
	jne	invalid_operand
5234
	call	get_address
5235
	cmp	[operand_size],0
5236
	je	cvtpi_size_ok
5237
	cmp	[operand_size],8
5238
	jne	invalid_operand_size
5239
      cvtpi_size_ok:
5240
	call	store_instruction
5241
	jmp	instruction_assembled
5242
      cvtpi_xmmreg_xmmreg:
5243
	lods	byte [esi]
5244
	call	convert_mmx_register
5245
	cmp	ah,8
5246
	jne	invalid_operand_size
5247
	mov	bl,al
5248
	call	store_nomem_instruction
5249
	jmp	instruction_assembled
5250
cvtsi2ss_instruction:
5251
	mov	[operand_prefix],0F3h
5252
	jmp	cvtsi_instruction
5253
cvtsi2sd_instruction:
5254
	mov	[operand_prefix],0F2h
5255
      cvtsi_instruction:
5256
	mov	[base_code],0Fh
5257
	mov	[extended_code],al
5258
	lods	byte [esi]
5259
	call	get_size_operator
5260
	cmp	al,10h
5261
	jne	invalid_operand
5262
	lods	byte [esi]
5263
	call	convert_mmx_register
5264
	cmp	ah,16
5265
	jne	invalid_operand_size
5266
	mov	[postbyte_register],al
5267
	mov	[operand_size],0
5268
	lods	byte [esi]
5269
	cmp	al,','
5270
	jne	invalid_operand
5271
	lods	byte [esi]
5272
	call	get_size_operator
5273
	cmp	al,10h
5274
	je	cvtsi_xmmreg_reg
5275
	cmp	al,'['
5276
	jne	invalid_operand
5277
	call	get_address
5278
	cmp	[operand_size],0
5279
	je	cvtsi_size_ok
5280
	cmp	[operand_size],4
5281
	jne	invalid_operand_size
5282
      cvtsi_size_ok:
5283
	call	store_instruction
5284
	jmp	instruction_assembled
5285
      cvtsi_xmmreg_reg:
5286
	lods	byte [esi]
5287
	call	convert_register
5288
	cmp	ah,4
5289
	je	cvtsi_xmmreg_reg_store
5290
	cmp	ah,8
5291
	jne	invalid_operand_size
5292
	call	operand_64bit
5293
      cvtsi_xmmreg_reg_store:
5294
	mov	bl,al
5295
	call	store_nomem_instruction
5296
	jmp	instruction_assembled
5297
cvtps2pi_instruction:
5298
	mov	[mmx_size],8
5299
	jmp	cvtpd_instruction
5300
cvtpd2pi_instruction:
5301
	mov	[operand_prefix],66h
5302
	mov	[mmx_size],16
5303
      cvtpd_instruction:
5304
	mov	[base_code],0Fh
5305
	mov	[extended_code],al
5306
	lods	byte [esi]
5307
	call	get_size_operator
5308
	cmp	al,10h
5309
	jne	invalid_operand
5310
	lods	byte [esi]
5311
	call	convert_mmx_register
5312
	cmp	ah,8
5313
	jne	invalid_operand_size
5314
	mov	[operand_size],0
5315
	jmp	sse_reg
5316
cvtss2si_instruction:
5317
	mov	[operand_prefix],0F3h
5318
	mov	[mmx_size],4
5319
	jmp	cvt2si_instruction
5320
cvtsd2si_instruction:
5321
	mov	[operand_prefix],0F2h
5322
	mov	[mmx_size],8
5323
      cvt2si_instruction:
5324
	mov	[extended_code],al
5325
	mov	[base_code],0Fh
5326
	lods	byte [esi]
5327
	call	get_size_operator
5328
	cmp	al,10h
5329
	jne	invalid_operand
5330
	lods	byte [esi]
5331
	call	convert_register
5332
	mov	[operand_size],0
5333
	cmp	ah,4
5334
	je	sse_reg
5335
	cmp	ah,8
5336
	jne	invalid_operand_size
5337
	call	operand_64bit
5338
	jmp	sse_reg
5339
amd3dnow_instruction:
5340
	mov	[base_code],0Fh
5341
	mov	[extended_code],0Fh
5342
	mov	byte [value],al
5343
	lods	byte [esi]
5344
	call	get_size_operator
5345
	cmp	al,10h
5346
	jne	invalid_operand
5347
	lods	byte [esi]
5348
	call	convert_mmx_register
5349
	cmp	ah,8
5350
	jne	invalid_operand_size
5351
	mov	[postbyte_register],al
5352
	lods	byte [esi]
5353
	cmp	al,','
5354
	jne	invalid_operand
5355
	lods	byte [esi]
5356
	call	get_size_operator
5357
	cmp	al,10h
5358
	je	amd3dnow_mmreg_mmreg
5359
	cmp	al,'['
5360
	jne	invalid_operand
5361
	call	get_address
5362
	call	store_instruction_with_imm8
5363
	jmp	instruction_assembled
5364
      amd3dnow_mmreg_mmreg:
5365
	lods	byte [esi]
5366
	call	convert_mmx_register
5367
	cmp	ah,8
5368
	jne	invalid_operand_size
5369
	mov	bl,al
5370
	call	store_nomem_instruction
5371
	mov	al,byte [value]
5372
	stos	byte [edi]
5373
	jmp	instruction_assembled
5374
5375
 
5376
	mov	[extended_code],0AEh
5377
	mov	[base_code],0Fh
5378
	mov	[postbyte_register],al
5379
	lods	byte [esi]
5380
	call	get_size_operator
5381
	cmp	al,'['
5382
	jne	invalid_operand
5383
	call	get_address
5384
	mov	ah,[operand_size]
5385
	or	ah,ah
5386
	jz	fxsave_size_ok
5387
	mov	al,[postbyte_register]
5388
	cmp	al,111b
5389
	je	clflush_size_check
5390
	cmp	al,10b
5391
	jb	invalid_operand_size
5392
	cmp	al,11b
5393
	ja	invalid_operand_size
5394
	cmp	ah,4
5395
	jne	invalid_operand_size
5396
	jmp	fxsave_size_ok
5397
      clflush_size_check:
5398
	cmp	ah,1
5399
	jne	invalid_operand_size
5400
      fxsave_size_ok:
5401
	call	store_instruction
5402
	jmp	instruction_assembled
5403
prefetch_instruction:
5404
	mov	[extended_code],18h
5405
      prefetch_mem_8bit:
5406
	mov	[base_code],0Fh
5407
	mov	[postbyte_register],al
5408
	lods	byte [esi]
5409
	call	get_size_operator
5410
	cmp	al,'['
5411
	jne	invalid_operand
5412
	or	ah,ah
5413
	jz	prefetch_size_ok
5414
	cmp	ah,1
5415
	jne	invalid_operand_size
5416
      prefetch_size_ok:
5417
	call	get_address
5418
	call	store_instruction
5419
	jmp	instruction_assembled
5420
amd_prefetch_instruction:
5421
	mov	[extended_code],0Dh
5422
	jmp	prefetch_mem_8bit
5423
fence_instruction:
5424
	mov	bl,al
5425
	mov	ax,0AE0Fh
5426
	stos	word [edi]
5427
	mov	al,bl
5428
	stos	byte [edi]
5429
	jmp	instruction_assembled
5430
pause_instruction:
5431
	mov	ax,90F3h
5432
	stos	word [edi]
5433
	jmp	instruction_assembled
5434
movntq_instruction:
5435
	mov	[mmx_size],8
5436
	jmp	movnt_instruction
5437
movntps_instruction:
5438
	mov	[mmx_size],16
5439
	jmp	movnt_instruction
5440
movntdq_instruction:
5441
	mov	[operand_prefix],66h
5442
	mov	[mmx_size],16
5443
      movnt_instruction:
5444
	mov	[extended_code],al
5445
	mov	[base_code],0Fh
5446
	lods	byte [esi]
5447
	call	get_size_operator
5448
	cmp	al,'['
5449
	jne	invalid_operand
5450
	call	get_address
5451
	lods	byte [esi]
5452
	cmp	al,','
5453
	jne	invalid_operand
5454
	lods	byte [esi]
5455
	call	get_size_operator
5456
	cmp	al,10h
5457
	jne	invalid_operand
5458
	lods	byte [esi]
5459
	call	convert_mmx_register
5460
	cmp	ah,[mmx_size]
5461
	jne	invalid_operand_size
5462
	mov	[postbyte_register],al
5463
	call	store_instruction
5464
	jmp	instruction_assembled
5465
movnti_instruction:
5466
	mov	[base_code],0Fh
5467
	mov	[extended_code],al
5468
	lods	byte [esi]
5469
	call	get_size_operator
5470
	cmp	al,'['
5471
	jne	invalid_operand
5472
	call	get_address
5473
	lods	byte [esi]
5474
	cmp	al,','
5475
	jne	invalid_operand
5476
	lods	byte [esi]
5477
	call	get_size_operator
5478
	cmp	al,10h
5479
	jne	invalid_operand
5480
	lods	byte [esi]
5481
	call	convert_register
5482
	cmp	ah,4
5483
	je	movnti_store
5484
	cmp	ah,8
5485
	jne	invalid_operand_size
5486
	call	operand_64bit
5487
      movnti_store:
5488
	mov	[postbyte_register],al
5489
	call	store_instruction
5490
	jmp	instruction_assembled
5491
monitor_instruction:
5492
	mov	[postbyte_register],al
5493
	lods	byte [esi]
5494
	call	get_size_operator
5495
	cmp	al,10h
5496
	jne	invalid_operand
5497
	lods	byte [esi]
5498
	call	convert_register
5499
	cmp	ax,0400h
5500
	jne	invalid_operand
5501
	lods	byte [esi]
5502
	cmp	al,','
5503
	jne	invalid_operand
5504
	lods	byte [esi]
5505
	call	get_size_operator
5506
	cmp	al,10h
5507
	jne	invalid_operand
5508
	lods	byte [esi]
5509
	call	convert_register
5510
	cmp	ax,0401h
5511
	jne	invalid_operand
5512
	cmp	[postbyte_register],0C8h
5513
	jne	monitor_instruction_store
5514
	lods	byte [esi]
5515
	cmp	al,','
5516
	jne	invalid_operand
5517
	lods	byte [esi]
5518
	call	get_size_operator
5519
	cmp	al,10h
5520
	jne	invalid_operand
5521
	lods	byte [esi]
5522
	call	convert_register
5523
	cmp	ax,0402h
5524
	jne	invalid_operand
5525
      monitor_instruction_store:
5526
	mov	ax,010Fh
5527
	stos	word [edi]
5528
	mov	al,[postbyte_register]
5529
	stos	byte [edi]
5530
	jmp	instruction_assembled
5531
5532
 
5533
	mov	ah,al
5534
	mov	al,0Fh
5535
	stos	byte [edi]
5536
	mov	al,1
5537
	stos	word [edi]
5538
	jmp	instruction_assembled
5539
vmclear_instruction:
5540
	mov	[operand_prefix],66h
5541
	jmp	vmx_instruction
5542
vmxon_instruction:
5543
	mov	[operand_prefix],0F3h
5544
vmx_instruction:
5545
	mov	[postbyte_register],al
5546
	mov	[extended_code],0C7h
5547
	lods	byte [esi]
5548
	call	get_size_operator
5549
	cmp	al,'['
5550
	jne	invalid_operand
5551
	call	get_address
5552
	mov	al,[operand_size]
5553
	or	al,al
5554
	jz	vmx_size_ok
5555
	cmp	al,8
5556
	jne	invalid_operand_size
5557
      vmx_size_ok:
5558
	mov	[base_code],0Fh
5559
	call	store_instruction
5560
	jmp	instruction_assembled
5561
vmread_instruction:
5562
	mov	[extended_code],78h
5563
	lods	byte [esi]
5564
	call	get_size_operator
5565
	cmp	al,'['
5566
	jne	invalid_operand
5567
	call	get_address
5568
	lods	byte [esi]
5569
	cmp	al,','
5570
	jne	invalid_operand
5571
	lods	byte [esi]
5572
	call	get_size_operator
5573
	cmp	al,10h
5574
	jne	invalid_operand
5575
	lods	byte [esi]
5576
	call	convert_register
5577
	mov	[postbyte_register],al
5578
      vmread_check_size:
5579
	cmp	[code_type],64
5580
	je	vmread_long
5581
	cmp	[operand_size],4
5582
	je	vmx_size_ok
5583
	jmp	invalid_operand_size
5584
      vmread_long:
5585
	cmp	[operand_size],8
5586
	je	vmx_size_ok
5587
	jmp	invalid_operand_size
5588
vmwrite_instruction:
5589
	mov	[extended_code],79h
5590
	lods	byte [esi]
5591
	call	get_size_operator
5592
	cmp	al,10h
5593
	jne	invalid_operand
5594
	lods	byte [esi]
5595
	call	convert_register
5596
	mov	[postbyte_register],al
5597
	lods	byte [esi]
5598
	cmp	al,','
5599
	jne	invalid_operand
5600
	lods	byte [esi]
5601
	call	get_size_operator
5602
	cmp	al,'['
5603
	jne	invalid_operand
5604
	call	get_address
5605
	jmp	vmread_check_size
5606
5607
 
5608
	mov	ah,al
5609
	shr	ah,4
5610
	and	al,0Fh
5611
	cmp	ah,8
5612
	je	match_register_size
5613
	cmp	ah,4
5614
	ja	invalid_operand
5615
	cmp	ah,1
5616
	ja	match_register_size
5617
	cmp	al,4
5618
	jb	match_register_size
5619
	or	ah,ah
5620
	jz	high_byte_register
5621
	or	[rex_prefix],40h
5622
      match_register_size:
5623
	cmp	ah,[operand_size]
5624
	je	register_size_ok
5625
	cmp	[operand_size],0
5626
	jne	operand_sizes_do_not_match
5627
	mov	[operand_size],ah
5628
      register_size_ok:
5629
	ret
5630
      high_byte_register:
5631
	mov	ah,1
5632
	or	[rex_prefix],80h
5633
	jmp	match_register_size
5634
convert_fpu_register:
5635
	mov	ah,al
5636
	shr	ah,4
5637
	and	al,111b
5638
	cmp	ah,10
5639
	jne	invalid_operand
5640
	jmp	match_register_size
5641
convert_mmx_register:
5642
	mov	ah,al
5643
	shr	ah,4
5644
	cmp	ah,0Ch
5645
	je	xmm_register
5646
	ja	invalid_operand
5647
	and	al,111b
5648
	cmp	ah,0Bh
5649
	jne	invalid_operand
5650
	mov	ah,8
5651
	jmp	match_register_size
5652
      xmm_register:
5653
	and	al,0Fh
5654
	mov	ah,16
5655
	cmp	al,8
5656
	jb	match_register_size
5657
	cmp	[code_type],64
5658
	jne	invalid_operand
5659
	jmp	match_register_size
5660
get_size_operator:
5661
	xor	ah,ah
5662
	cmp	al,11h
5663
	jne	no_size_operator
5664
	mov	[size_declared],1
5665
	lods	word [esi]
5666
	xchg	al,ah
5667
	mov	[size_override],1
5668
	cmp	ah,[operand_size]
5669
	je	size_operator_ok
5670
	cmp	[operand_size],0
5671
	jne	operand_sizes_do_not_match
5672
	mov	[operand_size],ah
5673
      size_operator_ok:
5674
	ret
5675
      no_size_operator:
5676
	mov	[size_declared],0
5677
	cmp	al,'['
5678
	jne	size_operator_ok
5679
	mov	[size_override],0
5680
	ret
5681
get_jump_operator:
5682
	mov	[jump_type],0
5683
	cmp	al,12h
5684
	jne	jump_operator_ok
5685
	lods	word [esi]
5686
	mov	[jump_type],al
5687
	mov	al,ah
5688
      jump_operator_ok:
5689
	ret
5690
get_address:
5691
	mov	[segment_register],0
5692
	mov	[address_size],0
5693
	mov	al,[code_type]
5694
	shr	al,3
5695
	mov	[value_size],al
5696
	mov	al,[esi]
5697
	and	al,11110000b
5698
	cmp	al,60h
5699
	jne	get_size_prefix
5700
	lods	byte [esi]
5701
	sub	al,60h
5702
	mov	[segment_register],al
5703
	mov	al,[esi]
5704
	and	al,11110000b
5705
      get_size_prefix:
5706
	cmp	al,70h
5707
	jne	address_size_prefix_ok
5708
	lods	byte [esi]
5709
	sub	al,70h
5710
	cmp	al,2
5711
	jb	invalid_address_size
5712
	cmp	al,8
5713
	ja	invalid_address_size
5714
	mov	[address_size],al
5715
	mov	[value_size],al
5716
      address_size_prefix_ok:
5717
	call	calculate_address
5718
	mov	[address_high],edx
5719
	mov	edx,eax
5720
	cmp	[code_type],64
5721
	jne	address_ok
5722
	or	bx,bx
5723
	jnz	address_ok
5724
	test	ch,0Fh
5725
	jnz	address_ok
5726
      calculate_relative_address:
5727
	call	calculate_relative_offset
5728
	mov	[address_high],edx
5729
	mov	edx,[symbol_identifier]
5730
	mov	[address_symbol],edx
5731
	mov	edx,eax
5732
	mov	ch,[value_type]
5733
	mov	bx,0FF00h
5734
	xor	cl,cl
5735
      address_ok:
5736
	ret
5737
5738
 
5739
	cmp	[code_type],16
5740
	je	size_prefix_ok
5741
	mov	[operand_prefix],66h
5742
	ret
5743
operand_32bit:
5744
	cmp	[code_type],16
5745
	jne	size_prefix_ok
5746
	mov	[operand_prefix],66h
5747
      size_prefix_ok:
5748
	ret
5749
operand_64bit:
5750
	cmp	[code_type],64
5751
	jne	invalid_operand_size
5752
	or	[rex_prefix],48h
5753
	ret
5754
operand_autodetect:
5755
	cmp	al,2
5756
	je	operand_16bit
5757
	cmp	al,4
5758
	je	operand_32bit
5759
	cmp	al,8
5760
	je	operand_64bit
5761
	jmp	invalid_operand_size
5762
store_segment_prefix_if_necessary:
5763
	mov	al,[segment_register]
5764
	or	al,al
5765
	jz	segment_prefix_ok
5766
	cmp	al,3
5767
	je	ss_prefix
5768
	cmp	al,4
5769
	ja	segment_prefix_386
5770
	jb	segment_prefix_86
5771
	cmp	bl,25h
5772
	je	segment_prefix_86
5773
	cmp	bh,25h
5774
	je	segment_prefix_86
5775
	cmp	bh,45h
5776
	je	segment_prefix_86
5777
	cmp	bh,44h
5778
	je	segment_prefix_86
5779
	ret
5780
      ss_prefix:
5781
	cmp	bl,25h
5782
	je	segment_prefix_ok
5783
	cmp	bh,25h
5784
	je	segment_prefix_ok
5785
	cmp	bh,45h
5786
	je	segment_prefix_ok
5787
	cmp	bh,44h
5788
	je	segment_prefix_ok
5789
	jmp	segment_prefix_86
5790
store_segment_prefix:
5791
	mov	al,[segment_register]
5792
	or	al,al
5793
	jz	segment_prefix_ok
5794
	cmp	al,5
5795
	jae	segment_prefix_386
5796
      segment_prefix_86:
5797
	dec	al
5798
	shl	al,3
5799
	add	al,26h
5800
	stos	byte [edi]
5801
	jmp	segment_prefix_ok
5802
      segment_prefix_386:
5803
	add	al,64h-5
5804
	stos	byte [edi]
5805
      segment_prefix_ok:
5806
	ret
5807
store_instruction_code:
5808
	mov	al,[operand_prefix]
5809
	or	al,al
5810
	jz	operand_prefix_ok
5811
	stos	byte [edi]
5812
      operand_prefix_ok:
5813
	mov	al,[rex_prefix]
5814
	test	al,40h
5815
	jz	rex_prefix_ok
5816
	cmp	[code_type],64
5817
	jne	invalid_operand
5818
	test	al,0B0h
5819
	jnz	prefix_conflict
5820
	stos	byte [edi]
5821
      rex_prefix_ok:
5822
	mov	al,[base_code]
5823
	stos	byte [edi]
5824
	cmp	al,0Fh
5825
	jne	instruction_code_ok
5826
      store_extended_code:
5827
	mov	al,[extended_code]
5828
	stos	byte [edi]
5829
      instruction_code_ok:
5830
	ret
5831
store_nomem_instruction:
5832
	test	[postbyte_register],1000b
5833
	jz	nomem_reg_code_ok
5834
	or	[rex_prefix],44h
5835
	and	[postbyte_register],111b
5836
      nomem_reg_code_ok:
5837
	test	bl,1000b
5838
	jz	nomem_rm_code_ok
5839
	or	[rex_prefix],41h
5840
	and	bl,111b
5841
      nomem_rm_code_ok:
5842
	call	store_instruction_code
5843
	mov	al,[postbyte_register]
5844
	shl	al,3
5845
	or	al,bl
5846
	or	al,11000000b
5847
	stos	byte [edi]
5848
	ret
5849
store_instruction:
5850
	mov	[current_offset],edi
5851
	test	[postbyte_register],1000b
5852
	jz	reg_code_ok
5853
	or	[rex_prefix],44h
5854
	and	[postbyte_register],111b
5855
      reg_code_ok:
5856
	call	store_segment_prefix_if_necessary
5857
	or	bx,bx
5858
	jz	address_immediate
5859
	cmp	bx,0F000h
5860
	je	address_rip_based
5861
	cmp	bx,0FF00h
5862
	je	address_relative
5863
	mov	al,bl
5864
	or	al,bh
5865
	and	al,11110000b
5866
	cmp	al,80h
5867
	je	postbyte_64bit
5868
	cmp	al,40h
5869
	je	postbyte_32bit
5870
	cmp	al,20h
5871
	jne	invalid_address
5872
	cmp	[code_type],64
5873
	je	invalid_address_size
5874
	call	address_16bit_prefix
5875
	call	store_instruction_code
5876
	cmp	bx,2326h
5877
	je	address_bx_si
5878
	cmp	bx,2623h
5879
	je	address_bx_si
5880
	cmp	bx,2327h
5881
	je	address_bx_di
5882
	cmp	bx,2723h
5883
	je	address_bx_di
5884
	cmp	bx,2526h
5885
	je	address_bp_si
5886
	cmp	bx,2625h
5887
	je	address_bp_si
5888
	cmp	bx,2527h
5889
	je	address_bp_di
5890
	cmp	bx,2725h
5891
	je	address_bp_di
5892
	cmp	bx,2600h
5893
	je	address_si
5894
	cmp	bx,2700h
5895
	je	address_di
5896
	cmp	bx,2300h
5897
	je	address_bx
5898
	cmp	bx,2500h
5899
	je	address_bp
5900
	jmp	invalid_address
5901
      address_bx_si:
5902
	xor	al,al
5903
	jmp	postbyte_16bit
5904
      address_bx_di:
5905
	mov	al,1
5906
	jmp	postbyte_16bit
5907
      address_bp_si:
5908
	mov	al,10b
5909
	jmp	postbyte_16bit
5910
      address_bp_di:
5911
	mov	al,11b
5912
	jmp	postbyte_16bit
5913
      address_si:
5914
	mov	al,100b
5915
	jmp	postbyte_16bit
5916
      address_di:
5917
	mov	al,101b
5918
	jmp	postbyte_16bit
5919
      address_bx:
5920
	mov	al,111b
5921
	jmp	postbyte_16bit
5922
      address_bp:
5923
	mov	al,110b
5924
      postbyte_16bit:
5925
	test	ch,22h
5926
	jnz	address_16bit_value
5927
	or	ch,ch
5928
	jnz	address_sizes_do_not_agree
5929
	cmp	edx,10000h
5930
	jge	value_out_of_range
5931
	cmp	edx,-8000h
5932
	jl	value_out_of_range
5933
	or	dx,dx
5934
	jz	address
5935
	cmp	dx,80h
5936
	jb	address_8bit_value
5937
	cmp	dx,-80h
5938
	jae	address_8bit_value
5939
      address_16bit_value:
5940
	or	al,10000000b
5941
	mov	cl,[postbyte_register]
5942
	shl	cl,3
5943
	or	al,cl
5944
	stos	byte [edi]
5945
	mov	eax,edx
5946
	stos	word [edi]
5947
	ret
5948
      address_8bit_value:
5949
	or	al,01000000b
5950
	mov	cl,[postbyte_register]
5951
	shl	cl,3
5952
	or	al,cl
5953
	stos	byte [edi]
5954
	mov	al,dl
5955
	stos	byte [edi]
5956
	cmp	dx,80h
5957
	jge	value_out_of_range
5958
	cmp	dx,-80h
5959
	jl	value_out_of_range
5960
	ret
5961
      address:
5962
	cmp	al,110b
5963
	je	address_8bit_value
5964
	mov	cl,[postbyte_register]
5965
	shl	cl,3
5966
	or	al,cl
5967
	stos	byte [edi]
5968
	ret
5969
      postbyte_32bit:
5970
	call	address_32bit_prefix
5971
	call	store_instruction_code
5972
	cmp	bl,44h
5973
	je	invalid_address
5974
	or	cl,cl
5975
	jz	only_base_register
5976
	jmp	base_and_index
5977
      postbyte_64bit:
5978
	cmp	[code_type],64
5979
	jne	invalid_address_size
5980
	test	bh,1000b
5981
	jz	base_code_ok
5982
	or	[rex_prefix],41h
5983
      base_code_ok:
5984
	test	bl,1000b
5985
	jz	index_code_ok
5986
	or	[rex_prefix],42h
5987
      index_code_ok:
5988
	call	store_instruction_code
5989
	or	cl,cl
5990
	jz	only_base_register
5991
      base_and_index:
5992
	mov	al,100b
5993
	xor	ah,ah
5994
	cmp	cl,1
5995
	je	scale_ok
5996
	cmp	cl,2
5997
	je	scale_1
5998
	cmp	cl,4
5999
	je	scale_2
6000
	or	ah,11000000b
6001
	jmp	scale_ok
6002
      scale_2:
6003
	or	ah,10000000b
6004
	jmp	scale_ok
6005
      scale_1:
6006
	or	ah,01000000b
6007
      scale_ok:
6008
	or	bh,bh
6009
	jz	only_index_register
6010
	and	bl,111b
6011
	shl	bl,3
6012
	or	ah,bl
6013
	and	bh,111b
6014
	or	ah,bh
6015
	test	ch,44h
6016
	jnz	sib_address_32bit_value
6017
	or	ch,ch
6018
	jnz	address_sizes_do_not_agree
6019
	cmp	bh,5
6020
	je	address_value
6021
	or	edx,edx
6022
	jz	sib_address
6023
      address_value:
6024
	cmp	edx,80h
6025
	jb	sib_address_8bit_value
6026
	cmp	edx,-80h
6027
	jae	sib_address_8bit_value
6028
      sib_address_32bit_value:
6029
	or	al,10000000b
6030
	mov	cl,[postbyte_register]
6031
	shl	cl,3
6032
	or	al,cl
6033
	stos	word [edi]
6034
	jmp	store_address_32bit_value
6035
      sib_address_8bit_value:
6036
	or	al,01000000b
6037
	mov	cl,[postbyte_register]
6038
	shl	cl,3
6039
	or	al,cl
6040
	stos	word [edi]
6041
	mov	al,dl
6042
	stos	byte [edi]
6043
	cmp	edx,80h
6044
	jge	value_out_of_range
6045
	cmp	edx,-80h
6046
	jl	value_out_of_range
6047
	ret
6048
      sib_address:
6049
	mov	cl,[postbyte_register]
6050
	shl	cl,3
6051
	or	al,cl
6052
	stos	word [edi]
6053
	ret
6054
      only_index_register:
6055
	or	ah,101b
6056
	and	bl,111b
6057
	shl	bl,3
6058
	or	ah,bl
6059
	mov	cl,[postbyte_register]
6060
	shl	cl,3
6061
	or	al,cl
6062
	stos	word [edi]
6063
	test	ch,44h
6064
	jnz	store_address_32bit_value
6065
	or	ch,ch
6066
	jnz	invalid_address_size
6067
	jmp	store_address_32bit_value
6068
      zero_index_register:
6069
	mov	bl,4
6070
	mov	cl,1
6071
	jmp	base_and_index
6072
      only_base_register:
6073
	mov	al,bh
6074
	and	al,111b
6075
	cmp	al,4
6076
	je	zero_index_register
6077
	test	ch,44h
6078
	jnz	simple_address_32bit_value
6079
	or	ch,ch
6080
	jnz	address_sizes_do_not_agree
6081
	or	edx,edx
6082
	jz	simple_address
6083
	cmp	edx,80h
6084
	jb	simple_address_8bit_value
6085
	cmp	edx,-80h
6086
	jae	simple_address_8bit_value
6087
      simple_address_32bit_value:
6088
	or	al,10000000b
6089
	mov	cl,[postbyte_register]
6090
	shl	cl,3
6091
	or	al,cl
6092
	stos	byte [edi]
6093
	jmp	store_address_32bit_value
6094
      simple_address_8bit_value:
6095
	or	al,01000000b
6096
	mov	cl,[postbyte_register]
6097
	shl	cl,3
6098
	or	al,cl
6099
	stos	byte [edi]
6100
	mov	al,dl
6101
	stos	byte [edi]
6102
	cmp	edx,80h
6103
	jge	value_out_of_range
6104
	cmp	edx,-80h
6105
	jl	value_out_of_range
6106
	ret
6107
      simple_address:
6108
	cmp	al,5
6109
	je	simple_address_8bit_value
6110
	mov	cl,[postbyte_register]
6111
	shl	cl,3
6112
	or	al,cl
6113
	stos	byte [edi]
6114
	ret
6115
      address_immediate:
6116
	cmp	[code_type],64
6117
	je	address_immediate_sib
6118
	test	ch,44h
6119
	jnz	address_immediate_32bit
6120
	test	ch,22h
6121
	jnz	address_immediate_16bit
6122
	or	ch,ch
6123
	jnz	invalid_address_size
6124
	cmp	[code_type],16
6125
	je	addressing_16bit
6126
      address_immediate_32bit:
6127
	call	address_32bit_prefix
6128
	call	store_instruction_code
6129
      store_immediate_address:
6130
	mov	al,101b
6131
	mov	cl,[postbyte_register]
6132
	shl	cl,3
6133
	or	al,cl
6134
	stos	byte [edi]
6135
      store_address_32bit_value:
6136
	test	ch,0F0h
6137
	jz	address_32bit_relocation_ok
6138
	mov	al,2
6139
	xchg	[value_type],al
6140
	mov	ebx,[address_symbol]
6141
	xchg	ebx,[symbol_identifier]
6142
	call	mark_relocation
6143
	mov	[value_type],al
6144
	mov	[symbol_identifier],ebx
6145
      address_32bit_relocation_ok:
6146
	mov	eax,edx
6147
	stos	dword [edi]
6148
	ret
6149
      store_address_64bit_value:
6150
	test	ch,0F0h
6151
	jz	address_64bit_relocation_ok
6152
	mov	al,4
6153
	xchg	[value_type],al
6154
	mov	ebx,[address_symbol]
6155
	xchg	ebx,[symbol_identifier]
6156
	call	mark_relocation
6157
	mov	[value_type],al
6158
	mov	[symbol_identifier],ebx
6159
      address_64bit_relocation_ok:
6160
	mov	eax,edx
6161
	stos	dword [edi]
6162
	mov	eax,[address_high]
6163
	stos	dword [edi]
6164
	ret
6165
      address_immediate_sib:
6166
	test	ch,not 44h
6167
	jnz	invalid_address_size
6168
	call	address_32bit_prefix
6169
	call	store_instruction_code
6170
	mov	al,100b
6171
	mov	ah,100101b
6172
	mov	cl,[postbyte_register]
6173
	shl	cl,3
6174
	or	al,cl
6175
	stos	word [edi]
6176
	jmp	store_address_32bit_value
6177
      address_rip_based:
6178
	cmp	[code_type],64
6179
	jne	invalid_address
6180
	call	store_instruction_code
6181
	jmp	store_immediate_address
6182
      address_relative:
6183
	call	store_instruction_code
6184
	movzx	eax,[immediate_size]
6185
	add	eax,edi
6186
	sub	eax,[current_offset]
6187
	add	eax,5
6188
	sub	edx,eax
6189
	jo	value_out_of_range
6190
	mov	al,101b
6191
	mov	cl,[postbyte_register]
6192
	shl	cl,3
6193
	or	al,cl
6194
	stos	byte [edi]
6195
	xchg	[value_type],ch
6196
	mov	ebx,[address_symbol]
6197
	xchg	ebx,[symbol_identifier]
6198
	mov	eax,edx
6199
	call	mark_relocation
6200
	mov	[value_type],ch
6201
	mov	[symbol_identifier],ebx
6202
	stos	dword [edi]
6203
	ret
6204
      addressing_16bit:
6205
	cmp	edx,10000h
6206
	jge	address_immediate_32bit
6207
	cmp	edx,-8000h
6208
	jl	address_immediate_32bit
6209
	movzx	edx,dx
6210
      address_immediate_16bit:
6211
	call	address_16bit_prefix
6212
	call	store_instruction_code
6213
	mov	al,110b
6214
	mov	cl,[postbyte_register]
6215
	shl	cl,3
6216
	or	al,cl
6217
	stos	byte [edi]
6218
	mov	eax,edx
6219
	stos	word [edi]
6220
	cmp	edx,10000h
6221
	jge	value_out_of_range
6222
	cmp	edx,-8000h
6223
	jl	value_out_of_range
6224
	ret
6225
      address_16bit_prefix:
6226
	cmp	[code_type],16
6227
	je	instruction_prefix_ok
6228
	mov	al,67h
6229
	stos	byte [edi]
6230
	ret
6231
      address_32bit_prefix:
6232
	cmp	[code_type],32
6233
	je	instruction_prefix_ok
6234
	mov	al,67h
6235
	stos	byte [edi]
6236
      instruction_prefix_ok:
6237
	ret
6238
store_instruction_with_imm8:
6239
	mov	[immediate_size],1
6240
	call	store_instruction
6241
	mov	al,byte [value]
6242
	stos	byte [edi]
6243
	ret
6244
store_instruction_with_imm16:
6245
	mov	[immediate_size],2
6246
	call	store_instruction
6247
	mov	ax,word [value]
6248
	call	mark_relocation
6249
	stos	word [edi]
6250
	ret
6251
store_instruction_with_imm32:
6252
	mov	[immediate_size],4
6253
	call	store_instruction
6254
	mov	eax,dword [value]
6255
	call	mark_relocation
6256
	stos	dword [edi]
6257
	ret
6258
6259
 
6260
 db 2,'bp',0,25h
6261
 db 2,'bx',0,23h
6262
 db 2,'di',0,27h
6263
 db 3,'eax',0,40h
6264
 db 3,'ebp',0,45h
6265
 db 3,'ebx',0,43h
6266
 db 3,'ecx',0,41h
6267
 db 3,'edi',0,47h
6268
 db 3,'edx',0,42h
6269
 db 3,'esi',0,46h
6270
 db 3,'esp',0,44h
6271
 db 3,'r10',10h,8Ah
6272
 db 3,'r11',10h,8Bh
6273
 db 3,'r12',10h,8Ch
6274
 db 3,'r13',10h,8Dh
6275
 db 3,'r14',10h,8Eh
6276
 db 3,'r15',10h,8Fh
6277
 db 2,'r8',10h,88h
6278
 db 2,'r9',10h,89h
6279
 db 3,'rax',0,80h
6280
 db 3,'rbp',0,85h
6281
 db 3,'rbx',0,83h
6282
 db 3,'rcx',0,81h
6283
 db 3,'rdi',0,87h
6284
 db 3,'rdx',0,82h
6285
 db 3,'rip',0,0F0h
6286
 db 3,'rsi',0,86h
6287
 db 3,'rsp',0,84h
6288
 db 2,'si',0,26h
6289
 db 0
6290
6291
 
6292
 db 4,'byte',0,1
6293
 db 5,'dword',0,4
6294
 db 5,'qword',0,8
6295
 db 4,'word',0,2
6296
 db 0
6297
6298
 
6299
 db 2,'ah',10h,04h
6300
 db 2,'al',10h,10h
6301
 db 2,'ax',10h,20h
6302
 db 2,'bh',10h,07h
6303
 db 2,'bl',10h,13h
6304
 db 2,'bp',10h,25h
6305
 db 3,'bpl',10h,15h
6306
 db 2,'bx',10h,23h
6307
 db 4,'byte',11h,1
6308
 db 2,'ch',10h,05h
6309
 db 2,'cl',10h,11h
6310
 db 3,'cr0',10h,50h
6311
 db 3,'cr1',10h,51h
6312
 db 3,'cr2',10h,52h
6313
 db 3,'cr3',10h,53h
6314
 db 3,'cr4',10h,54h
6315
 db 3,'cr5',10h,55h
6316
 db 3,'cr6',10h,56h
6317
 db 3,'cr7',10h,57h
6318
 db 3,'cr8',10h,58h
6319
 db 3,'cr9',10h,59h
6320
 db 4,'cr10',10h,5Ah
6321
 db 4,'cr11',10h,5Bh
6322
 db 4,'cr12',10h,5Ch
6323
 db 4,'cr13',10h,5Dh
6324
 db 4,'cr14',10h,5Eh
6325
 db 4,'cr15',10h,5Fh
6326
 db 2,'cs',10h,62h
6327
 db 2,'cx',10h,21h
6328
 db 2,'dh',10h,06h
6329
 db 2,'di',10h,27h
6330
 db 3,'dil',10h,17h
6331
 db 2,'dl',10h,12h
6332
 db 6,'dqword',11h,16
6333
 db 3,'dr0',10h,70h
6334
 db 3,'dr1',10h,71h
6335
 db 3,'dr2',10h,72h
6336
 db 3,'dr3',10h,73h
6337
 db 3,'dr4',10h,74h
6338
 db 3,'dr5',10h,75h
6339
 db 3,'dr6',10h,76h
6340
 db 3,'dr7',10h,77h
6341
 db 3,'dr8',10h,78h
6342
 db 3,'dr9',10h,79h
6343
 db 4,'dr10',10h,7Ah
6344
 db 4,'dr11',10h,7Bh
6345
 db 4,'dr12',10h,7Ch
6346
 db 4,'dr13',10h,7Dh
6347
 db 4,'dr14',10h,7Eh
6348
 db 4,'dr15',10h,7Fh
6349
 db 2,'ds',10h,64h
6350
 db 5,'dword',11h,4
6351
 db 2,'dx',10h,22h
6352
 db 3,'eax',10h,40h
6353
 db 3,'ebp',10h,45h
6354
 db 3,'ebx',10h,43h
6355
 db 3,'ecx',10h,41h
6356
 db 3,'edi',10h,47h
6357
 db 3,'edx',10h,42h
6358
 db 2,'es',10h,61h
6359
 db 3,'esi',10h,46h
6360
 db 3,'esp',10h,44h
6361
 db 3,'far',12h,2
6362
 db 2,'fs',10h,65h
6363
 db 5,'fword',11h,6
6364
 db 2,'gs',10h,66h
6365
 db 3,'mm0',10h,0B0h
6366
 db 3,'mm1',10h,0B1h
6367
 db 3,'mm2',10h,0B2h
6368
 db 3,'mm3',10h,0B3h
6369
 db 3,'mm4',10h,0B4h
6370
 db 3,'mm5',10h,0B5h
6371
 db 3,'mm6',10h,0B6h
6372
 db 3,'mm7',10h,0B7h
6373
 db 4,'near',12h,1
6374
 db 5,'pword',11h,6
6375
 db 5,'qword',11h,8
6376
 db 3,'r10',10h,8Ah
6377
 db 4,'r10b',10h,1Ah
6378
 db 4,'r10d',10h,4Ah
6379
 db 4,'r10w',10h,2Ah
6380
 db 3,'r11',10h,8Bh
6381
 db 4,'r11b',10h,1Bh
6382
 db 4,'r11d',10h,4Bh
6383
 db 4,'r11w',10h,2Bh
6384
 db 3,'r12',10h,8Ch
6385
 db 4,'r12b',10h,1Ch
6386
 db 4,'r12d',10h,4Ch
6387
 db 4,'r12w',10h,2Ch
6388
 db 3,'r13',10h,8Dh
6389
 db 4,'r13b',10h,1Dh
6390
 db 4,'r13d',10h,4Dh
6391
 db 4,'r13w',10h,2Dh
6392
 db 3,'r14',10h,8Eh
6393
 db 4,'r14b',10h,1Eh
6394
 db 4,'r14d',10h,4Eh
6395
 db 4,'r14w',10h,2Eh
6396
 db 3,'r15',10h,8Fh
6397
 db 4,'r15b',10h,1Fh
6398
 db 4,'r15d',10h,4Fh
6399
 db 4,'r15w',10h,2Fh
6400
 db 2,'r8',10h,88h
6401
 db 3,'r8b',10h,18h
6402
 db 3,'r8d',10h,48h
6403
 db 3,'r8w',10h,28h
6404
 db 2,'r9',10h,89h
6405
 db 3,'r9b',10h,19h
6406
 db 3,'r9d',10h,49h
6407
 db 3,'r9w',10h,29h
6408
 db 3,'rax',10h,80h
6409
 db 3,'rbp',10h,85h
6410
 db 3,'rbx',10h,83h
6411
 db 3,'rcx',10h,81h
6412
 db 3,'rdi',10h,87h
6413
 db 3,'rdx',10h,82h
6414
 db 3,'rsi',10h,86h
6415
 db 3,'rsp',10h,84h
6416
 db 2,'si',10h,26h
6417
 db 3,'sil',10h,16h
6418
 db 2,'sp',10h,24h
6419
 db 3,'spl',10h,14h
6420
 db 2,'ss',10h,63h
6421
 db 2,'st',10h,0A0h
6422
 db 3,'st0',10h,0A0h
6423
 db 3,'st1',10h,0A1h
6424
 db 3,'st2',10h,0A2h
6425
 db 3,'st3',10h,0A3h
6426
 db 3,'st4',10h,0A4h
6427
 db 3,'st5',10h,0A5h
6428
 db 3,'st6',10h,0A6h
6429
 db 3,'st7',10h,0A7h
6430
 db 5,'tbyte',11h,0Ah
6431
 db 3,'tr0',10h,90h
6432
 db 3,'tr1',10h,91h
6433
 db 3,'tr2',10h,92h
6434
 db 3,'tr3',10h,93h
6435
 db 3,'tr4',10h,94h
6436
 db 3,'tr5',10h,95h
6437
 db 3,'tr6',10h,96h
6438
 db 3,'tr7',10h,97h
6439
 db 5,'tword',11h,0Ah
6440
 db 5,'use16',13h,16
6441
 db 5,'use32',13h,32
6442
 db 5,'use64',13h,64
6443
 db 4,'word',11h,2
6444
 db 4,'xmm0',10h,0C0h
6445
 db 4,'xmm1',10h,0C1h
6446
 db 5,'xmm10',10h,0CAh
6447
 db 5,'xmm11',10h,0CBh
6448
 db 5,'xmm12',10h,0CCh
6449
 db 5,'xmm13',10h,0CDh
6450
 db 5,'xmm14',10h,0CEh
6451
 db 5,'xmm15',10h,0CFh
6452
 db 4,'xmm2',10h,0C2h
6453
 db 4,'xmm3',10h,0C3h
6454
 db 4,'xmm4',10h,0C4h
6455
 db 4,'xmm5',10h,0C5h
6456
 db 4,'xmm6',10h,0C6h
6457
 db 4,'xmm7',10h,0C7h
6458
 db 4,'xmm8',10h,0C8h
6459
 db 4,'xmm9',10h,0C9h
6460
 db 0
6461
6462
 
6463
 dw data_bytes-assembler
6464
 dw data_file-assembler
6465
 dw reserve_bytes-assembler
6466
 dw data_words-assembler
6467
 dw data_unicode-assembler
6468
 dw reserve_words-assembler
6469
 dw data_dwords-assembler
6470
 dw reserve_dwords-assembler
6471
 dw data_pwords-assembler
6472
 dw reserve_pwords-assembler
6473
 dw data_qwords-assembler
6474
 dw reserve_qwords-assembler
6475
 dw data_twords-assembler
6476
 dw reserve_twords-assembler
6477
6478
 
6479
 db 2,'db',1,0
6480
 db 2,'dd',4,6
6481
 db 2,'df',6,8
6482
 db 2,'dp',6,8
6483
 db 2,'dq',8,10
6484
 db 2,'dt',10,12
6485
 db 2,'du',2,4
6486
 db 2,'dw',2,3
6487
 db 4,'file',1,1
6488
 db 2,'rb',1,2
6489
 db 2,'rd',4,7
6490
 db 2,'rf',6,9
6491
 db 2,'rp',6,9
6492
 db 2,'rq',8,11
6493
 db 2,'rt',10,13
6494
 db 2,'rw',2,5
6495
 db 0
6496
6497
 
6498
 dw instructions_2-instructions
6499
 dw instructions_3-instructions
6500
 dw instructions_4-instructions
6501
 dw instructions_5-instructions
6502
 dw instructions_6-instructions
6503
 dw instructions_7-instructions
6504
 dw instructions_8-instructions
6505
 dw instructions_9-instructions
6506
 dw instructions_10-instructions
6507
 dw instructions_11-instructions
6508
6509
 
6510
 db 'bt',4
6511
 dw bt_instruction-assembler
6512
 db 'if',0
6513
 dw if_directive-assembler
6514
 db 'in',0
6515
 dw in_instruction-assembler
6516
 db 'ja',77h
6517
 dw conditional_jump-assembler
6518
 db 'jb',72h
6519
 dw conditional_jump-assembler
6520
 db 'jc',72h
6521
 dw conditional_jump-assembler
6522
 db 'je',74h
6523
 dw conditional_jump-assembler
6524
 db 'jg',7Fh
6525
 dw conditional_jump-assembler
6526
 db 'jl',7Ch
6527
 dw conditional_jump-assembler
6528
 db 'jo',70h
6529
 dw conditional_jump-assembler
6530
 db 'jp',7Ah
6531
 dw conditional_jump-assembler
6532
 db 'js',78h
6533
 dw conditional_jump-assembler
6534
 db 'jz',74h
6535
 dw conditional_jump-assembler
6536
 db 'or',08h
6537
 dw basic_instruction-assembler
6538
 db 0
6539
instructions_3:
6540
 db 'aaa',37h
6541
 dw simple_instruction_except64-assembler
6542
 db 'aad',0D5h
6543
 dw aa_instruction-assembler
6544
 db 'aam',0D4h
6545
 dw aa_instruction-assembler
6546
 db 'aas',3Fh
6547
 dw simple_instruction_except64-assembler
6548
 db 'adc',10h
6549
 dw basic_instruction-assembler
6550
 db 'add',00h
6551
 dw basic_instruction-assembler
6552
 db 'and',20h
6553
 dw basic_instruction-assembler
6554
 db 'bsf',0BCh
6555
 dw bs_instruction-assembler
6556
 db 'bsr',0BDh
6557
 dw bs_instruction-assembler
6558
 db 'btc',7
6559
 dw bt_instruction-assembler
6560
 db 'btr',6
6561
 dw bt_instruction-assembler
6562
 db 'bts',5
6563
 dw bt_instruction-assembler
6564
 db 'cbw',98h
6565
 dw simple_instruction_16bit-assembler
6566
 db 'cdq',99h
6567
 dw simple_instruction_32bit-assembler
6568
 db 'clc',0F8h
6569
 dw simple_instruction-assembler
6570
 db 'cld',0FCh
6571
 dw simple_instruction-assembler
6572
 db 'cli',0FAh
6573
 dw simple_instruction-assembler
6574
 db 'cmc',0F5h
6575
 dw simple_instruction-assembler
6576
 db 'cmp',38h
6577
 dw basic_instruction-assembler
6578
 db 'cqo',99h
6579
 dw simple_instruction_64bit-assembler
6580
 db 'cwd',99h
6581
 dw simple_instruction_16bit-assembler
6582
 db 'daa',27h
6583
 dw simple_instruction_except64-assembler
6584
 db 'das',2Fh
6585
 dw simple_instruction_except64-assembler
6586
 db 'dec',1
6587
 dw inc_instruction-assembler
6588
 db 'div',6
6589
 dw single_operand_instruction-assembler
6590
 db 'end',0
6591
 dw end_directive-assembler
6592
 db 'fld',0
6593
 dw fld_instruction-assembler
6594
 db 'fst',2
6595
 dw fld_instruction-assembler
6596
 db 'hlt',0F4h
6597
 dw simple_instruction-assembler
6598
 db 'inc',0
6599
 dw inc_instruction-assembler
6600
 db 'ins',6Ch
6601
 dw ins_instruction-assembler
6602
 db 'int',0CDh
6603
 dw int_instruction-assembler
6604
 db 'jae',73h
6605
 dw conditional_jump-assembler
6606
 db 'jbe',76h
6607
 dw conditional_jump-assembler
6608
 db 'jge',7Dh
6609
 dw conditional_jump-assembler
6610
 db 'jle',7Eh
6611
 dw conditional_jump-assembler
6612
 db 'jmp',0
6613
 dw jmp_instruction-assembler
6614
 db 'jna',76h
6615
 dw conditional_jump-assembler
6616
 db 'jnb',73h
6617
 dw conditional_jump-assembler
6618
 db 'jnc',73h
6619
 dw conditional_jump-assembler
6620
 db 'jne',75h
6621
 dw conditional_jump-assembler
6622
 db 'jng',7Eh
6623
 dw conditional_jump-assembler
6624
 db 'jnl',7Dh
6625
 dw conditional_jump-assembler
6626
 db 'jno',71h
6627
 dw conditional_jump-assembler
6628
 db 'jnp',7Bh
6629
 dw conditional_jump-assembler
6630
 db 'jns',79h
6631
 dw conditional_jump-assembler
6632
 db 'jnz',75h
6633
 dw conditional_jump-assembler
6634
 db 'jpe',7Ah
6635
 dw conditional_jump-assembler
6636
 db 'jpo',7Bh
6637
 dw conditional_jump-assembler
6638
 db 'lar',2
6639
 dw lar_instruction-assembler
6640
 db 'lds',3
6641
 dw ls_instruction-assembler
6642
 db 'lea',0
6643
 dw lea_instruction-assembler
6644
 db 'les',0
6645
 dw ls_instruction-assembler
6646
 db 'lfs',4
6647
 dw ls_instruction-assembler
6648
 db 'lgs',5
6649
 dw ls_instruction-assembler
6650
 db 'lsl',3
6651
 dw lar_instruction-assembler
6652
 db 'lss',2
6653
 dw ls_instruction-assembler
6654
 db 'ltr',3
6655
 dw pm_word_instruction-assembler
6656
 db 'mov',0
6657
 dw mov_instruction-assembler
6658
 db 'mul',4
6659
 dw single_operand_instruction-assembler
6660
 db 'neg',3
6661
 dw single_operand_instruction-assembler
6662
 db 'nop',90h
6663
 dw simple_instruction-assembler
6664
 db 'not',2
6665
 dw single_operand_instruction-assembler
6666
 db 'org',0
6667
 dw org_directive-assembler
6668
 db 'out',0
6669
 dw out_instruction-assembler
6670
 db 'pop',0
6671
 dw pop_instruction-assembler
6672
 db 'por',0EBh
6673
 dw mmx_instruction-assembler
6674
 db 'rcl',2
6675
 dw sh_instruction-assembler
6676
 db 'rcr',3
6677
 dw sh_instruction-assembler
6678
 db 'rep',0F3h
6679
 dw prefix_instruction-assembler
6680
 db 'ret',0C2h
6681
 dw ret_instruction-assembler
6682
 db 'rol',0
6683
 dw sh_instruction-assembler
6684
 db 'ror',1
6685
 dw sh_instruction-assembler
6686
 db 'rsm',0AAh
6687
 dw simple_extended_instruction-assembler
6688
 db 'sal',4
6689
 dw sh_instruction-assembler
6690
 db 'sar',7
6691
 dw sh_instruction-assembler
6692
 db 'sbb',18h
6693
 dw basic_instruction-assembler
6694
 db 'shl',4
6695
 dw sh_instruction-assembler
6696
 db 'shr',5
6697
 dw sh_instruction-assembler
6698
 db 'stc',0F9h
6699
 dw simple_instruction-assembler
6700
 db 'std',0FDh
6701
 dw simple_instruction-assembler
6702
 db 'sti',0FBh
6703
 dw simple_instruction-assembler
6704
 db 'str',1
6705
 dw pm_store_word_instruction-assembler
6706
 db 'sub',28h
6707
 dw basic_instruction-assembler
6708
 db 'ud2',0Bh
6709
 dw simple_extended_instruction-assembler
6710
 db 'xor',30h
6711
 dw basic_instruction-assembler
6712
 db 0
6713
instructions_4:
6714
 db 'arpl',0
6715
 dw arpl_instruction-assembler
6716
 db 'call',0
6717
 dw call_instruction-assembler
6718
 db 'cdqe',98h
6719
 dw simple_instruction_64bit-assembler
6720
 db 'clts',6
6721
 dw simple_extended_instruction-assembler
6722
 db 'cmps',0A6h
6723
 dw cmps_instruction-assembler
6724
 db 'cwde',98h
6725
 dw simple_instruction_32bit-assembler
6726
 db 'data',0
6727
 dw data_directive-assembler
6728
 db 'else',0
6729
 dw else_directive-assembler
6730
 db 'emms',77h
6731
 dw simple_extended_instruction-assembler
6732
 db 'fabs',100001b
6733
 dw simple_fpu_instruction-assembler
6734
 db 'fadd',0
6735
 dw basic_fpu_instruction-assembler
6736
 db 'fbld',4
6737
 dw fbld_instruction-assembler
6738
 db 'fchs',100000b
6739
 dw simple_fpu_instruction-assembler
6740
 db 'fcom',2
6741
 dw basic_fpu_instruction-assembler
6742
 db 'fcos',111111b
6743
 dw simple_fpu_instruction-assembler
6744
 db 'fdiv',6
6745
 dw basic_fpu_instruction-assembler
6746
 db 'feni',0E0h
6747
 dw finit_instruction-assembler
6748
 db 'fild',0
6749
 dw fild_instruction-assembler
6750
 db 'fist',2
6751
 dw fild_instruction-assembler
6752
 db 'fld1',101000b
6753
 dw simple_fpu_instruction-assembler
6754
 db 'fldz',101110b
6755
 dw simple_fpu_instruction-assembler
6756
 db 'fmul',1
6757
 dw basic_fpu_instruction-assembler
6758
 db 'fnop',010000b
6759
 dw simple_fpu_instruction-assembler
6760
 db 'fsin',111110b
6761
 dw simple_fpu_instruction-assembler
6762
 db 'fstp',3
6763
 dw fld_instruction-assembler
6764
 db 'fsub',4
6765
 dw basic_fpu_instruction-assembler
6766
 db 'ftst',100100b
6767
 dw simple_fpu_instruction-assembler
6768
 db 'fxam',100101b
6769
 dw simple_fpu_instruction-assembler
6770
 db 'fxch',0
6771
 dw fxch_instruction-assembler
6772
 db 'heap',0
6773
 dw heap_directive-assembler
6774
 db 'idiv',7
6775
 dw single_operand_instruction-assembler
6776
 db 'imul',0
6777
 dw imul_instruction-assembler
6778
 db 'insb',6Ch
6779
 dw simple_instruction-assembler
6780
 db 'insd',6Dh
6781
 dw simple_instruction_32bit-assembler
6782
 db 'insw',6Dh
6783
 dw simple_instruction_16bit-assembler
6784
 db 'int1',0F1h
6785
 dw simple_instruction-assembler
6786
 db 'int3',0CCh
6787
 dw simple_instruction-assembler
6788
 db 'into',0CEh
6789
 dw simple_instruction_except64-assembler
6790
 db 'invd',8
6791
 dw simple_extended_instruction-assembler
6792
 db 'iret',0CFh
6793
 dw iret_instruction-assembler
6794
 db 'jcxz',0E3h
6795
 dw loop_instruction_16bit-assembler
6796
 db 'jnae',72h
6797
 dw conditional_jump-assembler
6798
 db 'jnbe',77h
6799
 dw conditional_jump-assembler
6800
 db 'jnge',7Ch
6801
 dw conditional_jump-assembler
6802
 db 'jnle',7Fh
6803
 dw conditional_jump-assembler
6804
 db 'lahf',9Fh
6805
 dw simple_instruction_except64-assembler
6806
 db 'lgdt',2
6807
 dw lgdt_instruction-assembler
6808
 db 'lidt',3
6809
 dw lgdt_instruction-assembler
6810
 db 'lldt',2
6811
 dw pm_word_instruction-assembler
6812
 db 'lmsw',16h
6813
 dw pm_word_instruction-assembler
6814
 db 'load',0
6815
 dw load_directive-assembler
6816
 db 'lock',0F0h
6817
 dw prefix_instruction-assembler
6818
 db 'lods',0ACh
6819
 dw lods_instruction-assembler
6820
 db 'loop',0E2h
6821
 dw loop_instruction-assembler
6822
 db 'movd',0
6823
 dw movd_instruction-assembler
6824
 db 'movq',0
6825
 dw movq_instruction-assembler
6826
 db 'movs',0A4h
6827
 dw movs_instruction-assembler
6828
 db 'orpd',56h
6829
 dw sse_pd_instruction-assembler
6830
 db 'orps',56h
6831
 dw sse_ps_instruction-assembler
6832
 db 'outs',6Eh
6833
 dw outs_instruction-assembler
6834
 db 'pand',0DBh
6835
 dw mmx_instruction-assembler
6836
 db 'popa',61h
6837
 dw simple_instruction_except64-assembler
6838
 db 'popd',4
6839
 dw pop_instruction-assembler
6840
 db 'popf',9Dh
6841
 dw simple_instruction-assembler
6842
 db 'popq',8
6843
 dw pop_instruction-assembler
6844
 db 'popw',2
6845
 dw pop_instruction-assembler
6846
 db 'push',0
6847
 dw push_instruction-assembler
6848
 db 'pxor',0EFh
6849
 dw mmx_instruction-assembler
6850
 db 'repe',0F3h
6851
 dw prefix_instruction-assembler
6852
 db 'repz',0F3h
6853
 dw prefix_instruction-assembler
6854
 db 'retd',0C2h
6855
 dw ret_instruction_32bit_except64-assembler
6856
 db 'retf',0CAh
6857
 dw retf_instruction-assembler
6858
 db 'retn',0C2h
6859
 dw ret_instruction-assembler
6860
 db 'retq',0C2h
6861
 dw ret_instruction_only64-assembler
6862
 db 'retw',0C2h
6863
 dw ret_instruction_16bit-assembler
6864
 db 'sahf',9Eh
6865
 dw simple_instruction_except64-assembler
6866
 db 'salc',0D6h
6867
 dw simple_instruction_except64-assembler
6868
 db 'scas',0AEh
6869
 dw stos_instruction-assembler
6870
 db 'seta',97h
6871
 dw set_instruction-assembler
6872
 db 'setb',92h
6873
 dw set_instruction-assembler
6874
 db 'setc',92h
6875
 dw set_instruction-assembler
6876
 db 'sete',94h
6877
 dw set_instruction-assembler
6878
 db 'setg',9Fh
6879
 dw set_instruction-assembler
6880
 db 'setl',9Ch
6881
 dw set_instruction-assembler
6882
 db 'seto',90h
6883
 dw set_instruction-assembler
6884
 db 'setp',9Ah
6885
 dw set_instruction-assembler
6886
 db 'sets',98h
6887
 dw set_instruction-assembler
6888
 db 'setz',94h
6889
 dw set_instruction-assembler
6890
 db 'sgdt',0
6891
 dw lgdt_instruction-assembler
6892
 db 'shld',0A4h
6893
 dw shd_instruction-assembler
6894
 db 'shrd',0ACh
6895
 dw shd_instruction-assembler
6896
 db 'sidt',1
6897
 dw lgdt_instruction-assembler
6898
 db 'sldt',0
6899
 dw pm_store_word_instruction-assembler
6900
 db 'smsw',14h
6901
 dw pm_store_word_instruction-assembler
6902
 db 'stos',0AAh
6903
 dw stos_instruction-assembler
6904
 db 'test',0
6905
 dw test_instruction-assembler
6906
 db 'verr',4
6907
 dw pm_word_instruction-assembler
6908
 db 'verw',5
6909
 dw pm_word_instruction-assembler
6910
 db 'wait',9Bh
6911
 dw simple_instruction-assembler
6912
 db 'xadd',0C0h
6913
 dw basic_486_instruction-assembler
6914
 db 'xchg',0
6915
 dw xchg_instruction-assembler
6916
 db 'xlat',0D7h
6917
 dw xlat_instruction-assembler
6918
 db 0
6919
instructions_5:
6920
 db 'addpd',58h
6921
 dw sse_pd_instruction-assembler
6922
 db 'addps',58h
6923
 dw sse_ps_instruction-assembler
6924
 db 'addsd',58h
6925
 dw sse_sd_instruction-assembler
6926
 db 'addss',58h
6927
 dw sse_ss_instruction-assembler
6928
 db 'align',0
6929
 dw align_directive-assembler
6930
 db 'andpd',54h
6931
 dw sse_pd_instruction-assembler
6932
 db 'andps',54h
6933
 dw sse_ps_instruction-assembler
6934
 db 'bound',0
6935
 dw bound_instruction-assembler
6936
 db 'break',0
6937
 dw break_directive-assembler
6938
 db 'bswap',0
6939
 dw bswap_instruction-assembler
6940
 db 'cmova',47h
6941
 dw cmov_instruction-assembler
6942
 db 'cmovb',42h
6943
 dw cmov_instruction-assembler
6944
 db 'cmovc',42h
6945
 dw cmov_instruction-assembler
6946
 db 'cmove',44h
6947
 dw cmov_instruction-assembler
6948
 db 'cmovg',4Fh
6949
 dw cmov_instruction-assembler
6950
 db 'cmovl',4Ch
6951
 dw cmov_instruction-assembler
6952
 db 'cmovo',40h
6953
 dw cmov_instruction-assembler
6954
 db 'cmovp',4Ah
6955
 dw cmov_instruction-assembler
6956
 db 'cmovs',48h
6957
 dw cmov_instruction-assembler
6958
 db 'cmovz',44h
6959
 dw cmov_instruction-assembler
6960
 db 'cmppd',0
6961
 dw cmppd_instruction-assembler
6962
 db 'cmpps',0
6963
 dw cmpps_instruction-assembler
6964
 db 'cmpsb',0A6h
6965
 dw simple_instruction-assembler
6966
 db 'cmpsd',0
6967
 dw cmpsd_instruction-assembler
6968
 db 'cmpsq',0
6969
 dw simple_instruction_64bit-assembler
6970
 db 'cmpss',0
6971
 dw cmpss_instruction-assembler
6972
 db 'cmpsw',0A7h
6973
 dw simple_instruction_16bit-assembler
6974
 db 'cpuid',0A2h
6975
 dw simple_extended_instruction-assembler
6976
 db 'divpd',5Eh
6977
 dw sse_pd_instruction-assembler
6978
 db 'divps',5Eh
6979
 dw sse_ps_instruction-assembler
6980
 db 'divsd',5Eh
6981
 dw sse_sd_instruction-assembler
6982
 db 'divss',5Eh
6983
 dw sse_ss_instruction-assembler
6984
 db 'enter',0
6985
 dw enter_instruction-assembler
6986
 db 'entry',0
6987
 dw entry_directive-assembler
6988
 db 'extrn',0
6989
 dw extrn_directive-assembler
6990
 db 'f2xm1',110000b
6991
 dw simple_fpu_instruction-assembler
6992
 db 'faddp',0
6993
 dw faddp_instruction-assembler
6994
 db 'fbstp',6
6995
 dw fbld_instruction-assembler
6996
 db 'fclex',0E2h
6997
 dw finit_instruction-assembler
6998
 db 'fcomi',0F0h
6999
 dw fcomi_instruction-assembler
7000
 db 'fcomp',3
7001
 dw basic_fpu_instruction-assembler
7002
 db 'fdisi',0E1h
7003
 dw finit_instruction-assembler
7004
 db 'fdivp',7
7005
 dw faddp_instruction-assembler
7006
 db 'fdivr',7
7007
 dw basic_fpu_instruction-assembler
7008
 db 'femms',0Eh
7009
 dw simple_extended_instruction-assembler
7010
 db 'ffree',0
7011
 dw ffree_instruction-assembler
7012
 db 'fiadd',0
7013
 dw fi_instruction-assembler
7014
 db 'ficom',2
7015
 dw fi_instruction-assembler
7016
 db 'fidiv',6
7017
 dw fi_instruction-assembler
7018
 db 'fimul',1
7019
 dw fi_instruction-assembler
7020
 db 'finit',0E3h
7021
 dw finit_instruction-assembler
7022
 db 'fistp',3
7023
 dw fild_instruction-assembler
7024
 db 'fisub',4
7025
 dw fi_instruction-assembler
7026
 db 'fldcw',5
7027
 dw fldcw_instruction-assembler
7028
 db 'fldpi',101011b
7029
 dw simple_fpu_instruction-assembler
7030
 db 'fmulp',1
7031
 dw faddp_instruction-assembler
7032
 db 'fneni',0E0h
7033
 dw fninit_instruction-assembler
7034
 db 'fprem',111000b
7035
 dw simple_fpu_instruction-assembler
7036
 db 'fptan',110010b
7037
 dw simple_fpu_instruction-assembler
7038
 db 'fsave',6
7039
 dw fsave_instruction-assembler
7040
 db 'fsqrt',111010b
7041
 dw simple_fpu_instruction-assembler
7042
 db 'fstcw',7
7043
 dw fstcw_instruction-assembler
7044
 db 'fstsw',0
7045
 dw fstsw_instruction-assembler
7046
 db 'fsubp',5
7047
 dw faddp_instruction-assembler
7048
 db 'fsubr',5
7049
 dw basic_fpu_instruction-assembler
7050
 db 'fucom',4
7051
 dw ffree_instruction-assembler
7052
 db 'fwait',9Bh
7053
 dw simple_instruction-assembler
7054
 db 'fyl2x',110001b
7055
 dw simple_fpu_instruction-assembler
7056
 db 'iretd',0CFh
7057
 dw simple_instruction_32bit-assembler
7058
 db 'iretq',0CFh
7059
 dw simple_instruction_64bit-assembler
7060
 db 'iretw',0CFh
7061
 dw simple_instruction_16bit-assembler
7062
 db 'jecxz',0E3h
7063
 dw loop_instruction_32bit-assembler
7064
 db 'jrcxz',0E3h
7065
 dw loop_instruction_64bit-assembler
7066
 db 'label',0
7067
 dw label_directive-assembler
7068
 db 'lddqu',0
7069
 dw lddqu_instruction-assembler
7070
 db 'leave',0C9h
7071
 dw simple_instruction-assembler
7072
 db 'lodsb',0ACh
7073
 dw simple_instruction-assembler
7074
 db 'lodsd',0ADh
7075
 dw simple_instruction_32bit-assembler
7076
 db 'lodsq',0ADh
7077
 dw simple_instruction_64bit-assembler
7078
 db 'lodsw',0ADh
7079
 dw simple_instruction_16bit-assembler
7080
 db 'loopd',0E2h
7081
 dw loop_instruction_32bit-assembler
7082
 db 'loope',0E1h
7083
 dw loop_instruction-assembler
7084
 db 'loopq',0E2h
7085
 dw loop_instruction_64bit-assembler
7086
 db 'loopw',0E2h
7087
 dw loop_instruction_16bit-assembler
7088
 db 'loopz',0E1h
7089
 dw loop_instruction-assembler
7090
 db 'maxpd',5Fh
7091
 dw sse_pd_instruction-assembler
7092
 db 'maxps',5Fh
7093
 dw sse_ps_instruction-assembler
7094
 db 'maxsd',5Fh
7095
 dw sse_sd_instruction-assembler
7096
 db 'maxss',5Fh
7097
 dw sse_ss_instruction-assembler
7098
 db 'minpd',5Dh
7099
 dw sse_pd_instruction-assembler
7100
 db 'minps',5Dh
7101
 dw sse_ps_instruction-assembler
7102
 db 'minsd',5Dh
7103
 dw sse_sd_instruction-assembler
7104
 db 'minss',5Dh
7105
 dw sse_ss_instruction-assembler
7106
 db 'movsb',0A4h
7107
 dw simple_instruction-assembler
7108
 db 'movsd',0
7109
 dw movsd_instruction-assembler
7110
 db 'movsq',0A5h
7111
 dw simple_instruction_64bit-assembler
7112
 db 'movss',0
7113
 dw movss_instruction-assembler
7114
 db 'movsw',0A5h
7115
 dw simple_instruction_16bit-assembler
7116
 db 'movsx',0BEh
7117
 dw movx_instruction-assembler
7118
 db 'movzx',0B6h
7119
 dw movx_instruction-assembler
7120
 db 'mulpd',59h
7121
 dw sse_pd_instruction-assembler
7122
 db 'mulps',59h
7123
 dw sse_ps_instruction-assembler
7124
 db 'mulsd',59h
7125
 dw sse_sd_instruction-assembler
7126
 db 'mulss',59h
7127
 dw sse_ss_instruction-assembler
7128
 db 'mwait',0C9h
7129
 dw monitor_instruction-assembler
7130
 db 'outsb',6Eh
7131
 dw simple_instruction-assembler
7132
 db 'outsd',6Fh
7133
 dw simple_instruction_32bit-assembler
7134
 db 'outsw',6Fh
7135
 dw simple_instruction_16bit-assembler
7136
 db 'paddb',0FCh
7137
 dw mmx_instruction-assembler
7138
 db 'paddd',0FEh
7139
 dw mmx_instruction-assembler
7140
 db 'paddq',0D4h
7141
 dw mmx_instruction-assembler
7142
 db 'paddw',0FDh
7143
 dw mmx_instruction-assembler
7144
 db 'pandn',0DFh
7145
 dw mmx_instruction-assembler
7146
 db 'pause',0
7147
 dw pause_instruction-assembler
7148
 db 'pavgb',0E0h
7149
 dw mmx_instruction-assembler
7150
 db 'pavgw',0E3h
7151
 dw mmx_instruction-assembler
7152
 db 'pf2id',1Dh
7153
 dw amd3dnow_instruction-assembler
7154
 db 'pf2iw',1Ch
7155
 dw amd3dnow_instruction-assembler
7156
 db 'pfacc',0AEh
7157
 dw amd3dnow_instruction-assembler
7158
 db 'pfadd',9Eh
7159
 dw amd3dnow_instruction-assembler
7160
 db 'pfmax',0A4h
7161
 dw amd3dnow_instruction-assembler
7162
 db 'pfmin',94h
7163
 dw amd3dnow_instruction-assembler
7164
 db 'pfmul',0B4h
7165
 dw amd3dnow_instruction-assembler
7166
 db 'pfrcp',96h
7167
 dw amd3dnow_instruction-assembler
7168
 db 'pfsub',9Ah
7169
 dw amd3dnow_instruction-assembler
7170
 db 'pi2fd',0Dh
7171
 dw amd3dnow_instruction-assembler
7172
 db 'pi2fw',0Ch
7173
 dw amd3dnow_instruction-assembler
7174
 db 'popad',61h
7175
 dw simple_instruction_32bit_except64-assembler
7176
 db 'popaw',61h
7177
 dw simple_instruction_16bit_except64-assembler
7178
 db 'popfd',9Dh
7179
 dw simple_instruction_32bit_except64-assembler
7180
 db 'popfw',9Dh
7181
 dw simple_instruction_16bit-assembler
7182
 db 'popfq',9Dh
7183
 dw simple_instruction_only64-assembler
7184
 db 'pslld',0F2h
7185
 dw mmx_ps_instruction-assembler
7186
 db 'psllq',0F3h
7187
 dw mmx_ps_instruction-assembler
7188
 db 'psllw',0F1h
7189
 dw mmx_ps_instruction-assembler
7190
 db 'psrad',0E2h
7191
 dw mmx_ps_instruction-assembler
7192
 db 'psraw',0E1h
7193
 dw mmx_ps_instruction-assembler
7194
 db 'psrld',0D2h
7195
 dw mmx_ps_instruction-assembler
7196
 db 'psrlq',0D3h
7197
 dw mmx_ps_instruction-assembler
7198
 db 'psrlw',0D1h
7199
 dw mmx_ps_instruction-assembler
7200
 db 'psubb',0F8h
7201
 dw mmx_instruction-assembler
7202
 db 'psubd',0FAh
7203
 dw mmx_instruction-assembler
7204
 db 'psubq',0FBh
7205
 dw mmx_instruction-assembler
7206
 db 'psubw',0F9h
7207
 dw mmx_instruction-assembler
7208
 db 'pusha',60h
7209
 dw simple_instruction_except64-assembler
7210
 db 'pushd',4
7211
 dw push_instruction-assembler
7212
 db 'pushf',9Ch
7213
 dw simple_instruction-assembler
7214
 db 'pushq',8
7215
 dw push_instruction-assembler
7216
 db 'pushw',2
7217
 dw push_instruction-assembler
7218
 db 'rcpps',53h
7219
 dw sse_ps_instruction-assembler
7220
 db 'rcpss',53h
7221
 dw sse_ss_instruction-assembler
7222
 db 'rdmsr',32h
7223
 dw simple_extended_instruction-assembler
7224
 db 'rdpmc',33h
7225
 dw simple_extended_instruction-assembler
7226
 db 'rdtsc',31h
7227
 dw simple_extended_instruction-assembler
7228
 db 'repne',0F2h
7229
 dw prefix_instruction-assembler
7230
 db 'repnz',0F2h
7231
 dw prefix_instruction-assembler
7232
 db 'retfd',0CAh
7233
 dw ret_instruction_32bit-assembler
7234
 db 'retfq',0CAh
7235
 dw ret_instruction_64bit-assembler
7236
 db 'retfw',0CAh
7237
 dw ret_instruction_16bit-assembler
7238
 db 'retnd',0C2h
7239
 dw ret_instruction_32bit_except64-assembler
7240
 db 'retnq',0C2h
7241
 dw ret_instruction_only64-assembler
7242
 db 'retnw',0C2h
7243
 dw ret_instruction_16bit-assembler
7244
 db 'scasb',0AEh
7245
 dw simple_instruction-assembler
7246
 db 'scasd',0AFh
7247
 dw simple_instruction_32bit-assembler
7248
 db 'scasq',0AFh
7249
 dw simple_instruction_64bit-assembler
7250
 db 'scasw',0AFh
7251
 dw simple_instruction_16bit-assembler
7252
 db 'setae',93h
7253
 dw set_instruction-assembler
7254
 db 'setbe',96h
7255
 dw set_instruction-assembler
7256
 db 'setge',9Dh
7257
 dw set_instruction-assembler
7258
 db 'setle',9Eh
7259
 dw set_instruction-assembler
7260
 db 'setna',96h
7261
 dw set_instruction-assembler
7262
 db 'setnb',93h
7263
 dw set_instruction-assembler
7264
 db 'setnc',93h
7265
 dw set_instruction-assembler
7266
 db 'setne',95h
7267
 dw set_instruction-assembler
7268
 db 'setng',9Eh
7269
 dw set_instruction-assembler
7270
 db 'setnl',9Dh
7271
 dw set_instruction-assembler
7272
 db 'setno',91h
7273
 dw set_instruction-assembler
7274
 db 'setnp',9Bh
7275
 dw set_instruction-assembler
7276
 db 'setns',99h
7277
 dw set_instruction-assembler
7278
 db 'setnz',95h
7279
 dw set_instruction-assembler
7280
 db 'setpe',9Ah
7281
 dw set_instruction-assembler
7282
 db 'setpo',9Bh
7283
 dw set_instruction-assembler
7284
 db 'stack',0
7285
 dw stack_directive-assembler
7286
 db 'store',0
7287
 dw store_directive-assembler
7288
 db 'stosb',0AAh
7289
 dw simple_instruction-assembler
7290
 db 'stosd',0ABh
7291
 dw simple_instruction_32bit-assembler
7292
 db 'stosq',0ABh
7293
 dw simple_instruction_64bit-assembler
7294
 db 'stosw',0ABh
7295
 dw simple_instruction_16bit-assembler
7296
 db 'subpd',5Ch
7297
 dw sse_pd_instruction-assembler
7298
 db 'subps',5Ch
7299
 dw sse_ps_instruction-assembler
7300
 db 'subsd',5Ch
7301
 dw sse_sd_instruction-assembler
7302
 db 'subss',5Ch
7303
 dw sse_ss_instruction-assembler
7304
 db 'times',0
7305
 dw times_directive-assembler
7306
 db 'vmxon',6
7307
 dw vmxon_instruction-assembler
7308
 db 'while',0
7309
 dw while_directive-assembler
7310
 db 'wrmsr',30h
7311
 dw simple_extended_instruction-assembler
7312
 db 'xlatb',0D7h
7313
 dw simple_instruction-assembler
7314
 db 'xorpd',57h
7315
 dw sse_pd_instruction-assembler
7316
 db 'xorps',57h
7317
 dw sse_ps_instruction-assembler
7318
 db 0
7319
instructions_6:
7320
 db 'andnpd',55h
7321
 dw sse_pd_instruction-assembler
7322
 db 'andnps',55h
7323
 dw sse_ps_instruction-assembler
7324
 db 'cmovae',43h
7325
 dw cmov_instruction-assembler
7326
 db 'cmovbe',46h
7327
 dw cmov_instruction-assembler
7328
 db 'cmovge',4Dh
7329
 dw cmov_instruction-assembler
7330
 db 'cmovle',4Eh
7331
 dw cmov_instruction-assembler
7332
 db 'cmovna',46h
7333
 dw cmov_instruction-assembler
7334
 db 'cmovnb',43h
7335
 dw cmov_instruction-assembler
7336
 db 'cmovnc',43h
7337
 dw cmov_instruction-assembler
7338
 db 'cmovne',45h
7339
 dw cmov_instruction-assembler
7340
 db 'cmovng',4Eh
7341
 dw cmov_instruction-assembler
7342
 db 'cmovnl',4Dh
7343
 dw cmov_instruction-assembler
7344
 db 'cmovno',41h
7345
 dw cmov_instruction-assembler
7346
 db 'cmovnp',4Bh
7347
 dw cmov_instruction-assembler
7348
 db 'cmovns',49h
7349
 dw cmov_instruction-assembler
7350
 db 'cmovnz',45h
7351
 dw cmov_instruction-assembler
7352
 db 'cmovpe',4Ah
7353
 dw cmov_instruction-assembler
7354
 db 'cmovpo',4Bh
7355
 dw cmov_instruction-assembler
7356
 db 'comisd',2Fh
7357
 dw comisd_instruction-assembler
7358
 db 'comiss',2Fh
7359
 dw comiss_instruction-assembler
7360
 db 'fcmovb',0C0h
7361
 dw fcmov_instruction-assembler
7362
 db 'fcmove',0C8h
7363
 dw fcmov_instruction-assembler
7364
 db 'fcmovu',0D8h
7365
 dw fcmov_instruction-assembler
7366
 db 'fcomip',0F0h
7367
 dw fcomip_instruction-assembler
7368
 db 'fcompp',0
7369
 dw fcompp_instruction-assembler
7370
 db 'fdivrp',6
7371
 dw faddp_instruction-assembler
7372
 db 'ffreep',0
7373
 dw ffreep_instruction-assembler
7374
 db 'ficomp',3
7375
 dw fi_instruction-assembler
7376
 db 'fidivr',7
7377
 dw fi_instruction-assembler
7378
 db 'fisttp',1
7379
 dw fild_instruction-assembler
7380
 db 'fisubr',5
7381
 dw fi_instruction-assembler
7382
 db 'fldenv',4
7383
 dw fldenv_instruction-assembler
7384
 db 'fldl2e',101010b
7385
 dw simple_fpu_instruction-assembler
7386
 db 'fldl2t',101001b
7387
 dw simple_fpu_instruction-assembler
7388
 db 'fldlg2',101100b
7389
 dw simple_fpu_instruction-assembler
7390
 db 'fldln2',101101b
7391
 dw simple_fpu_instruction-assembler
7392
 db 'fnclex',0E2h
7393
 dw fninit_instruction-assembler
7394
 db 'fndisi',0E1h
7395
 dw fninit_instruction-assembler
7396
 db 'fninit',0E3h
7397
 dw fninit_instruction-assembler
7398
 db 'fnsave',6
7399
 dw fnsave_instruction-assembler
7400
 db 'fnstcw',7
7401
 dw fldcw_instruction-assembler
7402
 db 'fnstsw',0
7403
 dw fnstsw_instruction-assembler
7404
 db 'format',0
7405
 dw format_directive-assembler
7406
 db 'fpatan',110011b
7407
 dw simple_fpu_instruction-assembler
7408
 db 'fprem1',110101b
7409
 dw simple_fpu_instruction-assembler
7410
 db 'frstor',4
7411
 dw fnsave_instruction-assembler
7412
 db 'frstpm',0E5h
7413
 dw fninit_instruction-assembler
7414
 db 'fscale',111101b
7415
 dw simple_fpu_instruction-assembler
7416
 db 'fsetpm',0E4h
7417
 dw fninit_instruction-assembler
7418
 db 'fstenv',6
7419
 dw fstenv_instruction-assembler
7420
 db 'fsubrp',4
7421
 dw faddp_instruction-assembler
7422
 db 'fucomi',0E8h
7423
 dw fcomi_instruction-assembler
7424
 db 'fucomp',5
7425
 dw ffree_instruction-assembler
7426
 db 'fxsave',0
7427
 dw fxsave_instruction-assembler
7428
 db 'haddpd',07Ch
7429
 dw sse_pd_instruction-assembler
7430
 db 'haddps',07Ch
7431
 dw cvtpd2dq_instruction-assembler
7432
 db 'hsubpd',07Dh
7433
 dw sse_pd_instruction-assembler
7434
 db 'hsubps',07Dh
7435
 dw cvtpd2dq_instruction-assembler
7436
 db 'invlpg',0
7437
 dw invlpg_instruction-assembler
7438
 db 'lfence',0E8h
7439
 dw fence_instruction-assembler
7440
 db 'looped',0E1h
7441
 dw loop_instruction_32bit-assembler
7442
 db 'loopeq',0E1h
7443
 dw loop_instruction_64bit-assembler
7444
 db 'loopew',0E1h
7445
 dw loop_instruction_16bit-assembler
7446
 db 'loopne',0E0h
7447
 dw loop_instruction-assembler
7448
 db 'loopnz',0E0h
7449
 dw loop_instruction-assembler
7450
 db 'loopzd',0E1h
7451
 dw loop_instruction_32bit-assembler
7452
 db 'loopzq',0E1h
7453
 dw loop_instruction_64bit-assembler
7454
 db 'loopzw',0E1h
7455
 dw loop_instruction_16bit-assembler
7456
 db 'mfence',0F0h
7457
 dw fence_instruction-assembler
7458
 db 'movapd',28h
7459
 dw movpd_instruction-assembler
7460
 db 'movaps',28h
7461
 dw movps_instruction-assembler
7462
 db 'movdqa',66h
7463
 dw movdq_instruction-assembler
7464
 db 'movdqu',0F3h
7465
 dw movdq_instruction-assembler
7466
 db 'movhpd',16h
7467
 dw movlpd_instruction-assembler
7468
 db 'movhps',16h
7469
 dw movlps_instruction-assembler
7470
 db 'movlpd',12h
7471
 dw movlpd_instruction-assembler
7472
 db 'movlps',12h
7473
 dw movlps_instruction-assembler
7474
 db 'movnti',0C3h
7475
 dw movnti_instruction-assembler
7476
 db 'movntq',0E7h
7477
 dw movntq_instruction-assembler
7478
 db 'movsxd',63h
7479
 dw movsxd_instruction-assembler
7480
 db 'movupd',10h
7481
 dw movpd_instruction-assembler
7482
 db 'movups',10h
7483
 dw movps_instruction-assembler
7484
 db 'paddsb',0ECh
7485
 dw mmx_instruction-assembler
7486
 db 'paddsw',0EDh
7487
 dw mmx_instruction-assembler
7488
 db 'pextrw',0C5h
7489
 dw pextrw_instruction-assembler
7490
 db 'pfnacc',8Ah
7491
 dw amd3dnow_instruction-assembler
7492
 db 'pfsubr',0AAh
7493
 dw amd3dnow_instruction-assembler
7494
 db 'pinsrw',0C4h
7495
 dw pinsrw_instruction-assembler
7496
 db 'pmaxsw',0EEh
7497
 dw mmx_instruction-assembler
7498
 db 'pmaxub',0DEh
7499
 dw mmx_instruction-assembler
7500
 db 'pminsw',0EAh
7501
 dw mmx_instruction-assembler
7502
 db 'pminub',0DAh
7503
 dw mmx_instruction-assembler
7504
 db 'pmulhw',0E5h
7505
 dw mmx_instruction-assembler
7506
 db 'pmullw',0D5h
7507
 dw mmx_instruction-assembler
7508
 db 'psadbw',0F6h
7509
 dw mmx_instruction-assembler
7510
 db 'pshufd',66h
7511
 dw pshufd_instruction-assembler
7512
 db 'pshufw',0
7513
 dw pshufw_instruction-assembler
7514
 db 'pslldq',111b
7515
 dw ps_dq_instruction-assembler
7516
 db 'psrldq',011b
7517
 dw ps_dq_instruction-assembler
7518
 db 'psubsb',0E8h
7519
 dw mmx_instruction-assembler
7520
 db 'psubsw',0E9h
7521
 dw mmx_instruction-assembler
7522
 db 'pswapd',0BBh
7523
 dw amd3dnow_instruction-assembler
7524
 db 'public',0
7525
 dw public_directive-assembler
7526
 db 'pushad',60h
7527
 dw simple_instruction_32bit_except64-assembler
7528
 db 'pushaw',60h
7529
 dw simple_instruction_16bit_except64-assembler
7530
 db 'pushfd',9Ch
7531
 dw simple_instruction_32bit_except64-assembler
7532
 db 'pushfq',9Ch
7533
 dw simple_instruction_only64-assembler
7534
 db 'pushfw',9Ch
7535
 dw simple_instruction_16bit-assembler
7536
 db 'rdtscp',1
7537
 dw swapgs_instruction-assembler
7538
 db 'repeat',0
7539
 dw repeat_directive-assembler
7540
 db 'setalc',0D6h
7541
 dw simple_instruction_except64-assembler
7542
 db 'setnae',92h
7543
 dw set_instruction-assembler
7544
 db 'setnbe',97h
7545
 dw set_instruction-assembler
7546
 db 'setnge',9Ch
7547
 dw set_instruction-assembler
7548
 db 'setnle',9Fh
7549
 dw set_instruction-assembler
7550
 db 'sfence',0F8h
7551
 dw fence_instruction-assembler
7552
 db 'shufpd',0C6h
7553
 dw sse_pd_instruction-assembler
7554
 db 'shufps',0C6h
7555
 dw sse_ps_instruction-assembler
7556
 db 'sqrtpd',51h
7557
 dw sse_pd_instruction-assembler
7558
 db 'sqrtps',51h
7559
 dw sse_ps_instruction-assembler
7560
 db 'sqrtsd',51h
7561
 dw sse_sd_instruction-assembler
7562
 db 'sqrtss',51h
7563
 dw sse_ss_instruction-assembler
7564
 db 'sysret',07h
7565
 dw simple_extended_instruction-assembler
7566
 db 'swapgs',0
7567
 dw swapgs_instruction-assembler
7568
 db 'vmcall',0C1h
7569
 dw simple_vmx_instruction-assembler
7570
 db 'vmread',0
7571
 dw vmread_instruction-assembler
7572
 db 'vmxoff',0C4h
7573
 dw simple_vmx_instruction-assembler
7574
 db 'wbinvd',9
7575
 dw simple_extended_instruction-assembler
7576
 db 0
7577
instructions_7:
7578
 db 'clflush',111b
7579
 dw fxsave_instruction-assembler
7580
 db 'cmovnae',42h
7581
 dw cmov_instruction-assembler
7582
 db 'cmovnbe',47h
7583
 dw cmov_instruction-assembler
7584
 db 'cmovnge',4Ch
7585
 dw cmov_instruction-assembler
7586
 db 'cmovnle',4Fh
7587
 dw cmov_instruction-assembler
7588
 db 'cmpeqpd',0
7589
 dw cmp_pd_instruction-assembler
7590
 db 'cmpeqps',0
7591
 dw cmp_ps_instruction-assembler
7592
 db 'cmpeqsd',0
7593
 dw cmp_sd_instruction-assembler
7594
 db 'cmpeqss',0
7595
 dw cmp_ss_instruction-assembler
7596
 db 'cmplepd',2
7597
 dw cmp_pd_instruction-assembler
7598
 db 'cmpleps',2
7599
 dw cmp_ps_instruction-assembler
7600
 db 'cmplesd',2
7601
 dw cmp_sd_instruction-assembler
7602
 db 'cmpless',2
7603
 dw cmp_ss_instruction-assembler
7604
 db 'cmpltpd',1
7605
 dw cmp_pd_instruction-assembler
7606
 db 'cmpltps',1
7607
 dw cmp_ps_instruction-assembler
7608
 db 'cmpltsd',1
7609
 dw cmp_sd_instruction-assembler
7610
 db 'cmpltss',1
7611
 dw cmp_ss_instruction-assembler
7612
 db 'cmpxchg',0B0h
7613
 dw basic_486_instruction-assembler
7614
 db 'display',0
7615
 dw display_directive-assembler
7616
 db 'fcmovbe',0D0h
7617
 dw fcmov_instruction-assembler
7618
 db 'fcmovnb',0C0h
7619
 dw fcomi_instruction-assembler
7620
 db 'fcmovne',0C8h
7621
 dw fcomi_instruction-assembler
7622
 db 'fcmovnu',0D8h
7623
 dw fcomi_instruction-assembler
7624
 db 'fdecstp',110110b
7625
 dw simple_fpu_instruction-assembler
7626
 db 'fincstp',110111b
7627
 dw simple_fpu_instruction-assembler
7628
 db 'fnstenv',6
7629
 dw fldenv_instruction-assembler
7630
 db 'frndint',111100b
7631
 dw simple_fpu_instruction-assembler
7632
 db 'fsincos',111011b
7633
 dw simple_fpu_instruction-assembler
7634
 db 'fucomip',0E8h
7635
 dw fcomip_instruction-assembler
7636
 db 'fucompp',0
7637
 dw fucompp_instruction-assembler
7638
 db 'fxrstor',1
7639
 dw fxsave_instruction-assembler
7640
 db 'fxtract',110100b
7641
 dw simple_fpu_instruction-assembler
7642
 db 'fyl2xp1',111001b
7643
 dw simple_fpu_instruction-assembler
7644
 db 'ldmxcsr',10b
7645
 dw fxsave_instruction-assembler
7646
 db 'loopned',0E0h
7647
 dw loop_instruction_32bit-assembler
7648
 db 'loopneq',0E0h
7649
 dw loop_instruction_64bit-assembler
7650
 db 'loopnew',0E0h
7651
 dw loop_instruction_16bit-assembler
7652
 db 'loopnzd',0E0h
7653
 dw loop_instruction_32bit-assembler
7654
 db 'loopnzq',0E0h
7655
 dw loop_instruction_64bit-assembler
7656
 db 'loopnzw',0E0h
7657
 dw loop_instruction_16bit-assembler
7658
 db 'monitor',0C8h
7659
 dw monitor_instruction-assembler
7660
 db 'movddup',12h
7661
 dw sse_sd_instruction-assembler
7662
 db 'movdq2q',0
7663
 dw movdq2q_instruction-assembler
7664
 db 'movhlps',12h
7665
 dw movhlps_instruction-assembler
7666
 db 'movlhps',16h
7667
 dw movhlps_instruction-assembler
7668
 db 'movntdq',0E7h
7669
 dw movntdq_instruction-assembler
7670
 db 'movntpd',2Bh
7671
 dw movntdq_instruction-assembler
7672
 db 'movntps',2Bh
7673
 dw movntps_instruction-assembler
7674
 db 'movq2dq',0
7675
 dw movq2dq_instruction-assembler
7676
 db 'paddusb',0DCh
7677
 dw mmx_instruction-assembler
7678
 db 'paddusw',0DDh
7679
 dw mmx_instruction-assembler
7680
 db 'pavgusb',0BFh
7681
 dw amd3dnow_instruction-assembler
7682
 db 'pcmpeqb',74h
7683
 dw mmx_instruction-assembler
7684
 db 'pcmpeqd',76h
7685
 dw mmx_instruction-assembler
7686
 db 'pcmpeqw',75h
7687
 dw mmx_instruction-assembler
7688
 db 'pcmpgtb',64h
7689
 dw mmx_instruction-assembler
7690
 db 'pcmpgtd',66h
7691
 dw mmx_instruction-assembler
7692
 db 'pcmpgtw',65h
7693
 dw mmx_instruction-assembler
7694
 db 'pfcmpeq',0B0h
7695
 dw amd3dnow_instruction-assembler
7696
 db 'pfcmpge',90h
7697
 dw amd3dnow_instruction-assembler
7698
 db 'pfcmpgt',0A0h
7699
 dw amd3dnow_instruction-assembler
7700
 db 'pfpnacc',8Eh
7701
 dw amd3dnow_instruction-assembler
7702
 db 'pfrsqrt',97h
7703
 dw amd3dnow_instruction-assembler
7704
 db 'pmaddwd',0F5h
7705
 dw mmx_instruction-assembler
7706
 db 'pmulhrw',0B7h
7707
 dw amd3dnow_instruction-assembler
7708
 db 'pmulhuw',0E4h
7709
 dw mmx_instruction-assembler
7710
 db 'pmuludq',0F4h
7711
 dw mmx_instruction-assembler
7712
 db 'pshufhw',0F3h
7713
 dw pshufd_instruction-assembler
7714
 db 'pshuflw',0F2h
7715
 dw pshufd_instruction-assembler
7716
 db 'psubusb',0D8h
7717
 dw mmx_instruction-assembler
7718
 db 'psubusw',0D9h
7719
 dw mmx_instruction-assembler
7720
 db 'rsqrtps',52h
7721
 dw sse_ps_instruction-assembler
7722
 db 'rsqrtss',52h
7723
 dw sse_ss_instruction-assembler
7724
 db 'section',0
7725
 dw section_directive-assembler
7726
 db 'segment',0
7727
 dw segment_directive-assembler
7728
 db 'stmxcsr',11b
7729
 dw fxsave_instruction-assembler
7730
 db 'syscall',05h
7731
 dw simple_extended_instruction-assembler
7732
 db 'sysexit',35h
7733
 dw simple_extended_instruction-assembler
7734
 db 'ucomisd',2Eh
7735
 dw comisd_instruction-assembler
7736
 db 'ucomiss',2Eh
7737
 dw comiss_instruction-assembler
7738
 db 'virtual',0
7739
 dw virtual_directive-assembler
7740
 db 'vmclear',6
7741
 dw vmclear_instruction-assembler
7742
 db 'vmptrld',6
7743
 dw vmx_instruction-assembler
7744
 db 'vmptrst',7
7745
 dw vmx_instruction-assembler
7746
 db 'vmwrite',0
7747
 dw vmwrite_instruction-assembler
7748
 db 0
7749
instructions_8:
7750
 db 'addsubpd',0D0h
7751
 dw sse_pd_instruction-assembler
7752
 db 'addsubps',0D0h
7753
 dw cvtpd2dq_instruction-assembler
7754
 db 'cmpneqpd',4
7755
 dw cmp_pd_instruction-assembler
7756
 db 'cmpneqps',4
7757
 dw cmp_ps_instruction-assembler
7758
 db 'cmpneqsd',4
7759
 dw cmp_sd_instruction-assembler
7760
 db 'cmpneqss',4
7761
 dw cmp_ss_instruction-assembler
7762
 db 'cmpnlepd',6
7763
 dw cmp_pd_instruction-assembler
7764
 db 'cmpnleps',6
7765
 dw cmp_ps_instruction-assembler
7766
 db 'cmpnlesd',6
7767
 dw cmp_sd_instruction-assembler
7768
 db 'cmpnless',6
7769
 dw cmp_ss_instruction-assembler
7770
 db 'cmpnltpd',5
7771
 dw cmp_pd_instruction-assembler
7772
 db 'cmpnltps',5
7773
 dw cmp_ps_instruction-assembler
7774
 db 'cmpnltsd',5
7775
 dw cmp_sd_instruction-assembler
7776
 db 'cmpnltss',5
7777
 dw cmp_ss_instruction-assembler
7778
 db 'cmpordpd',7
7779
 dw cmp_pd_instruction-assembler
7780
 db 'cmpordps',7
7781
 dw cmp_ps_instruction-assembler
7782
 db 'cmpordsd',7
7783
 dw cmp_sd_instruction-assembler
7784
 db 'cmpordss',7
7785
 dw cmp_ss_instruction-assembler
7786
 db 'cvtdq2pd',0E6h
7787
 dw cvtdq2pd_instruction-assembler
7788
 db 'cvtdq2ps',5Bh
7789
 dw sse_ps_instruction-assembler
7790
 db 'cvtpd2dq',0E6h
7791
 dw cvtpd2dq_instruction-assembler
7792
 db 'cvtpd2pi',2Dh
7793
 dw cvtpd2pi_instruction-assembler
7794
 db 'cvtpd2ps',5Ah
7795
 dw sse_pd_instruction-assembler
7796
 db 'cvtpi2pd',2Ah
7797
 dw cvtpi2pd_instruction-assembler
7798
 db 'cvtpi2ps',2Ah
7799
 dw cvtpi2ps_instruction-assembler
7800
 db 'cvtps2dq',5Bh
7801
 dw sse_pd_instruction-assembler
7802
 db 'cvtps2pd',5Ah
7803
 dw cvtps2pd_instruction-assembler
7804
 db 'cvtps2pi',2Dh
7805
 dw cvtps2pi_instruction-assembler
7806
 db 'cvtsd2si',2Dh
7807
 dw cvtsd2si_instruction-assembler
7808
 db 'cvtsd2ss',5Ah
7809
 dw sse_sd_instruction-assembler
7810
 db 'cvtsi2sd',2Ah
7811
 dw cvtsi2sd_instruction-assembler
7812
 db 'cvtsi2ss',2Ah
7813
 dw cvtsi2ss_instruction-assembler
7814
 db 'cvtss2sd',5Ah
7815
 dw sse_ss_instruction-assembler
7816
 db 'cvtss2si',2Dh
7817
 dw cvtss2si_instruction-assembler
7818
 db 'fcmovnbe',0D0h
7819
 dw fcomi_instruction-assembler
7820
 db 'maskmovq',0
7821
 dw maskmovq_instruction-assembler
7822
 db 'movmskpd',0
7823
 dw movmskpd_instruction-assembler
7824
 db 'movmskps',0
7825
 dw movmskps_instruction-assembler
7826
 db 'movshdup',16h
7827
 dw cvtdq2pd_instruction-assembler
7828
 db 'movsldup',12h
7829
 dw cvtdq2pd_instruction-assembler
7830
 db 'packssdw',6Bh
7831
 dw mmx_instruction-assembler
7832
 db 'packsswb',63h
7833
 dw mmx_instruction-assembler
7834
 db 'packuswb',67h
7835
 dw mmx_instruction-assembler
7836
 db 'pfrcpit1',0A6h
7837
 dw amd3dnow_instruction-assembler
7838
 db 'pfrcpit2',0B6h
7839
 dw amd3dnow_instruction-assembler
7840
 db 'pfrsqit1',0A7h
7841
 dw amd3dnow_instruction-assembler
7842
 db 'pmovmskb',0D7h
7843
 dw pextrw_instruction-assembler
7844
 db 'prefetch',0
7845
 dw amd_prefetch_instruction-assembler
7846
 db 'sysenter',34h
7847
 dw simple_extended_instruction-assembler
7848
 db 'unpckhpd',15h
7849
 dw sse_pd_instruction-assembler
7850
 db 'unpckhps',15h
7851
 dw sse_ps_instruction-assembler
7852
 db 'unpcklpd',14h
7853
 dw sse_pd_instruction-assembler
7854
 db 'unpcklps',14h
7855
 dw sse_ps_instruction-assembler
7856
 db 'vmlaunch',0C2h
7857
 dw simple_vmx_instruction-assembler
7858
 db 'vmresume',0C3h
7859
 dw simple_vmx_instruction-assembler
7860
 db 0
7861
instructions_9:
7862
 db 'cmpxchg8b',8
7863
 dw cmpxchgx_instruction-assembler
7864
 db 'cvttpd2dq',0E6h
7865
 dw sse_pd_instruction-assembler
7866
 db 'cvttpd2pi',2Ch
7867
 dw cvtpd2pi_instruction-assembler
7868
 db 'cvttps2dq',5Bh
7869
 dw cvtdq2pd_instruction-assembler
7870
 db 'cvttps2pi',2Ch
7871
 dw cvtps2pi_instruction-assembler
7872
 db 'cvttsd2si',2Ch
7873
 dw cvtsd2si_instruction-assembler
7874
 db 'cvttss2si',2Ch
7875
 dw cvtss2si_instruction-assembler
7876
 db 'prefetchw',1
7877
 dw amd_prefetch_instruction-assembler
7878
 db 'punpckhbw',68h
7879
 dw mmx_instruction-assembler
7880
 db 'punpckhdq',6Ah
7881
 dw mmx_instruction-assembler
7882
 db 'punpckhwd',69h
7883
 dw mmx_instruction-assembler
7884
 db 'punpcklbw',60h
7885
 dw mmx_instruction-assembler
7886
 db 'punpckldq',62h
7887
 dw mmx_instruction-assembler
7888
 db 'punpcklwd',61h
7889
 dw mmx_instruction-assembler
7890
 db 0
7891
instructions_10:
7892
 db 'cmpunordpd',3
7893
 dw cmp_pd_instruction-assembler
7894
 db 'cmpunordps',3
7895
 dw cmp_ps_instruction-assembler
7896
 db 'cmpunordsd',3
7897
 dw cmp_sd_instruction-assembler
7898
 db 'cmpunordss',3
7899
 dw cmp_ss_instruction-assembler
7900
 db 'cmpxchg16b',16
7901
 dw cmpxchgx_instruction-assembler
7902
 db 'loadall286',5
7903
 dw simple_extended_instruction-assembler
7904
 db 'loadall386',7
7905
 dw simple_extended_instruction-assembler
7906
 db 'maskmovdqu',0
7907
 dw maskmovdqu_instruction-assembler
7908
 db 'prefetcht0',1
7909
 dw prefetch_instruction-assembler
7910
 db 'prefetcht1',2
7911
 dw prefetch_instruction-assembler
7912
 db 'prefetcht2',3
7913
 dw prefetch_instruction-assembler
7914
 db 'punpckhqdq',6Dh
7915
 dw sse_pd_instruction-assembler
7916
 db 'punpcklqdq',6Ch
7917
 dw sse_pd_instruction-assembler
7918
 db 0
7919
instructions_11:
7920
 db 'prefetchnta',0
7921
 dw prefetch_instruction-assembler
7922
 db 0
7923