Subversion Repositories Kolibri OS

Rev

Rev 1039 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1039 Rev 1053
Line 129... Line 129...
129
	mov	[postbyte_register],al
129
	mov	[postbyte_register],al
130
	pop	ecx ebx edx
130
	pop	ecx ebx edx
131
	mov	al,ah
131
	mov	al,ah
132
	cmp	al,1
132
	cmp	al,1
133
	je	basic_mem_reg_8bit
133
	je	instruction_ready
134
	call	operand_autodetect
134
	call	operand_autodetect
135
	inc	[base_code]
135
	inc	[base_code]
136
      basic_mem_reg_8bit:
136
      instruction_ready:
137
	call	store_instruction
137
	call	store_instruction
138
	jmp	instruction_assembled
138
	jmp	instruction_assembled
139
      basic_mem_imm:
139
      basic_mem_imm:
140
	mov	al,[operand_size]
140
	mov	al,[operand_size]
141
	cmp	al,1
141
	cmp	al,1
142
	je	basic_mem_imm_8bit
142
	jb	basic_mem_imm_nosize
-
 
143
	je	basic_mem_imm_8bit
143
	cmp	al,2
144
	cmp	al,2
144
	je	basic_mem_imm_16bit
145
	je	basic_mem_imm_16bit
145
	cmp	al,4
146
	cmp	al,4
146
	je	basic_mem_imm_32bit
147
	je	basic_mem_imm_32bit
147
	cmp	al,8
148
	cmp	al,8
148
	je	basic_mem_imm_64bit
149
	jne	invalid_operand_size
-
 
150
      basic_mem_imm_64bit:
149
	or	al,al
151
	cmp	[size_declared],0
-
 
152
	jne	long_immediate_not_encodable
-
 
153
	call	operand_64bit
-
 
154
	call	get_simm32
-
 
155
	cmp	[value_type],4
150
	jnz	invalid_operand_size
156
	jae	long_immediate_not_encodable
-
 
157
	jmp	basic_mem_imm_32bit_ok
-
 
158
      basic_mem_imm_nosize:
151
	cmp	[error_line],0
159
	cmp	[error_line],0
152
	jne	basic_mem_imm_8bit
160
	jne	basic_mem_imm_8bit
153
	mov	eax,[current_line]
161
	mov	eax,[current_line]
154
	mov	[error_line],eax
162
	mov	[error_line],eax
155
	mov	[error],operand_size_not_specified
163
	mov	[error],operand_size_not_specified
156
      basic_mem_imm_8bit:
164
      basic_mem_imm_8bit:
Line 207... Line 215...
207
      basic_mem_imm_32bit_store:
215
      basic_mem_imm_32bit_store:
208
	mov	[base_code],81h
216
	mov	[base_code],81h
209
	call	store_instruction_with_imm32
217
	call	store_instruction_with_imm32
210
	jmp	instruction_assembled
218
	jmp	instruction_assembled
211
      basic_mem_imm_64bit:
219
      get_simm32:
212
	cmp	[size_declared],0
-
 
213
	jne	long_immediate_not_encodable
-
 
214
	call	operand_64bit
-
 
215
	call	get_simm32
-
 
216
	cmp	[value_type],4
-
 
217
	jae	long_immediate_not_encodable
-
 
218
	jmp	basic_mem_imm_32bit_ok
-
 
219
      get_simm32:
-
 
220
	call	get_qword_value
220
	call	get_qword_value
221
	mov	ecx,edx
221
	mov	ecx,edx
222
	cdq
222
	cdq
223
	cmp	ecx,edx
223
	cmp	ecx,edx
224
	jne	value_out_of_range
224
	jne	value_out_of_range
Line 248... Line 248...
248
	cmp	al,1
248
	cmp	al,1
249
	je	basic_reg_mem_8bit
249
	je	basic_reg_mem_8bit
250
	call	operand_autodetect
250
	call	operand_autodetect
251
	add	[base_code],3
251
	add	[base_code],3
252
	call	store_instruction
252
	jmp	instruction_ready
253
	jmp	instruction_assembled
-
 
254
      basic_reg_mem_8bit:
253
      basic_reg_mem_8bit:
255
	add	[base_code],2
254
	add	[base_code],2
256
	call	store_instruction
255
	jmp	instruction_ready
257
	jmp	instruction_assembled
-
 
258
      basic_reg_reg:
256
      basic_reg_reg:
259
	lods	byte [esi]
257
	lods	byte [esi]
260
	call	convert_register
258
	call	convert_register
261
	mov	bl,[postbyte_register]
259
	mov	bl,[postbyte_register]
262
	mov	[postbyte_register],al
260
	mov	[postbyte_register],al
263
	mov	al,ah
261
	mov	al,ah
264
	cmp	al,1
262
	cmp	al,1
265
	je	basic_reg_reg_8bit
263
	je	nomem_instruction_ready
266
	call	operand_autodetect
264
	call	operand_autodetect
267
	inc	[base_code]
265
	inc	[base_code]
268
      basic_reg_reg_8bit:
266
      nomem_instruction_ready:
269
	call	store_nomem_instruction
267
	call	store_nomem_instruction
270
	jmp	instruction_assembled
268
	jmp	instruction_assembled
271
      basic_reg_imm:
269
      basic_reg_imm:
272
	mov	al,[operand_size]
270
	mov	al,[operand_size]
273
	cmp	al,1
271
	cmp	al,1
274
	je	basic_reg_imm_8bit
272
	je	basic_reg_imm_8bit
Line 276... Line 274...
276
	je	basic_reg_imm_16bit
274
	je	basic_reg_imm_16bit
277
	cmp	al,4
275
	cmp	al,4
278
	je	basic_reg_imm_32bit
276
	je	basic_reg_imm_32bit
279
	cmp	al,8
277
	cmp	al,8
280
	je	basic_reg_imm_64bit
278
	jne	invalid_operand_size
-
 
279
      basic_reg_imm_64bit:
281
	or	al,al
280
	cmp	[size_declared],0
282
	jnz	invalid_operand_size
281
	jne	long_immediate_not_encodable
283
	cmp	[error_line],0
282
	call	operand_64bit
284
	jne	basic_reg_imm_32bit
283
	call	get_simm32
285
	mov	eax,[current_line]
284
	cmp	[value_type],4
286
	mov	[error_line],eax
-
 
287
	mov	[error],operand_size_not_specified
285
	jae	long_immediate_not_encodable
288
	jmp	basic_reg_imm_32bit
286
	jmp	basic_reg_imm_32bit_ok
289
      basic_reg_imm_8bit:
287
      basic_reg_imm_8bit:
290
	call	get_byte_value
288
	call	get_byte_value
291
	mov	dl,al
289
	mov	dl,al
292
	mov	bl,[base_code]
290
	mov	bl,[base_code]
293
	shr	bl,3
291
	shr	bl,3
294
	xchg	bl,[postbyte_register]
292
	xchg	bl,[postbyte_register]
Line 325... Line 323...
325
	or	bl,bl
323
	or	bl,bl
326
	jz	basic_ax_imm
324
	jz	basic_ax_imm
327
	mov	[base_code],81h
325
	mov	[base_code],81h
328
	call	store_nomem_instruction
326
	call	store_nomem_instruction
329
	mov	ax,dx
327
      basic_store_imm_16bit:
-
 
328
	mov	ax,dx
330
	call	mark_relocation
329
	call	mark_relocation
331
	stos	word [edi]
330
	stos	word [edi]
332
	jmp	instruction_assembled
331
	jmp	instruction_assembled
333
      basic_reg_simm_8bit:
332
      basic_reg_simm_8bit:
334
	mov	[base_code],83h
333
	mov	[base_code],83h
Line 338... Line 337...
338
	jmp	instruction_assembled
337
	jmp	instruction_assembled
339
      basic_ax_imm:
338
      basic_ax_imm:
340
	add	[base_code],5
339
	add	[base_code],5
341
	call	store_instruction_code
340
	call	store_instruction_code
342
	mov	ax,dx
341
	jmp	basic_store_imm_16bit
343
	call	mark_relocation
-
 
344
	stos	word [edi]
-
 
345
	jmp	instruction_assembled
-
 
346
      basic_reg_imm_32bit:
342
      basic_reg_imm_32bit:
347
	call	operand_32bit
343
	call	operand_32bit
348
	call	get_dword_value
344
	call	get_dword_value
349
      basic_reg_imm_32bit_ok:
345
      basic_reg_imm_32bit_ok:
350
	mov	edx,eax
346
	mov	edx,eax
351
	mov	bl,[base_code]
347
	mov	bl,[base_code]
Line 363... Line 359...
363
	or	bl,bl
359
	or	bl,bl
364
	jz	basic_eax_imm
360
	jz	basic_eax_imm
365
	mov	[base_code],81h
361
	mov	[base_code],81h
366
	call	store_nomem_instruction
362
	call	store_nomem_instruction
367
	mov	eax,edx
363
      basic_store_imm_32bit:
-
 
364
	mov	eax,edx
368
	call	mark_relocation
365
	call	mark_relocation
369
	stos	dword [edi]
366
	stos	dword [edi]
370
	jmp	instruction_assembled
367
	jmp	instruction_assembled
371
      basic_eax_imm:
368
      basic_eax_imm:
372
	add	[base_code],5
369
	add	[base_code],5
373
	call	store_instruction_code
370
	call	store_instruction_code
374
	mov	eax,edx
371
	jmp	basic_store_imm_32bit
375
	call	mark_relocation
-
 
376
	stos	dword [edi]
-
 
377
	jmp	instruction_assembled
-
 
378
      basic_reg_imm_64bit:
-
 
379
	cmp	[size_declared],0
-
 
380
	jne	long_immediate_not_encodable
-
 
381
	call	operand_64bit
-
 
382
	call	get_simm32
-
 
383
	cmp	[value_type],4
-
 
384
	jae	long_immediate_not_encodable
-
 
385
	jmp	basic_reg_imm_32bit_ok
-
 
386
single_operand_instruction:
372
single_operand_instruction:
387
	mov	[base_code],0F6h
373
	mov	[base_code],0F6h
388
	mov	[postbyte_register],al
374
	mov	[postbyte_register],al
389
	lods	byte [esi]
375
	lods	byte [esi]
390
	call	get_size_operator
376
	call	get_size_operator
391
	cmp	al,10h
377
	cmp	al,10h
Line 399... Line 385...
399
	je	single_mem_8bit
385
	je	single_mem_8bit
400
	jb	single_mem_nosize
386
	jb	single_mem_nosize
401
	call	operand_autodetect
387
	call	operand_autodetect
402
	inc	[base_code]
388
	inc	[base_code]
403
	call	store_instruction
389
	jmp	instruction_ready
404
	jmp	instruction_assembled
-
 
405
      single_mem_nosize:
390
      single_mem_nosize:
406
	cmp	[error_line],0
391
	cmp	[error_line],0
407
	jne	single_mem_8bit
392
	jne	single_mem_8bit
408
	mov	eax,[current_line]
393
	mov	eax,[current_line]
409
	mov	[error_line],eax
394
	mov	[error_line],eax
410
	mov	[error],operand_size_not_specified
395
	mov	[error],operand_size_not_specified
411
      single_mem_8bit:
396
      single_mem_8bit:
412
	call	store_instruction
397
	jmp	instruction_ready
413
	jmp	instruction_assembled
-
 
414
      single_reg:
398
      single_reg:
415
	lods	byte [esi]
399
	lods	byte [esi]
416
	call	convert_register
400
	call	convert_register
417
	mov	bl,al
401
	mov	bl,al
418
	mov	al,ah
402
	mov	al,ah
419
	cmp	al,1
403
	cmp	al,1
420
	je	single_reg_8bit
404
	je	single_reg_8bit
421
	call	operand_autodetect
405
	call	operand_autodetect
422
	inc	[base_code]
406
	inc	[base_code]
423
      single_reg_8bit:
407
      single_reg_8bit:
424
	call	store_nomem_instruction
408
	jmp	nomem_instruction_ready
425
	jmp	instruction_assembled
-
 
426
mov_instruction:
409
mov_instruction:
427
	mov	[base_code],88h
410
	mov	[base_code],88h
428
	lods	byte [esi]
411
	lods	byte [esi]
429
	call	get_size_operator
412
	call	get_size_operator
430
	cmp	al,10h
413
	cmp	al,10h
431
	je	mov_reg
414
	je	mov_reg
Line 461... Line 444...
461
	or	al,bl
444
	or	al,bl
462
	or	al,bh
445
	or	al,bh
463
	jz	mov_mem_ax
446
	jz	mov_mem_ax
464
	inc	[base_code]
447
	inc	[base_code]
465
	call	store_instruction
448
	jmp	instruction_ready
466
	jmp	instruction_assembled
-
 
467
      mov_mem_reg_8bit:
449
      mov_mem_reg_8bit:
468
	or	al,bl
450
	or	al,bl
469
	or	al,bh
451
	or	al,bh
470
	jz	mov_mem_al
452
	jnz	instruction_ready
471
	call	store_instruction
-
 
472
	jmp	instruction_assembled
-
 
473
      mov_mem_al:
453
      mov_mem_al:
474
	test	ch,22h
454
	test	ch,22h
475
	jnz	mov_mem_address16_al
455
	jnz	mov_mem_address16_al
476
	test	ch,44h
456
	test	ch,44h
477
	jnz	mov_mem_address32_al
457
	jnz	mov_mem_address32_al
478
	test	ch,88h
458
	test	ch,88h
Line 552... Line 532...
552
	cmp	ah,2
532
	cmp	ah,2
553
	jne	invalid_operand_size
533
	jne	invalid_operand_size
554
      mov_mem_sreg_store:
534
      mov_mem_sreg_store:
555
	mov	[base_code],8Ch
535
	mov	[base_code],8Ch
556
	call	store_instruction
536
	jmp	instruction_ready
557
	jmp	instruction_assembled
-
 
558
      mov_mem_imm:
537
      mov_mem_imm:
559
	mov	al,[operand_size]
538
	mov	al,[operand_size]
560
	cmp	al,1
539
	cmp	al,1
561
	je	mov_mem_imm_8bit
540
	jb	mov_mem_imm_nosize
-
 
541
	je	mov_mem_imm_8bit
562
	cmp	al,2
542
	cmp	al,2
563
	je	mov_mem_imm_16bit
543
	je	mov_mem_imm_16bit
564
	cmp	al,4
544
	cmp	al,4
565
	je	mov_mem_imm_32bit
545
	je	mov_mem_imm_32bit
566
	cmp	al,8
546
	cmp	al,8
567
	je	mov_mem_imm_64bit
547
	jne	invalid_operand_size
-
 
548
      mov_mem_imm_64bit:
568
	or	al,al
549
	cmp	[size_declared],0
569
	jnz	invalid_operand_size
550
	jne	long_immediate_not_encodable
570
	cmp	[error_line],0
551
	call	operand_64bit
571
	jne	mov_mem_imm_32bit
552
	call	get_simm32
572
	mov	eax,[current_line]
553
	cmp	[value_type],4
573
	mov	[error_line],eax
-
 
574
	mov	[error],operand_size_not_specified
554
	jae	long_immediate_not_encodable
575
	jmp	mov_mem_imm_32bit
555
	jmp	mov_mem_imm_32bit_store
576
      mov_mem_imm_8bit:
556
      mov_mem_imm_8bit:
577
	call	get_byte_value
557
	call	get_byte_value
578
	mov	byte [value],al
558
	mov	byte [value],al
579
	mov	[postbyte_register],0
559
	mov	[postbyte_register],0
580
	mov	[base_code],0C6h
560
	mov	[base_code],0C6h
581
	pop	ecx ebx edx
561
	pop	ecx ebx edx
Line 589... Line 569...
589
	mov	[base_code],0C7h
569
	mov	[base_code],0C7h
590
	pop	ecx ebx edx
570
	pop	ecx ebx edx
591
	call	store_instruction_with_imm16
571
	call	store_instruction_with_imm16
592
	jmp	instruction_assembled
572
	jmp	instruction_assembled
593
      mov_mem_imm_32bit:
573
      mov_mem_imm_nosize:
-
 
574
	cmp	[error_line],0
-
 
575
	jne	mov_mem_imm_32bit
-
 
576
	mov	eax,[current_line]
-
 
577
	mov	[error_line],eax
-
 
578
	mov	[error],operand_size_not_specified
-
 
579
      mov_mem_imm_32bit:
594
	call	operand_32bit
580
	call	operand_32bit
595
	call	get_dword_value
581
	call	get_dword_value
596
      mov_mem_imm_32bit_store:
582
      mov_mem_imm_32bit_store:
597
	mov	dword [value],eax
583
	mov	dword [value],eax
598
	mov	[postbyte_register],0
584
	mov	[postbyte_register],0
599
	mov	[base_code],0C7h
585
	mov	[base_code],0C7h
600
	pop	ecx ebx edx
586
	pop	ecx ebx edx
601
	call	store_instruction_with_imm32
587
	call	store_instruction_with_imm32
602
	jmp	instruction_assembled
588
	jmp	instruction_assembled
603
      mov_mem_imm_64bit:
589
      mov_reg:
604
	cmp	[size_declared],0
-
 
605
	jne	long_immediate_not_encodable
-
 
606
	call	operand_64bit
-
 
607
	call	get_simm32
-
 
608
	cmp	[value_type],4
-
 
609
	jae	long_immediate_not_encodable
-
 
610
	jmp	mov_mem_imm_32bit_store
-
 
611
      mov_reg:
-
 
612
	lods	byte [esi]
590
	lods	byte [esi]
613
	mov	ah,al
591
	mov	ah,al
614
	sub	ah,10h
592
	sub	ah,10h
615
	and	ah,al
593
	and	ah,al
616
	test	ah,0F0h
594
	test	ah,0F0h
Line 643... Line 621...
643
	je	mov_reg_reg_8bit
621
	je	mov_reg_reg_8bit
644
	call	operand_autodetect
622
	call	operand_autodetect
645
	inc	[base_code]
623
	inc	[base_code]
646
      mov_reg_reg_8bit:
624
      mov_reg_reg_8bit:
647
	call	store_nomem_instruction
625
	jmp	nomem_instruction_ready
648
	jmp	instruction_assembled
-
 
649
      mov_reg_sreg:
626
      mov_reg_sreg:
650
	mov	bl,[postbyte_register]
627
	mov	bl,[postbyte_register]
651
	mov	ah,al
628
	mov	ah,al
652
	and	al,1111b
629
	and	al,1111b
653
	mov	[postbyte_register],al
630
	mov	[postbyte_register],al
654
	shr	ah,4
631
	shr	ah,4
Line 672... Line 649...
672
      mov_reg_sreg32:
649
      mov_reg_sreg32:
673
	call	operand_32bit
650
	call	operand_32bit
674
      mov_reg_sreg_store:
651
      mov_reg_sreg_store:
675
	mov	[base_code],8Ch
652
	mov	[base_code],8Ch
676
	call	store_nomem_instruction
653
	jmp	nomem_instruction_ready
677
	jmp	instruction_assembled
-
 
678
      mov_reg_treg:
654
      mov_reg_treg:
679
	cmp	ah,9
655
	cmp	ah,9
680
	jne	invalid_operand
656
	jne	invalid_operand
681
	mov	[extended_code],24h
657
	mov	[extended_code],24h
682
	jmp	mov_reg_xrx
658
	jmp	mov_reg_xrx
683
      mov_reg_dreg:
659
      mov_reg_dreg:
Line 698... Line 674...
698
	mov	al,0F0h
674
	mov	al,0F0h
699
	stos	byte [edi]
675
	stos	byte [edi]
700
	mov	[postbyte_register],0
676
	mov	[postbyte_register],0
701
      mov_reg_xrx_store:
677
      mov_reg_xrx_store:
702
	call	store_nomem_instruction
678
	jmp	nomem_instruction_ready
703
	jmp	instruction_assembled
-
 
704
      mov_reg_xrx_64bit:
679
      mov_reg_xrx_64bit:
705
	cmp	[operand_size],8
680
	cmp	[operand_size],8
706
	jne	invalid_operand_size
681
	jne	invalid_operand_size
707
	call	store_nomem_instruction
682
	jmp	nomem_instruction_ready
708
	jmp	instruction_assembled
-
 
709
      mov_reg_mem:
683
      mov_reg_mem:
710
	call	get_address
684
	call	get_address
711
	mov	al,[operand_size]
685
	mov	al,[operand_size]
712
	cmp	al,1
686
	cmp	al,1
713
	je	mov_reg_mem_8bit
687
	je	mov_reg_mem_8bit
714
	call	operand_autodetect
688
	call	operand_autodetect
Line 716... Line 690...
716
	or	al,bl
690
	or	al,bl
717
	or	al,bh
691
	or	al,bh
718
	jz	mov_ax_mem
692
	jz	mov_ax_mem
719
	add	[base_code],3
693
	add	[base_code],3
720
	call	store_instruction
694
	jmp	instruction_ready
721
	jmp	instruction_assembled
-
 
722
      mov_reg_mem_8bit:
695
      mov_reg_mem_8bit:
723
	mov	al,[postbyte_register]
696
	mov	al,[postbyte_register]
724
	or	al,bl
697
	or	al,bl
725
	or	al,bh
698
	or	al,bh
726
	jz	mov_al_mem
699
	jz	mov_al_mem
727
	add	[base_code],2
700
	add	[base_code],2
728
	call	store_instruction
701
	jmp	instruction_ready
729
	jmp	instruction_assembled
-
 
730
      mov_al_mem:
702
      mov_al_mem:
731
	test	ch,22h
703
	test	ch,22h
732
	jnz	mov_al_mem_address16
704
	jnz	mov_al_mem_address16
733
	test	ch,44h
705
	test	ch,44h
734
	jnz	mov_al_mem_address32
706
	jnz	mov_al_mem_address32
735
	test	ch,88h
707
	test	ch,88h
Line 793... Line 765...
793
	je	mov_reg_imm_16bit
765
	je	mov_reg_imm_16bit
794
	cmp	al,4
766
	cmp	al,4
795
	je	mov_reg_imm_32bit
767
	je	mov_reg_imm_32bit
796
	cmp	al,8
768
	cmp	al,8
797
	je	mov_reg_imm_64bit
769
	jne	invalid_operand_size
-
 
770
      mov_reg_imm_64bit:
798
	or	al,al
771
	call	operand_64bit
-
 
772
	call	get_qword_value
-
 
773
	mov	ecx,edx
799
	jnz	invalid_operand_size
774
	cmp	[size_declared],0
-
 
775
	jne	mov_reg_imm_64bit_store
800
	cmp	[error_line],0
776
	cmp	[value_type],4
801
	jne	mov_reg_imm_32bit
777
	jae	mov_reg_imm_64bit_store
-
 
778
	cdq
-
 
779
	cmp	ecx,edx
-
 
780
	je	mov_reg_64bit_imm_32bit
802
	mov	eax,[current_line]
781
      mov_reg_imm_64bit_store:
803
	mov	[error_line],eax
782
	push	eax ecx
-
 
783
	mov	al,0B8h
804
	mov	[error],operand_size_not_specified
784
	call	store_mov_reg_imm_code
805
	jmp	mov_reg_imm_32bit
785
	pop	edx eax
-
 
786
	call	mark_relocation
-
 
787
	stos	dword [edi]
-
 
788
	mov	eax,edx
-
 
789
	stos	dword [edi]
-
 
790
	jmp	instruction_assembled
806
      mov_reg_imm_8bit:
791
      mov_reg_imm_8bit:
807
	call	get_byte_value
792
	call	get_byte_value
808
	mov	dl,al
793
	mov	dl,al
809
	mov	al,0B0h
794
	mov	al,0B0h
810
	call	store_mov_reg_imm_code
795
	call	store_mov_reg_imm_code
811
	mov	al,dl
796
	mov	al,dl
Line 826... Line 811...
826
	call	get_dword_value
811
	call	get_dword_value
827
	mov	edx,eax
812
	mov	edx,eax
828
	mov	al,0B8h
813
	mov	al,0B8h
829
	call	store_mov_reg_imm_code
814
	call	store_mov_reg_imm_code
830
	mov	eax,edx
815
      mov_store_imm_32bit:
-
 
816
	mov	eax,edx
831
	call	mark_relocation
817
	call	mark_relocation
832
	stos	dword [edi]
818
	stos	dword [edi]
833
	jmp	instruction_assembled
819
	jmp	instruction_assembled
834
      mov_reg_imm_64bit:
820
      store_mov_reg_imm_code:
835
	call	operand_64bit
-
 
836
	call	get_qword_value
-
 
837
	mov	ecx,edx
-
 
838
	cmp	[size_declared],0
-
 
839
	jne	mov_reg_imm_64bit_store
-
 
840
	cmp	[value_type],4
-
 
841
	jae	mov_reg_imm_64bit_store
-
 
842
	cdq
-
 
843
	cmp	ecx,edx
-
 
844
	je	mov_reg_64bit_imm_32bit
-
 
845
      mov_reg_imm_64bit_store:
-
 
846
	push	eax ecx
-
 
847
	mov	al,0B8h
-
 
848
	call	store_mov_reg_imm_code
-
 
849
	pop	edx eax
-
 
850
	call	mark_relocation
-
 
851
	stos	dword [edi]
-
 
852
	mov	eax,edx
-
 
853
	stos	dword [edi]
-
 
854
	jmp	instruction_assembled
-
 
855
      store_mov_reg_imm_code:
-
 
856
	mov	ah,[postbyte_register]
821
	mov	ah,[postbyte_register]
857
	test	ah,1000b
822
	test	ah,1000b
858
	jz	mov_reg_imm_prefix_ok
823
	jz	mov_reg_imm_prefix_ok
859
	or	[rex_prefix],41h
824
	or	[rex_prefix],41h
860
      mov_reg_imm_prefix_ok:
825
      mov_reg_imm_prefix_ok:
Line 868... Line 833...
868
	mov	bl,[postbyte_register]
833
	mov	bl,[postbyte_register]
869
	mov	[postbyte_register],0
834
	mov	[postbyte_register],0
870
	mov	[base_code],0C7h
835
	mov	[base_code],0C7h
871
	call	store_nomem_instruction
836
	call	store_nomem_instruction
872
	mov	eax,edx
837
	jmp	mov_store_imm_32bit
873
	call	mark_relocation
-
 
874
	stos	dword [edi]
-
 
875
	jmp	instruction_assembled
-
 
876
      mov_sreg:
838
      mov_sreg:
877
	mov	ah,al
839
	mov	ah,al
878
	and	al,1111b
840
	and	al,1111b
879
	mov	[postbyte_register],al
841
	mov	[postbyte_register],al
880
	shr	ah,4
842
	shr	ah,4
881
	cmp	ah,5
843
	cmp	ah,5
Line 904... Line 866...
904
	jne	invalid_operand_size
866
	jne	invalid_operand_size
905
	mov	bl,al
867
	mov	bl,al
906
      mov_sreg_reg_size_ok:
868
      mov_sreg_reg_size_ok:
907
	mov	[base_code],8Eh
869
	mov	[base_code],8Eh
908
	call	store_nomem_instruction
870
	jmp	nomem_instruction_ready
909
	jmp	instruction_assembled
-
 
910
      mov_sreg_mem:
871
      mov_sreg_mem:
911
	call	get_address
872
	call	get_address
912
	mov	al,[operand_size]
873
	mov	al,[operand_size]
913
	or	al,al
874
	or	al,al
914
	jz	mov_sreg_mem_size_ok
875
	jz	mov_sreg_mem_size_ok
915
	cmp	al,2
876
	cmp	al,2
916
	jne	invalid_operand_size
877
	jne	invalid_operand_size
917
      mov_sreg_mem_size_ok:
878
      mov_sreg_mem_size_ok:
918
	mov	[base_code],8Eh
879
	mov	[base_code],8Eh
919
	call	store_instruction
880
	jmp	instruction_ready
920
	jmp	instruction_assembled
-
 
921
      mov_treg:
881
      mov_treg:
922
	cmp	ah,9
882
	cmp	ah,9
923
	jne	invalid_operand
883
	jne	invalid_operand
924
	mov	[extended_code],26h
884
	mov	[extended_code],26h
925
	jmp	mov_xrx
885
	jmp	mov_xrx
926
      mov_dreg:
886
      mov_dreg:
Line 950... Line 910...
950
	mov	al,0F0h
910
	mov	al,0F0h
951
	stos	byte [edi]
911
	stos	byte [edi]
952
	mov	[postbyte_register],0
912
	mov	[postbyte_register],0
953
      mov_xrx_store:
913
      mov_xrx_store:
954
	call	store_nomem_instruction
914
	jmp	nomem_instruction_ready
955
	jmp	instruction_assembled
-
 
956
      mov_xrx_64bit:
915
      mov_xrx_64bit:
957
	cmp	ah,8
916
	cmp	ah,8
958
	jne	invalid_operand_size
917
	je	mov_xrx_store
959
	call	store_nomem_instruction
918
	jmp	invalid_operand_size
960
	jmp	instruction_assembled
-
 
961
cmov_instruction:
919
cmov_instruction:
962
	mov	[base_code],0Fh
920
	mov	[base_code],0Fh
963
	mov	[extended_code],al
921
	mov	[extended_code],al
964
	lods	byte [esi]
922
	lods	byte [esi]
965
	call	get_size_operator
923
	call	get_size_operator
966
	cmp	al,10h
924
	cmp	al,10h
Line 982... Line 940...
982
	call	convert_register
940
	call	convert_register
983
	mov	bl,al
941
	mov	bl,al
984
	mov	al,ah
942
	mov	al,ah
985
	call	operand_autodetect
943
	call	operand_autodetect
986
	call	store_nomem_instruction
944
	jmp	nomem_instruction_ready
987
	jmp	instruction_assembled
-
 
988
      cmov_reg_mem:
945
      cmov_reg_mem:
989
	call	get_address
946
	call	get_address
990
	mov	al,[operand_size]
947
	mov	al,[operand_size]
991
	call	operand_autodetect
948
	call	operand_autodetect
992
	call	store_instruction
949
	jmp	instruction_ready
993
	jmp	instruction_assembled
-
 
994
test_instruction:
950
test_instruction:
995
	mov	[base_code],84h
951
	mov	[base_code],84h
996
	lods	byte [esi]
952
	lods	byte [esi]
997
	call	get_size_operator
953
	call	get_size_operator
998
	cmp	al,10h
954
	cmp	al,10h
999
	je	test_reg
955
	je	test_reg
Line 1021... Line 977...
1021
	je	test_mem_reg_8bit
977
	je	test_mem_reg_8bit
1022
	call	operand_autodetect
978
	call	operand_autodetect
1023
	inc	[base_code]
979
	inc	[base_code]
1024
      test_mem_reg_8bit:
980
      test_mem_reg_8bit:
1025
	call	store_instruction
981
	jmp	instruction_ready
1026
	jmp	instruction_assembled
-
 
1027
      test_mem_imm:
982
      test_mem_imm:
1028
	mov	al,[operand_size]
983
	mov	al,[operand_size]
1029
	cmp	al,1
984
	cmp	al,1
1030
	je	test_mem_imm_8bit
985
	jb	test_mem_imm_nosize
-
 
986
	je	test_mem_imm_8bit
1031
	cmp	al,2
987
	cmp	al,2
1032
	je	test_mem_imm_16bit
988
	je	test_mem_imm_16bit
1033
	cmp	al,4
989
	cmp	al,4
1034
	je	test_mem_imm_32bit
990
	je	test_mem_imm_32bit
1035
	cmp	al,8
991
	cmp	al,8
1036
	je	test_mem_imm_64bit
992
	jne	invalid_operand_size
-
 
993
      test_mem_imm_64bit:
1037
	or	al,al
994
	cmp	[size_declared],0
1038
	jnz	invalid_operand_size
995
	jne	long_immediate_not_encodable
1039
	cmp	[error_line],0
996
	call	operand_64bit
1040
	jne	test_mem_imm_32bit
997
	call	get_simm32
1041
	mov	eax,[current_line]
998
	cmp	[value_type],4
1042
	mov	[error_line],eax
-
 
1043
	mov	[error],operand_size_not_specified
999
	jae	long_immediate_not_encodable
1044
	jmp	test_mem_imm_32bit
1000
	jmp	test_mem_imm_32bit_store
1045
      test_mem_imm_8bit:
1001
      test_mem_imm_8bit:
1046
	call	get_byte_value
1002
	call	get_byte_value
1047
	mov	byte [value],al
1003
	mov	byte [value],al
1048
	mov	[postbyte_register],0
1004
	mov	[postbyte_register],0
1049
	mov	[base_code],0F6h
1005
	mov	[base_code],0F6h
1050
	pop	ecx ebx edx
1006
	pop	ecx ebx edx
Line 1058... Line 1014...
1058
	mov	[base_code],0F7h
1014
	mov	[base_code],0F7h
1059
	pop	ecx ebx edx
1015
	pop	ecx ebx edx
1060
	call	store_instruction_with_imm16
1016
	call	store_instruction_with_imm16
1061
	jmp	instruction_assembled
1017
	jmp	instruction_assembled
1062
      test_mem_imm_32bit:
1018
      test_mem_imm_nosize:
-
 
1019
	cmp	[error_line],0
-
 
1020
	jne	test_mem_imm_32bit
-
 
1021
	mov	eax,[current_line]
-
 
1022
	mov	[error_line],eax
-
 
1023
	mov	[error],operand_size_not_specified
-
 
1024
      test_mem_imm_32bit:
1063
	call	operand_32bit
1025
	call	operand_32bit
1064
	call	get_dword_value
1026
	call	get_dword_value
1065
      test_mem_imm_32bit_store:
1027
      test_mem_imm_32bit_store:
1066
	mov	dword [value],eax
1028
	mov	dword [value],eax
1067
	mov	[postbyte_register],0
1029
	mov	[postbyte_register],0
1068
	mov	[base_code],0F7h
1030
	mov	[base_code],0F7h
1069
	pop	ecx ebx edx
1031
	pop	ecx ebx edx
1070
	call	store_instruction_with_imm32
1032
	call	store_instruction_with_imm32
1071
	jmp	instruction_assembled
1033
	jmp	instruction_assembled
1072
      test_mem_imm_64bit:
1034
      test_reg:
1073
	cmp	[size_declared],0
-
 
1074
	jne	long_immediate_not_encodable
-
 
1075
	call	operand_64bit
-
 
1076
	call	get_simm32
-
 
1077
	cmp	[value_type],4
-
 
1078
	jae	long_immediate_not_encodable
-
 
1079
	jmp	test_mem_imm_32bit_store
-
 
1080
      test_reg:
-
 
1081
	lods	byte [esi]
1035
	lods	byte [esi]
1082
	call	convert_register
1036
	call	convert_register
1083
	mov	[postbyte_register],al
1037
	mov	[postbyte_register],al
1084
	lods	byte [esi]
1038
	lods	byte [esi]
1085
	cmp	al,','
1039
	cmp	al,','
Line 1102... Line 1056...
1102
	je	test_reg_reg_8bit
1056
	je	test_reg_reg_8bit
1103
	call	operand_autodetect
1057
	call	operand_autodetect
1104
	inc	[base_code]
1058
	inc	[base_code]
1105
      test_reg_reg_8bit:
1059
      test_reg_reg_8bit:
1106
	call	store_nomem_instruction
1060
	jmp	nomem_instruction_ready
1107
	jmp	instruction_assembled
-
 
1108
      test_reg_imm:
1061
      test_reg_imm:
1109
	mov	al,[operand_size]
1062
	mov	al,[operand_size]
1110
	cmp	al,1
1063
	cmp	al,1
1111
	je	test_reg_imm_8bit
1064
	je	test_reg_imm_8bit
1112
	cmp	al,2
1065
	cmp	al,2
1113
	je	test_reg_imm_16bit
1066
	je	test_reg_imm_16bit
1114
	cmp	al,4
1067
	cmp	al,4
1115
	je	test_reg_imm_32bit
1068
	je	test_reg_imm_32bit
1116
	cmp	al,8
1069
	cmp	al,8
1117
	je	test_reg_imm_64bit
1070
	jne	invalid_operand_size
-
 
1071
      test_reg_imm_64bit:
1118
	jmp	invalid_operand_size
1072
	cmp	[size_declared],0
-
 
1073
	jne	long_immediate_not_encodable
-
 
1074
	call	operand_64bit
1119
      test_reg_imm_8bit:
1075
	call	get_simm32
-
 
1076
	cmp	[value_type],4
-
 
1077
	jae	long_immediate_not_encodable
-
 
1078
	jmp	test_reg_imm_32bit_store
-
 
1079
      test_reg_imm_8bit:
1120
	call	get_byte_value
1080
	call	get_byte_value
1121
	mov	dl,al
1081
	mov	dl,al
1122
	mov	bl,[postbyte_register]
1082
	mov	bl,[postbyte_register]
1123
	mov	[postbyte_register],0
1083
	mov	[postbyte_register],0
1124
	mov	[base_code],0F6h
1084
	mov	[base_code],0F6h
Line 1174... Line 1134...
1174
	call	store_instruction_code
1134
	call	store_instruction_code
1175
	mov	eax,edx
1135
	mov	eax,edx
1176
	stos	dword [edi]
1136
	stos	dword [edi]
1177
	jmp	instruction_assembled
1137
	jmp	instruction_assembled
1178
      test_reg_imm_64bit:
1138
      test_reg_mem:
1179
	cmp	[size_declared],0
-
 
1180
	jne	long_immediate_not_encodable
-
 
1181
	call	operand_64bit
-
 
1182
	call	get_simm32
-
 
1183
	cmp	[value_type],4
-
 
1184
	jae	long_immediate_not_encodable
-
 
1185
	jmp	test_reg_imm_32bit_store
-
 
1186
      test_reg_mem:
-
 
1187
	call	get_address
1139
	call	get_address
1188
	mov	al,[operand_size]
1140
	mov	al,[operand_size]
1189
	cmp	al,1
1141
	cmp	al,1
1190
	je	test_reg_mem_8bit
1142
	je	test_reg_mem_8bit
1191
	call	operand_autodetect
1143
	call	operand_autodetect
1192
	inc	[base_code]
1144
	inc	[base_code]
1193
      test_reg_mem_8bit:
1145
      test_reg_mem_8bit:
1194
	call	store_instruction
1146
	jmp	instruction_ready
1195
	jmp	instruction_assembled
-
 
1196
xchg_instruction:
1147
xchg_instruction:
1197
	mov	[base_code],86h
1148
	mov	[base_code],86h
1198
	lods	byte [esi]
1149
	lods	byte [esi]
1199
	call	get_size_operator
1150
	call	get_size_operator
1200
	cmp	al,10h
1151
	cmp	al,10h
1201
	je	xchg_reg
1152
	je	xchg_reg
Line 1257... Line 1208...
1257
	jmp	instruction_assembled
1208
	jmp	instruction_assembled
1258
      xchg_reg_reg_store:
1209
      xchg_reg_reg_store:
1259
	inc	[base_code]
1210
	inc	[base_code]
1260
      xchg_reg_reg_8bit:
1211
      xchg_reg_reg_8bit:
1261
	call	store_nomem_instruction
1212
	jmp	nomem_instruction_ready
1262
	jmp	instruction_assembled
-
 
1263
push_instruction:
1213
push_instruction:
1264
	mov	[push_size],al
1214
	mov	[push_size],al
1265
      push_next:
1215
      push_next:
1266
	lods	byte [esi]
1216
	lods	byte [esi]
1267
	call	get_size_operator
1217
	call	get_size_operator
1268
	cmp	al,10h
1218
	cmp	al,10h
Line 1732... Line 1682...
1732
	call	operand_autodetect
1682
	call	operand_autodetect
1733
	mov	al,0FFh
1683
	mov	al,0FFh
1734
	xchg	al,[base_code]
1684
	xchg	al,[base_code]
1735
	mov	[postbyte_register],al
1685
	mov	[postbyte_register],al
1736
	call	store_instruction
1686
	jmp	instruction_ready
1737
	jmp	instruction_assembled
-
 
1738
      inc_mem_nosize:
1687
      inc_mem_nosize:
1739
	cmp	[error_line],0
1688
	cmp	[error_line],0
1740
	jne	inc_mem_8bit
1689
	jne	inc_mem_8bit
1741
	mov	eax,[current_line]
1690
	mov	eax,[current_line]
1742
	mov	[error_line],eax
1691
	mov	[error_line],eax
1743
	mov	[error],operand_size_not_specified
1692
	mov	[error],operand_size_not_specified
1744
      inc_mem_8bit:
1693
      inc_mem_8bit:
1745
	mov	al,0FEh
1694
	mov	al,0FEh
1746
	xchg	al,[base_code]
1695
	xchg	al,[base_code]
1747
	mov	[postbyte_register],al
1696
	mov	[postbyte_register],al
1748
	call	store_instruction
1697
	jmp	instruction_ready
1749
	jmp	instruction_assembled
-
 
1750
      inc_reg:
1698
      inc_reg:
1751
	lods	byte [esi]
1699
	lods	byte [esi]
1752
	call	convert_register
1700
	call	convert_register
1753
	mov	bl,al
1701
	mov	bl,al
1754
	mov	al,0FEh
1702
	mov	al,0FEh
1755
	xchg	al,[base_code]
1703
	xchg	al,[base_code]
Line 1769... Line 1717...
1769
	jmp	instruction_assembled
1717
	jmp	instruction_assembled
1770
      inc_reg_long_form:
1718
      inc_reg_long_form:
1771
	inc	[base_code]
1719
	inc	[base_code]
1772
      inc_reg_8bit:
1720
      inc_reg_8bit:
1773
	call	store_nomem_instruction
1721
	jmp	nomem_instruction_ready
1774
	jmp	instruction_assembled
-
 
1775
set_instruction:
1722
set_instruction:
1776
	mov	[base_code],0Fh
1723
	mov	[base_code],0Fh
1777
	mov	[extended_code],al
1724
	mov	[extended_code],al
1778
	lods	byte [esi]
1725
	lods	byte [esi]
1779
	call	get_size_operator
1726
	call	get_size_operator
1780
	cmp	al,10h
1727
	cmp	al,10h
Line 1785... Line 1732...
1785
	call	get_address
1732
	call	get_address
1786
	cmp	[operand_size],1
1733
	cmp	[operand_size],1
1787
	ja	invalid_operand_size
1734
	ja	invalid_operand_size
1788
	mov	[postbyte_register],0
1735
	mov	[postbyte_register],0
1789
	call	store_instruction
1736
	jmp	instruction_ready
1790
	jmp	instruction_assembled
-
 
1791
      set_reg:
1737
      set_reg:
1792
	lods	byte [esi]
1738
	lods	byte [esi]
1793
	call	convert_register
1739
	call	convert_register
1794
	cmp	ah,1
1740
	cmp	ah,1
1795
	jne	invalid_operand_size
1741
	jne	invalid_operand_size
1796
	mov	bl,al
1742
	mov	bl,al
1797
	mov	[postbyte_register],0
1743
	mov	[postbyte_register],0
1798
	call	store_nomem_instruction
1744
	jmp	nomem_instruction_ready
1799
	jmp	instruction_assembled
-
 
1800
arpl_instruction:
1745
arpl_instruction:
1801
	cmp	[code_type],64
1746
	cmp	[code_type],64
1802
	je	illegal_instruction
1747
	je	illegal_instruction
1803
	mov	[base_code],63h
1748
	mov	[base_code],63h
1804
	lods	byte [esi]
1749
	lods	byte [esi]
1805
	call	get_size_operator
1750
	call	get_size_operator
Line 1818... Line 1763...
1818
	call	convert_register
1763
	call	convert_register
1819
	mov	[postbyte_register],al
1764
	mov	[postbyte_register],al
1820
	cmp	ah,2
1765
	cmp	ah,2
1821
	jne	invalid_operand_size
1766
	jne	invalid_operand_size
1822
	call	store_instruction
1767
	jmp	instruction_ready
1823
	jmp	instruction_assembled
-
 
1824
      arpl_reg:
1768
      arpl_reg:
1825
	lods	byte [esi]
1769
	lods	byte [esi]
1826
	call	convert_register
1770
	call	convert_register
1827
	cmp	ah,2
1771
	cmp	ah,2
1828
	jne	invalid_operand_size
1772
	jne	invalid_operand_size
1829
	mov	bl,al
1773
	mov	bl,al
Line 1834... Line 1778...
1834
	cmp	al,10h
1778
	cmp	al,10h
1835
	jne	invalid_operand
1779
	jne	invalid_operand
1836
	lods	byte [esi]
1780
	lods	byte [esi]
1837
	call	convert_register
1781
	call	convert_register
1838
	cmp	ah,2
1782
	mov	[postbyte_register],al
1839
	jne	invalid_operand_size
-
 
1840
	mov	[postbyte_register],al
-
 
1841
	call	store_nomem_instruction
1783
	jmp	nomem_instruction_ready
1842
	jmp	instruction_assembled
-
 
1843
bound_instruction:
1784
bound_instruction:
1844
	cmp	[code_type],64
1785
	cmp	[code_type],64
1845
	je	illegal_instruction
1786
	je	illegal_instruction
1846
	lods	byte [esi]
1787
	lods	byte [esi]
1847
	call	get_size_operator
1788
	call	get_size_operator
1848
	cmp	al,10h
1789
	cmp	al,10h
Line 1859... Line 1800...
1859
	jne	invalid_operand
1800
	jne	invalid_operand
1860
	call	get_address
1801
	call	get_address
1861
	mov	al,[operand_size]
1802
	mov	al,[operand_size]
1862
	cmp	al,2
1803
	cmp	al,2
1863
	je	bound_16bit
1804
	je	bound_store
1864
	cmp	al,4
1805
	cmp	al,4
1865
	je	bound_32bit
1806
	jne	invalid_operand_size
1866
	jmp	invalid_operand_size
-
 
1867
      bound_32bit:
1807
      bound_store:
1868
	call	operand_32bit
1808
	call	operand_autodetect
1869
	mov	[base_code],62h
1809
	mov	[base_code],62h
1870
	call	store_instruction
-
 
1871
	jmp	instruction_assembled
-
 
1872
      bound_16bit:
-
 
1873
	call	operand_16bit
-
 
1874
	mov	[base_code],62h
-
 
1875
	call	store_instruction
1810
	jmp	instruction_ready
1876
	jmp	instruction_assembled
-
 
1877
enter_instruction:
1811
enter_instruction:
1878
	lods	byte [esi]
1812
	lods	byte [esi]
1879
	call	get_size_operator
1813
	call	get_size_operator
1880
	cmp	ah,2
1814
	cmp	ah,2
1881
	je	enter_imm16_size_ok
1815
	je	enter_imm16_size_ok
1882
	or	ah,ah
1816
	or	ah,ah
Line 1993... Line 1927...
1993
	call	get_address
1927
	call	get_address
1994
	pop	eax
1928
	pop	eax
1995
	mov	[operand_size],al
1929
	mov	[operand_size],al
1996
	call	operand_autodetect
1930
	call	operand_autodetect
1997
	call	store_instruction
1931
	jmp	instruction_ready
1998
	jmp	instruction_assembled
-
 
1999
ls_instruction:
1932
ls_instruction:
2000
	or	al,al
1933
	or	al,al
2001
	jz	les_instruction
1934
	jz	les_instruction
2002
	cmp	al,3
1935
	cmp	al,3
2003
	jz	lds_instruction
1936
	jz	lds_instruction
2004
	add	al,0B0h
1937
	add	al,0B0h
Line 2039... Line 1972...
2039
	je	ls_64bit
1972
	je	ls_64bit
2040
	jmp	invalid_operand_size
1973
	jmp	invalid_operand_size
2041
      ls_16bit:
1974
      ls_16bit:
2042
	call	operand_16bit
1975
	call	operand_16bit
2043
	call	store_instruction
1976
	jmp	instruction_ready
2044
	jmp	instruction_assembled
-
 
2045
      ls_32bit:
1977
      ls_32bit:
2046
	call	operand_32bit
1978
	call	operand_32bit
2047
	call	store_instruction
1979
	jmp	instruction_ready
2048
	jmp	instruction_assembled
-
 
2049
      ls_64bit:
1980
      ls_64bit:
2050
	call	operand_64bit
1981
	call	operand_64bit
2051
	call	store_instruction
1982
	jmp	instruction_ready
2052
	jmp	instruction_assembled
-
 
2053
sh_instruction:
1983
sh_instruction:
2054
	mov	[postbyte_register],al
1984
	mov	[postbyte_register],al
2055
	lods	byte [esi]
1985
	lods	byte [esi]
2056
	call	get_size_operator
1986
	call	get_size_operator
2057
	cmp	al,10h
1987
	cmp	al,10h
2058
	je	sh_reg
1988
	je	sh_reg
Line 2082... Line 2012...
2082
	je	sh_mem_cl_8bit
2012
	je	sh_mem_cl_8bit
2083
	jb	sh_mem_cl_nosize
2013
	jb	sh_mem_cl_nosize
2084
	call	operand_autodetect
2014
	call	operand_autodetect
2085
	mov	[base_code],0D3h
2015
	mov	[base_code],0D3h
2086
	call	store_instruction
2016
	jmp	instruction_ready
2087
	jmp	instruction_assembled
-
 
2088
      sh_mem_cl_nosize:
2017
      sh_mem_cl_nosize:
2089
	cmp	[error_line],0
2018
	cmp	[error_line],0
2090
	jne	sh_mem_cl_8bit
2019
	jne	sh_mem_cl_8bit
2091
	mov	eax,[current_line]
2020
	mov	eax,[current_line]
2092
	mov	[error_line],eax
2021
	mov	[error_line],eax
2093
	mov	[error],operand_size_not_specified
2022
	mov	[error],operand_size_not_specified
2094
      sh_mem_cl_8bit:
2023
      sh_mem_cl_8bit:
2095
	mov	[base_code],0D2h
2024
	mov	[base_code],0D2h
2096
	call	store_instruction
2025
	jmp	instruction_ready
2097
	jmp	instruction_assembled
-
 
2098
      sh_mem_imm:
2026
      sh_mem_imm:
2099
	mov	al,[operand_size]
2027
	mov	al,[operand_size]
2100
	or	al,al
2028
	or	al,al
2101
	jz	sh_mem_imm_size_ok
2029
	jz	sh_mem_imm_size_ok
2102
	cmp	al,1
2030
	cmp	al,1
2103
	jne	invalid_operand_size
2031
	jne	invalid_operand_size
Line 2115... Line 2043...
2115
	call	store_instruction_with_imm8
2043
	call	store_instruction_with_imm8
2116
	jmp	instruction_assembled
2044
	jmp	instruction_assembled
2117
      sh_mem_1:
2045
      sh_mem_1:
2118
	mov	[base_code],0D1h
2046
	mov	[base_code],0D1h
2119
	call	store_instruction
2047
	jmp	instruction_ready
2120
	jmp	instruction_assembled
-
 
2121
      sh_mem_imm_nosize:
2048
      sh_mem_imm_nosize:
2122
	cmp	[error_line],0
2049
	cmp	[error_line],0
2123
	jne	sh_mem_imm_8bit
2050
	jne	sh_mem_imm_8bit
2124
	mov	eax,[current_line]
2051
	mov	eax,[current_line]
2125
	mov	[error_line],eax
2052
	mov	[error_line],eax
2126
	mov	[error],operand_size_not_specified
2053
	mov	[error],operand_size_not_specified
Line 2131... Line 2058...
2131
	call	store_instruction_with_imm8
2058
	call	store_instruction_with_imm8
2132
	jmp	instruction_assembled
2059
	jmp	instruction_assembled
2133
      sh_mem_1_8bit:
2060
      sh_mem_1_8bit:
2134
	mov	[base_code],0D0h
2061
	mov	[base_code],0D0h
2135
	call	store_instruction
2062
	jmp	instruction_ready
2136
	jmp	instruction_assembled
-
 
2137
      sh_reg:
2063
      sh_reg:
2138
	lods	byte [esi]
2064
	lods	byte [esi]
2139
	call	convert_register
2065
	call	convert_register
2140
	mov	bx,ax
2066
	mov	bx,ax
2141
	mov	[operand_size],0
2067
	mov	[operand_size],0
2142
	lods	byte [esi]
2068
	lods	byte [esi]
Line 2156... Line 2082...
2156
	cmp	al,1
2082
	cmp	al,1
2157
	je	sh_reg_cl_8bit
2083
	je	sh_reg_cl_8bit
2158
	call	operand_autodetect
2084
	call	operand_autodetect
2159
	mov	[base_code],0D3h
2085
	mov	[base_code],0D3h
2160
	call	store_nomem_instruction
2086
	jmp	nomem_instruction_ready
2161
	jmp	instruction_assembled
-
 
2162
      sh_reg_cl_8bit:
2087
      sh_reg_cl_8bit:
2163
	mov	[base_code],0D2h
2088
	mov	[base_code],0D2h
2164
	call	store_nomem_instruction
2089
	jmp	nomem_instruction_ready
2165
	jmp	instruction_assembled
-
 
2166
      sh_reg_imm:
2090
      sh_reg_imm:
2167
	mov	al,[operand_size]
2091
	mov	al,[operand_size]
2168
	or	al,al
2092
	or	al,al
2169
	jz	sh_reg_imm_size_ok
2093
	jz	sh_reg_imm_size_ok
2170
	cmp	al,1
2094
	cmp	al,1
2171
	jne	invalid_operand_size
2095
	jne	invalid_operand_size
Line 2186... Line 2110...
2186
	stos	byte [edi]
2110
	stos	byte [edi]
2187
	jmp	instruction_assembled
2111
	jmp	instruction_assembled
2188
      sh_reg_1:
2112
      sh_reg_1:
2189
	mov	[base_code],0D1h
2113
	mov	[base_code],0D1h
2190
	call	store_nomem_instruction
2114
	jmp	nomem_instruction_ready
2191
	jmp	instruction_assembled
-
 
2192
      sh_reg_imm_8bit:
2115
      sh_reg_imm_8bit:
2193
	cmp	dl,1
2116
	cmp	dl,1
2194
	je	sh_reg_1_8bit
2117
	je	sh_reg_1_8bit
2195
	mov	[base_code],0C0h
2118
	mov	[base_code],0C0h
2196
	call	store_nomem_instruction
2119
	call	store_nomem_instruction
2197
	mov	al,dl
2120
	mov	al,dl
2198
	stos	byte [edi]
2121
	stos	byte [edi]
2199
	jmp	instruction_assembled
2122
	jmp	instruction_assembled
2200
      sh_reg_1_8bit:
2123
      sh_reg_1_8bit:
2201
	mov	[base_code],0D0h
2124
	mov	[base_code],0D0h
2202
	call	store_nomem_instruction
2125
	jmp	nomem_instruction_ready
2203
	jmp	instruction_assembled
-
 
2204
shd_instruction:
2126
shd_instruction:
2205
	mov	[base_code],0Fh
2127
	mov	[base_code],0Fh
2206
	mov	[extended_code],al
2128
	mov	[extended_code],al
2207
	lods	byte [esi]
2129
	lods	byte [esi]
2208
	call	get_size_operator
2130
	call	get_size_operator
2209
	cmp	al,10h
2131
	cmp	al,10h
Line 2240... Line 2162...
2240
	jne	invalid_operand
2162
	jne	invalid_operand
2241
	pop	eax ecx ebx edx
2163
	pop	eax ecx ebx edx
2242
	call	operand_autodetect
2164
	call	operand_autodetect
2243
	inc	[extended_code]
2165
	inc	[extended_code]
2244
	call	store_instruction
2166
	jmp	instruction_ready
2245
	jmp	instruction_assembled
-
 
2246
      shd_mem_reg_imm:
2167
      shd_mem_reg_imm:
2247
	mov	al,[operand_size]
2168
	mov	al,[operand_size]
2248
	or	al,al
2169
	or	al,al
2249
	jz	shd_mem_reg_imm_size_ok
2170
	jz	shd_mem_reg_imm_size_ok
2250
	cmp	al,1
2171
	cmp	al,1
2251
	jne	invalid_operand_size
2172
	jne	invalid_operand_size
Line 2288... Line 2209...
2288
	jne	invalid_operand
2209
	jne	invalid_operand
2289
	pop	ebx eax
2210
	pop	ebx eax
2290
	call	operand_autodetect
2211
	call	operand_autodetect
2291
	inc	[extended_code]
2212
	inc	[extended_code]
2292
	call	store_nomem_instruction
2213
	jmp	nomem_instruction_ready
2293
	jmp	instruction_assembled
-
 
2294
      shd_reg_reg_imm:
2214
      shd_reg_reg_imm:
2295
	mov	al,[operand_size]
2215
	mov	al,[operand_size]
2296
	or	al,al
2216
	or	al,al
2297
	jz	shd_reg_reg_imm_size_ok
2217
	jz	shd_reg_reg_imm_size_ok
2298
	cmp	al,1
2218
	cmp	al,1
2299
	jne	invalid_operand_size
2219
	jne	invalid_operand_size
Line 2341... Line 2261...
2341
	jne	invalid_operand_size
2261
	jne	invalid_operand_size
2342
	inc	[extended_code]
2262
	inc	[extended_code]
2343
      movx_mem_store:
2263
      movx_mem_store:
2344
	call	operand_autodetect
2264
	call	operand_autodetect
2345
	call	store_instruction
2265
	jmp	instruction_ready
2346
	jmp	instruction_assembled
-
 
2347
      movx_unknown_size:
2266
      movx_unknown_size:
2348
	cmp	[error_line],0
2267
	cmp	[error_line],0
2349
	jne	movx_mem_store
2268
	jne	movx_mem_store
2350
	mov	eax,[current_line]
2269
	mov	eax,[current_line]
2351
	mov	[error_line],eax
2270
	mov	[error_line],eax
2352
	mov	[error],operand_size_not_specified
2271
	mov	[error],operand_size_not_specified
Line 2364... Line 2283...
2364
	je	movx_reg_16bit
2283
	je	movx_reg_16bit
2365
	jmp	invalid_operand_size
2284
	jmp	invalid_operand_size
2366
      movx_reg_8bit:
2285
      movx_reg_8bit:
2367
	call	operand_autodetect
2286
	call	operand_autodetect
2368
	call	store_nomem_instruction
2287
	jmp	nomem_instruction_ready
2369
	jmp	instruction_assembled
-
 
2370
      movx_reg_16bit:
2288
      movx_reg_16bit:
2371
	call	operand_autodetect
2289
	call	operand_autodetect
2372
	inc	[extended_code]
2290
	inc	[extended_code]
2373
	call	store_nomem_instruction
2291
	jmp	nomem_instruction_ready
2374
	jmp	instruction_assembled
-
 
2375
movsxd_instruction:
2292
movsxd_instruction:
2376
	mov	[base_code],al
2293
	mov	[base_code],al
2377
	lods	byte [esi]
2294
	lods	byte [esi]
2378
	call	get_size_operator
2295
	call	get_size_operator
2379
	cmp	al,10h
2296
	cmp	al,10h
2380
	jne	invalid_operand
2297
	jne	invalid_operand
Line 2399... Line 2316...
2399
	cmp	[operand_size],0
2316
	cmp	[operand_size],0
2400
	jne	invalid_operand_size
2317
	jne	invalid_operand_size
2401
      movsxd_mem_store:
2318
      movsxd_mem_store:
2402
	call	operand_64bit
2319
	call	operand_64bit
2403
	call	store_instruction
2320
	jmp	instruction_ready
2404
	jmp	instruction_assembled
-
 
2405
      movsxd_reg:
2321
      movsxd_reg:
2406
	lods	byte [esi]
2322
	lods	byte [esi]
2407
	call	convert_register
2323
	call	convert_register
2408
	cmp	ah,4
2324
	cmp	ah,4
2409
	jne	invalid_operand_size
2325
	jne	invalid_operand_size
2410
	mov	bl,al
2326
	mov	bl,al
2411
	call	operand_64bit
2327
	call	operand_64bit
2412
	call	store_nomem_instruction
2328
	jmp	nomem_instruction_ready
2413
	jmp	instruction_assembled
-
 
2414
bt_instruction:
2329
bt_instruction:
2415
	mov	[postbyte_register],al
2330
	mov	[postbyte_register],al
2416
	shl	al,3
2331
	shl	al,3
2417
	add	al,83h
2332
	add	al,83h
2418
	mov	[extended_code],al
2333
	mov	[extended_code],al
2419
	mov	[base_code],0Fh
2334
	mov	[base_code],0Fh
Line 2444... Line 2359...
2444
	mov	[postbyte_register],al
2359
	mov	[postbyte_register],al
2445
	pop	ecx ebx edx
2360
	pop	ecx ebx edx
2446
	mov	al,ah
2361
	mov	al,ah
2447
	call	operand_autodetect
2362
	call	operand_autodetect
2448
	call	store_instruction
2363
	jmp	instruction_ready
2449
	jmp	instruction_assembled
-
 
2450
      bt_mem_imm:
2364
      bt_mem_imm:
2451
	xor	al,al
2365
	xor	al,al
2452
	xchg	al,[operand_size]
2366
	xchg	al,[operand_size]
2453
	push	eax
2367
	push	eax
2454
	lods	byte [esi]
2368
	lods	byte [esi]
2455
	call	get_size_operator
2369
	call	get_size_operator
Line 2501... Line 2415...
2501
	call	convert_register
2415
	call	convert_register
2502
	mov	[postbyte_register],al
2416
	mov	[postbyte_register],al
2503
	mov	al,ah
2417
	mov	al,ah
2504
	call	operand_autodetect
2418
	call	operand_autodetect
2505
	call	store_nomem_instruction
2419
	jmp	nomem_instruction_ready
2506
	jmp	instruction_assembled
-
 
2507
      bt_reg_imm:
2420
      bt_reg_imm:
2508
	xor	al,al
2421
	xor	al,al
2509
	xchg	al,[operand_size]
2422
	xchg	al,[operand_size]
2510
	push	eax ebx
2423
	push	eax ebx
2511
	lods	byte [esi]
2424
	lods	byte [esi]
2512
	call	get_size_operator
2425
	call	get_size_operator
Line 2549... Line 2462...
2549
	jne	invalid_argument
2462
	jne	invalid_argument
2550
	call	get_address
2463
	call	get_address
2551
	mov	al,[operand_size]
2464
	mov	al,[operand_size]
2552
	call	operand_autodetect
2465
	call	operand_autodetect
2553
	call	store_instruction
2466
	jmp	instruction_ready
2554
	jmp	instruction_assembled
-
 
2555
      bs_reg_reg:
2467
      bs_reg_reg:
2556
	lods	byte [esi]
2468
	lods	byte [esi]
2557
	call	convert_register
2469
	call	convert_register
2558
	mov	bl,al
2470
	mov	bl,al
2559
	mov	al,ah
2471
	mov	al,ah
2560
	call	operand_autodetect
2472
	call	operand_autodetect
2561
	call	store_nomem_instruction
2473
	jmp	nomem_instruction_ready
2562
	jmp	instruction_assembled
-
 
2563
imul_instruction:
2474
imul_instruction:
2564
	mov	[base_code],0F6h
2475
	mov	[base_code],0F6h
2565
	mov	[postbyte_register],5
2476
	mov	[postbyte_register],5
2566
	lods	byte [esi]
2477
	lods	byte [esi]
2567
	call	get_size_operator
2478
	call	get_size_operator
2568
	cmp	al,10h
2479
	cmp	al,10h
Line 2576... Line 2487...
2576
	je	imul_mem_8bit
2487
	je	imul_mem_8bit
2577
	jb	imul_mem_nosize
2488
	jb	imul_mem_nosize
2578
	call	operand_autodetect
2489
	call	operand_autodetect
2579
	inc	[base_code]
2490
	inc	[base_code]
2580
	call	store_instruction
2491
	jmp	instruction_ready
2581
	jmp	instruction_assembled
-
 
2582
      imul_mem_nosize:
2492
      imul_mem_nosize:
2583
	cmp	[error_line],0
2493
	cmp	[error_line],0
2584
	jne	imul_mem_8bit
2494
	jne	imul_mem_8bit
2585
	mov	eax,[current_line]
2495
	mov	eax,[current_line]
2586
	mov	[error_line],eax
2496
	mov	[error_line],eax
2587
	mov	[error],operand_size_not_specified
2497
	mov	[error],operand_size_not_specified
2588
      imul_mem_8bit:
2498
      imul_mem_8bit:
2589
	call	store_instruction
2499
	jmp	instruction_ready
2590
	jmp	instruction_assembled
-
 
2591
      imul_reg:
2500
      imul_reg:
2592
	lods	byte [esi]
2501
	lods	byte [esi]
2593
	call	convert_register
2502
	call	convert_register
2594
	cmp	byte [esi],','
2503
	cmp	byte [esi],','
2595
	je	imul_reg_
2504
	je	imul_reg_
2596
	mov	bl,al
2505
	mov	bl,al
Line 2598... Line 2507...
2598
	cmp	al,1
2507
	cmp	al,1
2599
	je	imul_reg_8bit
2508
	je	imul_reg_8bit
2600
	call	operand_autodetect
2509
	call	operand_autodetect
2601
	inc	[base_code]
2510
	inc	[base_code]
2602
	call	store_nomem_instruction
2511
      imul_reg_8bit:
2603
	jmp	instruction_assembled
-
 
2604
      imul_reg_8bit:
-
 
2605
	call	store_nomem_instruction
2512
	jmp	nomem_instruction_ready
2606
	jmp	instruction_assembled
-
 
2607
      imul_reg_:
2513
      imul_reg_:
2608
	mov	[postbyte_register],al
2514
	mov	[postbyte_register],al
2609
	inc	esi
2515
	inc	esi
2610
	cmp	byte [esi],'('
2516
	cmp	byte [esi],'('
2611
	je	imul_reg_imm
2517
	je	imul_reg_imm
2612
	cmp	byte [esi],11h
2518
	cmp	byte [esi],11h
Line 2629... Line 2535...
2629
	call	operand_autodetect
2535
	call	operand_autodetect
2630
	pop	ecx ebx edx
2536
	pop	ecx ebx edx
2631
	mov	[base_code],0Fh
2537
	mov	[base_code],0Fh
2632
	mov	[extended_code],0AFh
2538
	mov	[extended_code],0AFh
2633
	call	store_instruction
2539
	jmp	instruction_ready
2634
	jmp	instruction_assembled
-
 
2635
      imul_reg_mem_imm:
2540
      imul_reg_mem_imm:
2636
	inc	esi
2541
	inc	esi
2637
	lods	byte [esi]
2542
	lods	byte [esi]
2638
	call	get_size_operator
2543
	call	get_size_operator
2639
	cmp	al,'('
2544
	cmp	al,'('
2640
	jne	invalid_operand
2545
	jne	invalid_operand
Line 2643... Line 2548...
2643
	je	imul_reg_mem_imm_16bit
2548
	je	imul_reg_mem_imm_16bit
2644
	cmp	al,4
2549
	cmp	al,4
2645
	je	imul_reg_mem_imm_32bit
2550
	je	imul_reg_mem_imm_32bit
2646
	cmp	al,8
2551
	cmp	al,8
2647
	je	imul_reg_mem_imm_64bit
2552
	jne	invalid_operand_size
-
 
2553
      imul_reg_mem_imm_64bit:
2648
	jmp	invalid_operand_size
2554
	cmp	[size_declared],0
-
 
2555
	jne	long_immediate_not_encodable
-
 
2556
	call	operand_64bit
2649
      imul_reg_mem_imm_16bit:
2557
	call	get_simm32
-
 
2558
	cmp	[value_type],4
-
 
2559
	jae	long_immediate_not_encodable
-
 
2560
	jmp	imul_reg_mem_imm_32bit_ok
-
 
2561
      imul_reg_mem_imm_16bit:
2650
	call	operand_16bit
2562
	call	operand_16bit
2651
	call	get_word_value
2563
	call	get_word_value
2652
	mov	word [value],ax
2564
	mov	word [value],ax
2653
	cmp	[value_type],0
2565
	cmp	[value_type],0
2654
	jne	imul_reg_mem_imm_16bit_store
2566
	jne	imul_reg_mem_imm_16bit_store
Line 2680... Line 2592...
2680
	pop	ecx ebx edx
2592
	pop	ecx ebx edx
2681
	mov	[base_code],69h
2593
	mov	[base_code],69h
2682
	call	store_instruction_with_imm32
2594
	call	store_instruction_with_imm32
2683
	jmp	instruction_assembled
2595
	jmp	instruction_assembled
2684
      imul_reg_mem_imm_64bit:
2596
      imul_reg_mem_imm_8bit_store:
2685
	cmp	[size_declared],0
-
 
2686
	jne	long_immediate_not_encodable
-
 
2687
	call	operand_64bit
-
 
2688
	call	get_simm32
-
 
2689
	cmp	[value_type],4
-
 
2690
	jae	long_immediate_not_encodable
-
 
2691
	jmp	imul_reg_mem_imm_32bit_ok
-
 
2692
      imul_reg_mem_imm_8bit_store:
-
 
2693
	pop	ecx ebx edx
2597
	pop	ecx ebx edx
2694
	mov	[base_code],6Bh
2598
	mov	[base_code],6Bh
2695
	call	store_instruction_with_imm8
2599
	call	store_instruction_with_imm8
2696
	jmp	instruction_assembled
2600
	jmp	instruction_assembled
2697
      imul_reg_imm:
2601
      imul_reg_imm:
Line 2707... Line 2611...
2707
	mov	al,ah
2611
	mov	al,ah
2708
	call	operand_autodetect
2612
	call	operand_autodetect
2709
	mov	[base_code],0Fh
2613
	mov	[base_code],0Fh
2710
	mov	[extended_code],0AFh
2614
	mov	[extended_code],0AFh
2711
	call	store_nomem_instruction
2615
	jmp	nomem_instruction_ready
2712
	jmp	instruction_assembled
-
 
2713
      imul_reg_reg_imm:
2616
      imul_reg_reg_imm:
2714
	inc	esi
2617
	inc	esi
2715
	lods	byte [esi]
2618
	lods	byte [esi]
2716
	call	get_size_operator
2619
	call	get_size_operator
2717
	cmp	al,'('
2620
	cmp	al,'('
2718
	jne	invalid_operand
2621
	jne	invalid_operand
Line 2721... Line 2624...
2721
	je	imul_reg_reg_imm_16bit
2624
	je	imul_reg_reg_imm_16bit
2722
	cmp	al,4
2625
	cmp	al,4
2723
	je	imul_reg_reg_imm_32bit
2626
	je	imul_reg_reg_imm_32bit
2724
	cmp	al,8
2627
	cmp	al,8
2725
	je	imul_reg_reg_imm_64bit
2628
	jne	invalid_operand_size
-
 
2629
      imul_reg_reg_imm_64bit:
2726
	jmp	invalid_operand_size
2630
	cmp	[size_declared],0
-
 
2631
	jne	long_immediate_not_encodable
-
 
2632
	call	operand_64bit
2727
      imul_reg_reg_imm_16bit:
2633
	push	ebx
-
 
2634
	call	get_simm32
-
 
2635
	cmp	[value_type],4
-
 
2636
	jae	long_immediate_not_encodable
-
 
2637
	jmp	imul_reg_reg_imm_32bit_ok
-
 
2638
      imul_reg_reg_imm_16bit:
2728
	call	operand_16bit
2639
	call	operand_16bit
2729
	push	ebx
2640
	push	ebx
2730
	call	get_word_value
2641
	call	get_word_value
2731
	pop	ebx
2642
	pop	ebx
2732
	mov	dx,ax
2643
	mov	dx,ax
Line 2766... Line 2677...
2766
	mov	eax,edx
2677
	mov	eax,edx
2767
	call	mark_relocation
2678
	call	mark_relocation
2768
	stos	dword [edi]
2679
	stos	dword [edi]
2769
	jmp	instruction_assembled
2680
	jmp	instruction_assembled
2770
      imul_reg_reg_imm_64bit:
2681
      imul_reg_reg_imm_8bit_store:
2771
	cmp	[size_declared],0
-
 
2772
	jne	long_immediate_not_encodable
-
 
2773
	call	operand_64bit
-
 
2774
	push	ebx
-
 
2775
	call	get_simm32
-
 
2776
	cmp	[value_type],4
-
 
2777
	jae	long_immediate_not_encodable
-
 
2778
	jmp	imul_reg_reg_imm_32bit_ok
-
 
2779
      imul_reg_reg_imm_8bit_store:
-
 
2780
	mov	[base_code],6Bh
2682
	mov	[base_code],6Bh
2781
	call	store_nomem_instruction
2683
	call	store_nomem_instruction
2782
	mov	al,dl
2684
	mov	al,dl
2783
	stos	byte [edi]
2685
	stos	byte [edi]
2784
	jmp	instruction_assembled
2686
	jmp	instruction_assembled
Line 2813... Line 2715...
2813
	je	in_al_dx
2715
	je	in_al_dx
2814
	cmp	al,2
2716
	cmp	al,2
2815
	je	in_ax_dx
2717
	je	in_ax_dx
2816
	cmp	al,4
2718
	cmp	al,4
2817
	je	in_eax_dx
2719
	jne	invalid_operand_size
2818
	jmp	invalid_operand_size
-
 
2819
      in_al_dx:
2720
      in_ax_dx:
2820
	mov	al,0ECh
-
 
2821
	stos	byte [edi]
-
 
2822
	jmp	instruction_assembled
-
 
2823
      in_ax_dx:
-
 
2824
	call	operand_16bit
2721
	call	operand_autodetect
2825
	mov	[base_code],0EDh
2722
	mov	[base_code],0EDh
2826
	call	store_instruction_code
2723
	call	store_instruction_code
2827
	jmp	instruction_assembled
2724
	jmp	instruction_assembled
2828
      in_eax_dx:
2725
      in_al_dx:
2829
	call	operand_32bit
2726
	mov	al,0ECh
2830
	mov	[base_code],0EDh
-
 
2831
	call	store_instruction_code
2727
	stos	byte [edi]
2832
	jmp	instruction_assembled
2728
	jmp	instruction_assembled
2833
      in_imm:
2729
      in_imm:
2834
	mov	al,[operand_size]
2730
	mov	al,[operand_size]
2835
	or	al,al
2731
	or	al,al
2836
	jz	in_imm_size_ok
2732
	jz	in_imm_size_ok
2837
	cmp	al,1
2733
	cmp	al,1
Line 2844... Line 2740...
2844
	je	in_al_imm
2740
	je	in_al_imm
2845
	cmp	al,2
2741
	cmp	al,2
2846
	je	in_ax_imm
2742
	je	in_ax_imm
2847
	cmp	al,4
2743
	cmp	al,4
2848
	je	in_eax_imm
2744
	jne	invalid_operand_size
2849
	jmp	invalid_operand_size
-
 
2850
      in_al_imm:
2745
      in_ax_imm:
2851
	mov	al,0E4h
-
 
2852
	stos	byte [edi]
-
 
2853
	mov	al,dl
-
 
2854
	stos	byte [edi]
-
 
2855
	jmp	instruction_assembled
-
 
2856
      in_ax_imm:
-
 
2857
	call	operand_16bit
2746
	call	operand_autodetect
2858
	mov	[base_code],0E5h
2747
	mov	[base_code],0E5h
2859
	call	store_instruction_code
2748
	call	store_instruction_code
2860
	mov	al,dl
2749
	mov	al,dl
2861
	stos	byte [edi]
2750
	stos	byte [edi]
2862
	jmp	instruction_assembled
2751
	jmp	instruction_assembled
2863
      in_eax_imm:
2752
      in_al_imm:
2864
	call	operand_32bit
2753
	mov	al,0E4h
2865
	mov	[base_code],0E5h
-
 
2866
	call	store_instruction_code
2754
	stos	byte [edi]
2867
	mov	al,dl
2755
	mov	al,dl
2868
	stos	byte [edi]
2756
	stos	byte [edi]
2869
	jmp	instruction_assembled
2757
	jmp	instruction_assembled
2870
out_instruction:
2758
out_instruction:
2871
	lods	byte [esi]
2759
	lods	byte [esi]
2872
	call	get_size_operator
2760
	call	get_size_operator
Line 2894... Line 2782...
2894
	je	out_dx_al
2782
	je	out_dx_al
2895
	cmp	al,2
2783
	cmp	al,2
2896
	je	out_dx_ax
2784
	je	out_dx_ax
2897
	cmp	al,4
2785
	cmp	al,4
2898
	je	out_dx_eax
2786
	jne	invalid_operand_size
2899
	jmp	invalid_operand_size
-
 
2900
      out_dx_al:
2787
      out_dx_ax:
2901
	mov	al,0EEh
-
 
2902
	stos	byte [edi]
-
 
2903
	jmp	instruction_assembled
-
 
2904
      out_dx_ax:
-
 
2905
	call	operand_16bit
2788
	call	operand_autodetect
2906
	mov	[base_code],0EFh
2789
	mov	[base_code],0EFh
2907
	call	store_instruction_code
2790
	call	store_instruction_code
2908
	jmp	instruction_assembled
2791
	jmp	instruction_assembled
2909
      out_dx_eax:
2792
      out_dx_al:
2910
	call	operand_32bit
2793
	mov	al,0EEh
2911
	mov	[base_code],0EFh
-
 
2912
	call	store_instruction_code
2794
	stos	byte [edi]
2913
	jmp	instruction_assembled
2795
	jmp	instruction_assembled
2914
      out_imm:
2796
      out_imm:
2915
	mov	al,[operand_size]
2797
	mov	al,[operand_size]
2916
	or	al,al
2798
	or	al,al
2917
	jz	out_imm_size_ok
2799
	jz	out_imm_size_ok
2918
	cmp	al,1
2800
	cmp	al,1
Line 2937... Line 2819...
2937
	je	out_imm_al
2819
	je	out_imm_al
2938
	cmp	al,2
2820
	cmp	al,2
2939
	je	out_imm_ax
2821
	je	out_imm_ax
2940
	cmp	al,4
2822
	cmp	al,4
2941
	je	out_imm_eax
2823
	jne	invalid_operand_size
2942
	jmp	invalid_operand_size
-
 
2943
      out_imm_al:
2824
      out_imm_ax:
2944
	mov	al,0E6h
-
 
2945
	stos	byte [edi]
-
 
2946
	mov	al,dl
-
 
2947
	stos	byte [edi]
-
 
2948
	jmp	instruction_assembled
-
 
2949
      out_imm_ax:
-
 
2950
	call	operand_16bit
2825
	call	operand_autodetect
2951
	mov	[base_code],0E7h
2826
	mov	[base_code],0E7h
2952
	call	store_instruction_code
2827
	call	store_instruction_code
2953
	mov	al,dl
2828
	mov	al,dl
2954
	stos	byte [edi]
2829
	stos	byte [edi]
2955
	jmp	instruction_assembled
2830
	jmp	instruction_assembled
2956
      out_imm_eax:
2831
      out_imm_al:
2957
	call	operand_32bit
2832
	mov	al,0E6h
2958
	mov	[base_code],0E7h
-
 
2959
	call	store_instruction_code
2833
	stos	byte [edi]
2960
	mov	al,dl
2834
	mov	al,dl
2961
	stos	byte [edi]
2835
	stos	byte [edi]
2962
	jmp	instruction_assembled
2836
	jmp	instruction_assembled
2963
 
2837
 
Line 2964... Line 2838...
2964
call_instruction:
2838
call_instruction:
Line 3019... Line 2893...
3019
	cmp	[jump_type],3
2893
	cmp	[jump_type],3
3020
	je	invalid_operand_size
2894
	je	invalid_operand_size
3021
	cmp	[code_type],64
2895
	cmp	[code_type],64
3022
	jne	illegal_instruction
2896
	jne	illegal_instruction
3023
	call	store_instruction
2897
	jmp	instruction_ready
3024
	jmp	instruction_assembled
-
 
3025
      jmp_mem_far:
2898
      jmp_mem_far:
3026
	cmp	[code_type],16
2899
	cmp	[code_type],16
3027
	je	jmp_mem_far_32bit
2900
	je	jmp_mem_far_32bit
3028
      jmp_mem_48bit:
2901
      jmp_mem_48bit:
3029
	call	operand_32bit
2902
	call	operand_32bit
3030
      jmp_mem_far_store:
2903
      jmp_mem_far_store:
3031
	cmp	[jump_type],2
2904
	cmp	[jump_type],2
3032
	je	invalid_operand_size
2905
	je	invalid_operand_size
3033
	inc	[postbyte_register]
2906
	inc	[postbyte_register]
3034
	call	store_instruction
2907
	jmp	instruction_ready
3035
	jmp	instruction_assembled
-
 
3036
      jmp_mem_80bit:
2908
      jmp_mem_80bit:
3037
	call	operand_64bit
2909
	call	operand_64bit
3038
	jmp	jmp_mem_far_store
2910
	jmp	jmp_mem_far_store
3039
      jmp_mem_far_32bit:
2911
      jmp_mem_far_32bit:
3040
	call	operand_16bit
2912
	call	operand_16bit
3041
	jmp	jmp_mem_far_store
2913
	jmp	jmp_mem_far_store
Line 3049... Line 2921...
3049
      jmp_mem_near_32bit:
2921
      jmp_mem_near_32bit:
3050
	cmp	[code_type],64
2922
	cmp	[code_type],64
3051
	je	illegal_instruction
2923
	je	illegal_instruction
3052
	call	operand_32bit
2924
	call	operand_32bit
3053
	call	store_instruction
2925
	jmp	instruction_ready
3054
	jmp	instruction_assembled
-
 
3055
      jmp_mem_16bit:
2926
      jmp_mem_16bit:
3056
	cmp	[jump_type],3
2927
	cmp	[jump_type],3
3057
	je	invalid_operand_size
2928
	je	invalid_operand_size
3058
	call	operand_16bit
2929
	call	operand_16bit
3059
	call	store_instruction
2930
	jmp	instruction_ready
3060
	jmp	instruction_assembled
-
 
3061
      jmp_reg:
2931
      jmp_reg:
3062
	test	[jump_type],1
2932
	test	[jump_type],1
3063
	jnz	invalid_operand
2933
	jnz	invalid_operand
3064
	lods	byte [esi]
2934
	lods	byte [esi]
3065
	call	convert_register
2935
	call	convert_register
3066
	mov	bl,al
2936
	mov	bl,al
Line 3073... Line 2943...
3073
	jne	invalid_operand_size
2943
	jne	invalid_operand_size
3074
      jmp_reg_64bit:
2944
      jmp_reg_64bit:
3075
	cmp	[code_type],64
2945
	cmp	[code_type],64
3076
	jne	illegal_instruction
2946
	jne	illegal_instruction
3077
	call	store_nomem_instruction
2947
	jmp	nomem_instruction_ready
3078
	jmp	instruction_assembled
-
 
3079
      jmp_reg_32bit:
2948
      jmp_reg_32bit:
3080
	cmp	[code_type],64
2949
	cmp	[code_type],64
3081
	je	illegal_instruction
2950
	je	illegal_instruction
3082
	call	store_nomem_instruction
2951
	jmp	nomem_instruction_ready
3083
	jmp	instruction_assembled
-
 
3084
      jmp_reg_16bit:
2952
      jmp_reg_16bit:
3085
	call	operand_16bit
2953
	call	operand_16bit
3086
	call	store_nomem_instruction
2954
	jmp	nomem_instruction_ready
3087
	jmp	instruction_assembled
-
 
3088
      jmp_imm:
2955
      jmp_imm:
3089
	cmp	byte [esi],'.'
2956
	cmp	byte [esi],'.'
3090
	je	invalid_value
2957
	je	invalid_value
3091
	mov	ebx,esi
2958
	mov	ebx,esi
3092
	dec	esi
2959
	dec	esi
3093
	call	skip_symbol
2960
	call	skip_symbol
Line 3492... Line 3359...
3492
	je	movs_segment_ok
3359
	je	movs_segment_ok
3493
	call	store_segment_prefix
3360
	call	store_segment_prefix
3494
      movs_segment_ok:
3361
      movs_segment_ok:
3495
	mov	al,0A4h
3362
	mov	al,0A4h
3496
	mov	bl,[operand_size]
3363
      movs_check_size:
-
 
3364
	mov	bl,[operand_size]
3497
	cmp	bl,1
3365
	cmp	bl,1
3498
	je	simple_instruction
3366
	je	simple_instruction
3499
	inc	al
3367
	inc	al
3500
	cmp	bl,2
3368
	cmp	bl,2
3501
	je	simple_instruction_16bit
3369
	je	simple_instruction_16bit
Line 3503... Line 3371...
3503
	je	simple_instruction_32bit
3371
	je	simple_instruction_32bit
3504
	cmp	bl,8
3372
	cmp	bl,8
3505
	je	simple_instruction_64bit
3373
	je	simple_instruction_64bit
3506
	or	bl,bl
3374
	or	bl,bl
3507
	jz	operand_size_not_specified
3375
	jnz	invalid_operand_size
-
 
3376
	cmp	[error_line],0
-
 
3377
	jne	simple_instruction
-
 
3378
	mov	ebx,[current_line]
-
 
3379
	mov	[error_line],ebx
-
 
3380
	mov	[error],operand_size_not_specified
3508
	jmp	invalid_operand_size
3381
	jmp	simple_instruction
3509
lods_instruction:
3382
lods_instruction:
3510
	lods	byte [esi]
3383
	lods	byte [esi]
3511
	call	get_size_operator
3384
	call	get_size_operator
3512
	cmp	al,'['
3385
	cmp	al,'['
3513
	jne	invalid_operand
3386
	jne	invalid_operand
3514
	call	get_address
3387
	call	get_address
Line 3537... Line 3410...
3537
	je	lods_segment_ok
3410
	je	lods_segment_ok
3538
	call	store_segment_prefix
3411
	call	store_segment_prefix
3539
      lods_segment_ok:
3412
      lods_segment_ok:
3540
	mov	al,0ACh
3413
	mov	al,0ACh
3541
	mov	bl,[operand_size]
3414
	jmp	movs_check_size
3542
	cmp	bl,1
-
 
3543
	je	simple_instruction
-
 
3544
	inc	al
-
 
3545
	cmp	bl,2
-
 
3546
	je	simple_instruction_16bit
-
 
3547
	cmp	bl,4
-
 
3548
	je	simple_instruction_32bit
-
 
3549
	cmp	bl,8
-
 
3550
	je	simple_instruction_64bit
-
 
3551
	or	bl,bl
-
 
3552
	jz	operand_size_not_specified
-
 
3553
	jmp	invalid_operand_size
-
 
3554
stos_instruction:
3415
stos_instruction:
3555
	mov	[base_code],al
3416
	mov	[base_code],al
3556
	lods	byte [esi]
3417
	lods	byte [esi]
3557
	call	get_size_operator
3418
	call	get_size_operator
3558
	cmp	al,'['
3419
	cmp	al,'['
3559
	jne	invalid_operand
3420
	jne	invalid_operand
Line 3581... Line 3442...
3581
      stos_store:
3442
      stos_store:
3582
	cmp	[segment_register],1
3443
	cmp	[segment_register],1
3583
	ja	invalid_address
3444
	ja	invalid_address
3584
	mov	al,[base_code]
3445
	mov	al,[base_code]
3585
	mov	bl,[operand_size]
3446
	jmp	movs_check_size
3586
	cmp	bl,1
-
 
3587
	je	simple_instruction
-
 
3588
	inc	al
-
 
3589
	cmp	bl,2
-
 
3590
	je	simple_instruction_16bit
-
 
3591
	cmp	bl,4
-
 
3592
	je	simple_instruction_32bit
-
 
3593
	cmp	bl,8
-
 
3594
	je	simple_instruction_64bit
-
 
3595
	or	bl,bl
-
 
3596
	jz	operand_size_not_specified
-
 
3597
	jmp	invalid_operand_size
-
 
3598
cmps_instruction:
3447
cmps_instruction:
3599
	lods	byte [esi]
3448
	lods	byte [esi]
3600
	call	get_size_operator
3449
	call	get_size_operator
3601
	cmp	al,'['
3450
	cmp	al,'['
3602
	jne	invalid_operand
3451
	jne	invalid_operand
3603
	call	get_address
3452
	call	get_address
Line 3654... Line 3503...
3654
	je	cmps_segment_ok
3503
	je	cmps_segment_ok
3655
	call	store_segment_prefix
3504
	call	store_segment_prefix
3656
      cmps_segment_ok:
3505
      cmps_segment_ok:
3657
	mov	al,0A6h
3506
	mov	al,0A6h
3658
	mov	bl,[operand_size]
3507
	jmp	movs_check_size
3659
	cmp	bl,1
-
 
3660
	je	simple_instruction
-
 
3661
	inc	al
-
 
3662
	cmp	bl,2
-
 
3663
	je	simple_instruction_16bit
-
 
3664
	cmp	bl,4
-
 
3665
	je	simple_instruction_32bit
-
 
3666
	cmp	bl,8
-
 
3667
	je	simple_instruction_64bit
-
 
3668
	or	bl,bl
-
 
3669
	jz	operand_size_not_specified
-
 
3670
	jmp	invalid_operand_size
-
 
3671
ins_instruction:
3508
ins_instruction:
3672
	lods	byte [esi]
3509
	lods	byte [esi]
3673
	call	get_size_operator
3510
	call	get_size_operator
3674
	cmp	al,'['
3511
	cmp	al,'['
3675
	jne	invalid_operand
3512
	jne	invalid_operand
3676
	call	get_address
3513
	call	get_address
Line 3706... Line 3543...
3706
	lods	byte [esi]
3543
	lods	byte [esi]
3707
	cmp	al,22h
3544
	cmp	al,22h
3708
	jne	invalid_operand
3545
	jne	invalid_operand
3709
	mov	al,6Ch
3546
	mov	al,6Ch
3710
	mov	bl,[operand_size]
3547
      ins_check_size:
3711
	cmp	bl,1
3548
	cmp	[operand_size],8
3712
	je	simple_instruction
-
 
3713
	inc	al
3549
	jne	movs_check_size
3714
	cmp	bl,2
-
 
3715
	je	simple_instruction_16bit
-
 
3716
	cmp	bl,4
-
 
3717
	je	simple_instruction_32bit
-
 
3718
	or	bl,bl
3550
	jmp	invalid_operand_size
3719
	jz	operand_size_not_specified
-
 
3720
	jmp	invalid_operand_size
-
 
3721
outs_instruction:
3551
outs_instruction:
3722
	lods	byte [esi]
3552
	lods	byte [esi]
3723
	cmp	al,10h
3553
	cmp	al,10h
3724
	jne	invalid_operand
3554
	jne	invalid_operand
3725
	lods	byte [esi]
3555
	lods	byte [esi]
Line 3758... Line 3588...
3758
	je	outs_segment_ok
3588
	je	outs_segment_ok
3759
	call	store_segment_prefix
3589
	call	store_segment_prefix
3760
      outs_segment_ok:
3590
      outs_segment_ok:
3761
	mov	al,6Eh
3591
	mov	al,6Eh
3762
	mov	bl,[operand_size]
3592
	jmp	ins_check_size
3763
	cmp	bl,1
-
 
3764
	je	simple_instruction
-
 
3765
	inc	al
-
 
3766
	cmp	bl,2
-
 
3767
	je	simple_instruction_16bit
-
 
3768
	cmp	bl,4
-
 
3769
	je	simple_instruction_32bit
-
 
3770
	or	bl,bl
-
 
3771
	jz	operand_size_not_specified
-
 
3772
	jmp	invalid_operand_size
-
 
3773
xlat_instruction:
3593
xlat_instruction:
3774
	lods	byte [esi]
3594
	lods	byte [esi]
3775
	call	get_size_operator
3595
	call	get_size_operator
3776
	cmp	al,'['
3596
	cmp	al,'['
3777
	jne	invalid_operand
3597
	jne	invalid_operand
3778
	call	get_address
3598
	call	get_address
Line 3823... Line 3643...
3823
	je	pm_mem_store
3643
	je	pm_mem_store
3824
	or	al,al
3644
	or	al,al
3825
	jnz	invalid_operand_size
3645
	jnz	invalid_operand_size
3826
      pm_mem_store:
3646
      pm_mem_store:
3827
	call	store_instruction
3647
	jmp	instruction_ready
3828
	jmp	instruction_assembled
-
 
3829
      pm_reg:
3648
      pm_reg:
3830
	lods	byte [esi]
3649
	lods	byte [esi]
3831
	call	convert_register
3650
	call	convert_register
3832
	mov	bl,al
3651
	mov	bl,al
3833
	cmp	ah,2
3652
	cmp	ah,2
3834
	jne	invalid_operand_size
3653
	jne	invalid_operand_size
3835
	call	store_nomem_instruction
3654
	jmp	nomem_instruction_ready
3836
	jmp	instruction_assembled
-
 
3837
pm_store_word_instruction:
3655
pm_store_word_instruction:
3838
	mov	ah,al
3656
	mov	ah,al
3839
	shr	ah,4
3657
	shr	ah,4
3840
	and	al,111b
3658
	and	al,111b
3841
	mov	[base_code],0Fh
3659
	mov	[base_code],0Fh
3842
	mov	[extended_code],ah
3660
	mov	[extended_code],ah
Line 3849... Line 3667...
3849
	call	convert_register
3667
	call	convert_register
3850
	mov	bl,al
3668
	mov	bl,al
3851
	mov	al,ah
3669
	mov	al,ah
3852
	call	operand_autodetect
3670
	call	operand_autodetect
3853
	call	store_nomem_instruction
3671
	jmp	nomem_instruction_ready
3854
	jmp	instruction_assembled
-
 
3855
lgdt_instruction:
3672
lgdt_instruction:
3856
	mov	[base_code],0Fh
3673
	mov	[base_code],0Fh
3857
	mov	[extended_code],1
3674
	mov	[extended_code],1
3858
	mov	[postbyte_register],al
3675
	mov	[postbyte_register],al
3859
	lods	byte [esi]
3676
	lods	byte [esi]
3860
	call	get_size_operator
3677
	call	get_size_operator
Line 3879... Line 3696...
3879
	cmp	[postbyte_register],2
3696
	cmp	[postbyte_register],2
3880
	jb	lgdt_mem_store
3697
	jb	lgdt_mem_store
3881
	call	operand_32bit
3698
	call	operand_32bit
3882
      lgdt_mem_store:
3699
      lgdt_mem_store:
3883
	call	store_instruction
3700
	jmp	instruction_ready
3884
	jmp	instruction_assembled
-
 
3885
lar_instruction:
3701
lar_instruction:
3886
	mov	[extended_code],al
3702
	mov	[extended_code],al
3887
	mov	[base_code],0Fh
3703
	mov	[base_code],0Fh
3888
	lods	byte [esi]
3704
	lods	byte [esi]
3889
	call	get_size_operator
3705
	call	get_size_operator
3890
	cmp	al,10h
3706
	cmp	al,10h
Line 3910... Line 3726...
3910
	jz	lar_reg_mem
3726
	jz	lar_reg_mem
3911
	cmp	al,2
3727
	cmp	al,2
3912
	jne	invalid_operand_size
3728
	jne	invalid_operand_size
3913
      lar_reg_mem:
3729
      lar_reg_mem:
3914
	call	store_instruction
3730
	jmp	instruction_ready
3915
	jmp	instruction_assembled
-
 
3916
      lar_reg_reg:
3731
      lar_reg_reg:
3917
	lods	byte [esi]
3732
	lods	byte [esi]
3918
	call	convert_register
3733
	call	convert_register
3919
	cmp	ah,2
3734
	cmp	ah,2
3920
	jne	invalid_operand_size
3735
	jne	invalid_operand_size
3921
	mov	bl,al
3736
	mov	bl,al
3922
	call	store_nomem_instruction
3737
	jmp	nomem_instruction_ready
3923
	jmp	instruction_assembled
-
 
3924
invlpg_instruction:
3738
invlpg_instruction:
3925
	mov	[base_code],0Fh
3739
	mov	[base_code],0Fh
3926
	mov	[extended_code],1
3740
	mov	[extended_code],1
3927
	mov	[postbyte_register],7
3741
	mov	[postbyte_register],7
3928
	lods	byte [esi]
3742
	lods	byte [esi]
3929
	call	get_size_operator
3743
	call	get_size_operator
3930
	cmp	al,'['
3744
	cmp	al,'['
3931
	jne	invalid_operand
3745
	jne	invalid_operand
3932
	call	get_address
3746
	call	get_address
3933
	call	store_instruction
3747
	jmp	instruction_ready
3934
	jmp	instruction_assembled
-
 
3935
swapgs_instruction:
3748
swapgs_instruction:
3936
	mov	[base_code],0Fh
3749
	mov	[base_code],0Fh
3937
	mov	[extended_code],1
3750
	mov	[extended_code],1
3938
	mov	[postbyte_register],7
3751
	mov	[postbyte_register],7
3939
	mov	bl,al
3752
	mov	bl,al
3940
	call	store_nomem_instruction
3753
	jmp	nomem_instruction_ready
3941
	jmp	instruction_assembled
-
 
3942
 
3754
 
Line 3943... Line 3755...
3943
basic_486_instruction:
3755
basic_486_instruction:
3944
	mov	[base_code],0Fh
3756
	mov	[base_code],0Fh
3945
	mov	[extended_code],al
3757
	mov	[extended_code],al
3946
	lods	byte [esi]
3758
	lods	byte [esi]
Line 3967... Line 3779...
3967
	je	basic_486_mem_reg_8bit
3779
	je	basic_486_mem_reg_8bit
3968
	call	operand_autodetect
3780
	call	operand_autodetect
3969
	inc	[extended_code]
3781
	inc	[extended_code]
3970
      basic_486_mem_reg_8bit:
3782
      basic_486_mem_reg_8bit:
3971
	call	store_instruction
3783
	jmp	instruction_ready
3972
	jmp	instruction_assembled
-
 
3973
      basic_486_reg:
3784
      basic_486_reg:
3974
	lods	byte [esi]
3785
	lods	byte [esi]
3975
	call	convert_register
3786
	call	convert_register
3976
	mov	[postbyte_register],al
3787
	mov	[postbyte_register],al
3977
	lods	byte [esi]
3788
	lods	byte [esi]
3978
	cmp	al,','
3789
	cmp	al,','
Line 3990... Line 3801...
3990
	je	basic_486_reg_reg_8bit
3801
	je	basic_486_reg_reg_8bit
3991
	call	operand_autodetect
3802
	call	operand_autodetect
3992
	inc	[extended_code]
3803
	inc	[extended_code]
3993
      basic_486_reg_reg_8bit:
3804
      basic_486_reg_reg_8bit:
3994
	call	store_nomem_instruction
3805
	jmp	nomem_instruction_ready
3995
	jmp	instruction_assembled
-
 
3996
bswap_instruction:
3806
bswap_instruction:
3997
	lods	byte [esi]
3807
	lods	byte [esi]
3998
	call	get_size_operator
3808
	call	get_size_operator
3999
	cmp	al,10h
3809
	cmp	al,10h
4000
	jne	invalid_operand
3810
	jne	invalid_operand
4001
	lods	byte [esi]
3811
	lods	byte [esi]
Line 4039... Line 3849...
4039
	cmp	ah,16
3849
	cmp	ah,16
4040
	jne	cmpxchgx_store
3850
	jne	cmpxchgx_store
4041
	call	operand_64bit
3851
	call	operand_64bit
4042
      cmpxchgx_store:
3852
      cmpxchgx_store:
4043
	call	store_instruction
3853
	jmp	instruction_ready
4044
	jmp	instruction_assembled
-
 
4045
nop_instruction:
3854
nop_instruction:
4046
	mov	ah,[esi]
3855
	mov	ah,[esi]
4047
	cmp	ah,10h
3856
	cmp	ah,10h
4048
	je	extended_nop
3857
	je	extended_nop
4049
	cmp	ah,11h
3858
	cmp	ah,11h
4050
	je	extended_nop
3859
	je	extended_nop
Line 4067... Line 3876...
4067
	or	al,al
3876
	or	al,al
4068
	jz	extended_nop_store
3877
	jz	extended_nop_store
4069
	call	operand_autodetect
3878
	call	operand_autodetect
4070
      extended_nop_store:
3879
      extended_nop_store:
4071
	call	store_instruction
3880
	jmp	instruction_ready
4072
	jmp	instruction_assembled
-
 
4073
      extended_nop_reg:
3881
      extended_nop_reg:
4074
	lods	byte [esi]
3882
	lods	byte [esi]
4075
	call	convert_register
3883
	call	convert_register
4076
	mov	bl,al
3884
	mov	bl,al
4077
	mov	al,ah
3885
	mov	al,ah
4078
	call	operand_autodetect
3886
	call	operand_autodetect
4079
	call	store_nomem_instruction
3887
	jmp	nomem_instruction_ready
4080
	jmp	instruction_assembled
-
 
4081
 
3888
 
Line 4082... Line 3889...
4082
basic_fpu_instruction:
3889
basic_fpu_instruction:
4083
	mov	[postbyte_register],al
3890
	mov	[postbyte_register],al
4084
	mov	[base_code],0D8h
3891
	mov	[base_code],0D8h
4085
	lods	byte [esi]
3892
	lods	byte [esi]
Line 4094... Line 3901...
4094
	jb	invalid_operand
3901
	jb	invalid_operand
4095
	cmp	ah,3
3902
	cmp	ah,3
4096
	ja	invalid_operand
3903
	ja	invalid_operand
4097
	mov	bl,1
3904
	mov	bl,1
4098
	call	store_nomem_instruction
3905
	jmp	nomem_instruction_ready
4099
	jmp	instruction_assembled
-
 
4100
      basic_fpu_mem:
3906
      basic_fpu_mem:
4101
	call	get_address
3907
	call	get_address
4102
	mov	al,[operand_size]
3908
	mov	al,[operand_size]
4103
	cmp	al,4
3909
	cmp	al,4
4104
	je	basic_fpu_mem_32bit
3910
	je	basic_fpu_mem_32bit
4105
	cmp	al,8
3911
	cmp	al,8
Line 4111... Line 3917...
4111
	mov	eax,[current_line]
3917
	mov	eax,[current_line]
4112
	mov	[error_line],eax
3918
	mov	[error_line],eax
4113
	mov	[error],operand_size_not_specified
3919
	mov	[error],operand_size_not_specified
4114
      basic_fpu_mem_32bit:
3920
      basic_fpu_mem_32bit:
4115
	call	store_instruction
3921
	jmp	instruction_ready
4116
	jmp	instruction_assembled
-
 
4117
      basic_fpu_mem_64bit:
3922
      basic_fpu_mem_64bit:
4118
	mov	[base_code],0DCh
3923
	mov	[base_code],0DCh
4119
	call	store_instruction
3924
	jmp	instruction_ready
4120
	jmp	instruction_assembled
-
 
4121
      basic_fpu_streg:
3925
      basic_fpu_streg:
4122
	lods	byte [esi]
3926
	lods	byte [esi]
4123
	call	convert_fpu_register
3927
	call	convert_fpu_register
4124
	mov	bl,al
3928
	mov	bl,al
4125
	mov	ah,[postbyte_register]
3929
	mov	ah,[postbyte_register]
4126
	cmp	ah,2
3930
	cmp	ah,2
Line 4144... Line 3948...
4144
	call	convert_fpu_register
3948
	call	convert_fpu_register
4145
	or	al,al
3949
	or	al,al
4146
	jnz	invalid_operand
3950
	jnz	invalid_operand
4147
	mov	[base_code],0DCh
3951
	mov	[base_code],0DCh
4148
	call	store_nomem_instruction
3952
	jmp	nomem_instruction_ready
4149
	jmp	instruction_assembled
-
 
4150
      basic_fpu_st0:
3953
      basic_fpu_st0:
4151
	lods	byte [esi]
3954
	lods	byte [esi]
4152
	cmp	al,','
3955
	cmp	al,','
4153
	jne	invalid_operand
3956
	jne	invalid_operand
4154
	lods	byte [esi]
3957
	lods	byte [esi]
4155
	call	get_size_operator
3958
	call	get_size_operator
Line 4159... Line 3962...
4159
	call	convert_fpu_register
3962
	call	convert_fpu_register
4160
	mov	bl,al
3963
	mov	bl,al
4161
      basic_fpu_single_streg:
3964
      basic_fpu_single_streg:
4162
	mov	[base_code],0D8h
3965
	mov	[base_code],0D8h
4163
	call	store_nomem_instruction
3966
	jmp	nomem_instruction_ready
4164
	jmp	instruction_assembled
-
 
4165
simple_fpu_instruction:
3967
simple_fpu_instruction:
4166
	mov	ah,al
3968
	mov	ah,al
4167
	or	ah,11000000b
3969
	or	ah,11000000b
4168
	mov	al,0D9h
3970
	mov	al,0D9h
4169
	stos	word [edi]
3971
	stos	word [edi]
4170
	jmp	instruction_assembled
3972
	jmp	instruction_assembled
Line 4188... Line 3990...
4188
	mov	[error_line],eax
3990
	mov	[error_line],eax
4189
	mov	[error],operand_size_not_specified
3991
	mov	[error],operand_size_not_specified
4190
      fi_mem_32bit:
3992
      fi_mem_32bit:
4191
	mov	[base_code],0DAh
3993
	mov	[base_code],0DAh
4192
	call	store_instruction
3994
	jmp	instruction_ready
4193
	jmp	instruction_assembled
-
 
4194
      fi_mem_16bit:
3995
      fi_mem_16bit:
4195
	mov	[base_code],0DEh
3996
	mov	[base_code],0DEh
4196
	call	store_instruction
3997
	jmp	instruction_ready
4197
	jmp	instruction_assembled
-
 
4198
fld_instruction:
3998
fld_instruction:
4199
	mov	[postbyte_register],al
3999
	mov	[postbyte_register],al
4200
	lods	byte [esi]
4000
	lods	byte [esi]
4201
	call	get_size_operator
4001
	call	get_size_operator
4202
	cmp	al,10h
4002
	cmp	al,10h
4203
	je	fld_streg
4003
	je	fld_streg
Line 4219... Line 4019...
4219
	mov	[error_line],eax
4019
	mov	[error_line],eax
4220
	mov	[error],operand_size_not_specified
4020
	mov	[error],operand_size_not_specified
4221
      fld_mem_32bit:
4021
      fld_mem_32bit:
4222
	mov	[base_code],0D9h
4022
	mov	[base_code],0D9h
4223
	call	store_instruction
4023
	jmp	instruction_ready
4224
	jmp	instruction_assembled
-
 
4225
      fld_mem_64bit:
4024
      fld_mem_64bit:
4226
	mov	[base_code],0DDh
4025
	mov	[base_code],0DDh
4227
	call	store_instruction
4026
	jmp	instruction_ready
4228
	jmp	instruction_assembled
-
 
4229
      fld_mem_80bit:
4027
      fld_mem_80bit:
4230
	mov	al,[postbyte_register]
4028
	mov	al,[postbyte_register]
4231
	cmp	al,0
4029
	cmp	al,0
4232
	je	fld_mem_80bit_store
4030
	je	fld_mem_80bit_store
4233
	dec	[postbyte_register]
4031
	dec	[postbyte_register]
4234
	cmp	al,3
4032
	cmp	al,3
Line 4236... Line 4034...
4236
	jmp	invalid_operand_size
4034
	jmp	invalid_operand_size
4237
      fld_mem_80bit_store:
4035
      fld_mem_80bit_store:
4238
	add	[postbyte_register],5
4036
	add	[postbyte_register],5
4239
	mov	[base_code],0DBh
4037
	mov	[base_code],0DBh
4240
	call	store_instruction
4038
	jmp	instruction_ready
4241
	jmp	instruction_assembled
-
 
4242
      fld_streg:
4039
      fld_streg:
4243
	lods	byte [esi]
4040
	lods	byte [esi]
4244
	call	convert_fpu_register
4041
	call	convert_fpu_register
4245
	mov	bl,al
4042
	mov	bl,al
4246
	cmp	[postbyte_register],2
4043
	cmp	[postbyte_register],2
4247
	jae	fst_streg
4044
	jae	fst_streg
4248
	mov	[base_code],0D9h
4045
	mov	[base_code],0D9h
4249
	call	store_nomem_instruction
4046
	jmp	nomem_instruction_ready
4250
	jmp	instruction_assembled
-
 
4251
      fst_streg:
4047
      fst_streg:
4252
	mov	[base_code],0DDh
4048
	mov	[base_code],0DDh
4253
	call	store_nomem_instruction
4049
	jmp	nomem_instruction_ready
4254
	jmp	instruction_assembled
-
 
4255
fild_instruction:
4050
fild_instruction:
4256
	mov	[postbyte_register],al
4051
	mov	[postbyte_register],al
4257
	lods	byte [esi]
4052
	lods	byte [esi]
4258
	call	get_size_operator
4053
	call	get_size_operator
4259
	cmp	al,'['
4054
	cmp	al,'['
4260
	jne	invalid_operand
4055
	jne	invalid_operand
Line 4274... Line 4069...
4274
	mov	[error_line],eax
4069
	mov	[error_line],eax
4275
	mov	[error],operand_size_not_specified
4070
	mov	[error],operand_size_not_specified
4276
      fild_mem_32bit:
4071
      fild_mem_32bit:
4277
	mov	[base_code],0DBh
4072
	mov	[base_code],0DBh
4278
	call	store_instruction
4073
	jmp	instruction_ready
4279
	jmp	instruction_assembled
-
 
4280
      fild_mem_16bit:
4074
      fild_mem_16bit:
4281
	mov	[base_code],0DFh
4075
	mov	[base_code],0DFh
4282
	call	store_instruction
4076
	jmp	instruction_ready
4283
	jmp	instruction_assembled
-
 
4284
      fild_mem_64bit:
4077
      fild_mem_64bit:
4285
	mov	al,[postbyte_register]
4078
	mov	al,[postbyte_register]
4286
	cmp	al,1
4079
	cmp	al,1
4287
	je	fisttp_64bit_store
4080
	je	fisttp_64bit_store
4288
	jb	fild_mem_64bit_store
4081
	jb	fild_mem_64bit_store
4289
	dec	[postbyte_register]
4082
	dec	[postbyte_register]
Line 4292... Line 4085...
4292
	jmp	invalid_operand_size
4085
	jmp	invalid_operand_size
4293
      fild_mem_64bit_store:
4086
      fild_mem_64bit_store:
4294
	add	[postbyte_register],5
4087
	add	[postbyte_register],5
4295
	mov	[base_code],0DFh
4088
	mov	[base_code],0DFh
4296
	call	store_instruction
4089
	jmp	instruction_ready
4297
	jmp	instruction_assembled
-
 
4298
      fisttp_64bit_store:
4090
      fisttp_64bit_store:
4299
	mov	[base_code],0DDh
4091
	mov	[base_code],0DDh
4300
	call	store_instruction
4092
	jmp	instruction_ready
4301
	jmp	instruction_assembled
-
 
4302
fbld_instruction:
4093
fbld_instruction:
4303
	mov	[postbyte_register],al
4094
	mov	[postbyte_register],al
4304
	lods	byte [esi]
4095
	lods	byte [esi]
4305
	call	get_size_operator
4096
	call	get_size_operator
4306
	cmp	al,'['
4097
	cmp	al,'['
4307
	jne	invalid_operand
4098
	jne	invalid_operand
Line 4313... Line 4104...
4313
	je	fbld_mem_80bit
4104
	je	fbld_mem_80bit
4314
	jmp	invalid_operand_size
4105
	jmp	invalid_operand_size
4315
      fbld_mem_80bit:
4106
      fbld_mem_80bit:
4316
	mov	[base_code],0DFh
4107
	mov	[base_code],0DFh
4317
	call	store_instruction
4108
	jmp	instruction_ready
4318
	jmp	instruction_assembled
-
 
4319
faddp_instruction:
4109
faddp_instruction:
4320
	mov	[postbyte_register],al
4110
	mov	[postbyte_register],al
4321
	mov	[base_code],0DEh
4111
	mov	[base_code],0DEh
4322
	mov	edx,esi
4112
	mov	edx,esi
4323
	lods	byte [esi]
4113
	lods	byte [esi]
4324
	call	get_size_operator
4114
	call	get_size_operator
4325
	cmp	al,10h
4115
	cmp	al,10h
4326
	je	faddp_streg
4116
	je	faddp_streg
4327
	mov	esi,edx
4117
	mov	esi,edx
4328
	mov	bl,1
4118
	mov	bl,1
4329
	call	store_nomem_instruction
4119
	jmp	nomem_instruction_ready
4330
	jmp	instruction_assembled
-
 
4331
      faddp_streg:
4120
      faddp_streg:
4332
	lods	byte [esi]
4121
	lods	byte [esi]
4333
	call	convert_fpu_register
4122
	call	convert_fpu_register
4334
	mov	bl,al
4123
	mov	bl,al
4335
	lods	byte [esi]
4124
	lods	byte [esi]
4336
	cmp	al,','
4125
	cmp	al,','
Line 4342... Line 4131...
4342
	lods	byte [esi]
4131
	lods	byte [esi]
4343
	call	convert_fpu_register
4132
	call	convert_fpu_register
4344
	or	al,al
4133
	or	al,al
4345
	jnz	invalid_operand
4134
	jnz	invalid_operand
4346
	call	store_nomem_instruction
4135
	jmp	nomem_instruction_ready
4347
	jmp	instruction_assembled
-
 
4348
fcompp_instruction:
4136
fcompp_instruction:
4349
	mov	ax,0D9DEh
4137
	mov	ax,0D9DEh
4350
	stos	word [edi]
4138
	stos	word [edi]
4351
	jmp	instruction_assembled
4139
	jmp	instruction_assembled
4352
fucompp_instruction:
4140
fucompp_instruction:
4353
	mov	ax,0E9DAh
4141
	mov	ax,0E9DAh
Line 4429... Line 4217...
4429
	jne	invalid_operand
4217
	jne	invalid_operand
4430
	call	get_address
4218
	call	get_address
4431
	cmp	[operand_size],0
4219
	cmp	[operand_size],0
4432
	jne	invalid_operand_size
4220
	jne	invalid_operand_size
4433
	call	store_instruction
4221
	jmp	instruction_ready
4434
	jmp	instruction_assembled
-
 
4435
fstcw_instruction:
4222
fstcw_instruction:
4436
	mov	byte [edi],9Bh
4223
	mov	byte [edi],9Bh
4437
	inc	edi
4224
	inc	edi
4438
fldcw_instruction:
4225
fldcw_instruction:
4439
	mov	[postbyte_register],al
4226
	mov	[postbyte_register],al
4440
	mov	[base_code],0D9h
4227
	mov	[base_code],0D9h
Line 4449... Line 4236...
4449
	cmp	al,2
4236
	cmp	al,2
4450
	je	fldcw_mem_16bit
4237
	je	fldcw_mem_16bit
4451
	jmp	invalid_operand_size
4238
	jmp	invalid_operand_size
4452
      fldcw_mem_16bit:
4239
      fldcw_mem_16bit:
4453
	call	store_instruction
4240
	jmp	instruction_ready
4454
	jmp	instruction_assembled
-
 
4455
fstsw_instruction:
4241
fstsw_instruction:
4456
	mov	al,9Bh
4242
	mov	al,9Bh
4457
	stos	byte [edi]
4243
	stos	byte [edi]
4458
fnstsw_instruction:
4244
fnstsw_instruction:
4459
	mov	[base_code],0DDh
4245
	mov	[base_code],0DDh
4460
	mov	[postbyte_register],7
4246
	mov	[postbyte_register],7
Line 4471... Line 4257...
4471
	cmp	al,2
4257
	cmp	al,2
4472
	je	fstsw_mem_16bit
4258
	je	fstsw_mem_16bit
4473
	jmp	invalid_operand_size
4259
	jmp	invalid_operand_size
4474
      fstsw_mem_16bit:
4260
      fstsw_mem_16bit:
4475
	call	store_instruction
4261
	jmp	instruction_ready
4476
	jmp	instruction_assembled
-
 
4477
      fstsw_reg:
4262
      fstsw_reg:
4478
	lods	byte [esi]
4263
	lods	byte [esi]
4479
	call	convert_register
4264
	call	convert_register
4480
	cmp	ax,0200h
4265
	cmp	ax,0200h
4481
	jne	invalid_operand
4266
	jne	invalid_operand
4482
	mov	ax,0E0DFh
4267
	mov	ax,0E0DFh
Line 4551... Line 4336...
4551
	cmp	al,'['
4336
	cmp	al,'['
4552
	jne	invalid_operand
4337
	jne	invalid_operand
4553
      mmx_mmreg_mem:
4338
      mmx_mmreg_mem:
4554
	call	get_address
4339
	call	get_address
4555
	call	store_instruction
4340
	jmp	instruction_ready
4556
	jmp	instruction_assembled
-
 
4557
      mmx_mmreg_mmreg:
4341
      mmx_mmreg_mmreg:
4558
	lods	byte [esi]
4342
	lods	byte [esi]
4559
	call	convert_mmx_register
4343
	call	convert_mmx_register
4560
	mov	bl,al
4344
	mov	bl,al
4561
	call	store_nomem_instruction
4345
	jmp	nomem_instruction_ready
4562
	jmp	instruction_assembled
-
 
4563
mmx_ps_instruction:
4346
mmx_ps_instruction:
4564
	mov	[base_code],0Fh
4347
	mov	[base_code],0Fh
4565
	mov	[extended_code],al
4348
	mov	[extended_code],al
4566
	lods	byte [esi]
4349
	lods	byte [esi]
4567
	call	get_size_operator
4350
	call	get_size_operator
4568
	cmp	al,10h
4351
	cmp	al,10h
Line 4627... Line 4410...
4627
	mov	bl,al
4410
	mov	bl,al
4628
	call	make_mmx_prefix
4411
	call	make_mmx_prefix
4629
	cmp	[extended_code],0C5h
4412
	cmp	[extended_code],0C5h
4630
	je	mmx_nomem_imm8
4413
	je	mmx_nomem_imm8
4631
	call	store_nomem_instruction
4414
	jmp	nomem_instruction_ready
4632
	jmp	instruction_assembled
-
 
4633
      mmx_imm8:
4415
      mmx_imm8:
4634
	push	ebx ecx edx
4416
	push	ebx ecx edx
4635
	mov	[operand_size],0
4417
	mov	[operand_size],0
4636
	lods	byte [esi]
4418
	lods	byte [esi]
4637
	cmp	al,','
4419
	cmp	al,','
4638
	jne	invalid_operand
4420
	jne	invalid_operand
Line 4757... Line 4539...
4757
	lods	byte [esi]
4539
	lods	byte [esi]
4758
	call	convert_mmx_register
4540
	call	convert_mmx_register
4759
	call	make_mmx_prefix
4541
	call	make_mmx_prefix
4760
	mov	[postbyte_register],al
4542
	mov	[postbyte_register],al
4761
	call	store_instruction
4543
	jmp	instruction_ready
4762
	jmp	instruction_assembled
-
 
4763
      movd_reg:
4544
      movd_reg:
4764
	lods	byte [esi]
4545
	lods	byte [esi]
4765
	cmp	al,0B0h
4546
	cmp	al,0B0h
4766
	jae	movd_mmreg
4547
	jae	movd_mmreg
4767
	call	convert_register
4548
	call	convert_register
4768
	cmp	ah,4
4549
	cmp	ah,4
Line 4779... Line 4560...
4779
	lods	byte [esi]
4560
	lods	byte [esi]
4780
	call	convert_mmx_register
4561
	call	convert_mmx_register
4781
	mov	[postbyte_register],al
4562
	mov	[postbyte_register],al
4782
	call	make_mmx_prefix
4563
	call	make_mmx_prefix
4783
	call	store_nomem_instruction
4564
	jmp	nomem_instruction_ready
4784
	jmp	instruction_assembled
-
 
4785
      movd_mmreg:
4565
      movd_mmreg:
4786
	mov	[extended_code],6Eh
4566
	mov	[extended_code],6Eh
4787
	call	convert_mmx_register
4567
	call	convert_mmx_register
4788
	call	make_mmx_prefix
4568
	call	make_mmx_prefix
4789
	mov	[postbyte_register],al
4569
	mov	[postbyte_register],al
4790
	mov	[operand_size],0
4570
	mov	[operand_size],0
Line 4799... Line 4579...
4799
	jne	invalid_operand
4579
	jne	invalid_operand
4800
	call	get_address
4580
	call	get_address
4801
	test	[operand_size],not 4
4581
	test	[operand_size],not 4
4802
	jnz	invalid_operand_size
4582
	jnz	invalid_operand_size
4803
	call	store_instruction
4583
	jmp	instruction_ready
4804
	jmp	instruction_assembled
-
 
4805
      movd_mmreg_reg:
4584
      movd_mmreg_reg:
4806
	lods	byte [esi]
4585
	lods	byte [esi]
4807
	call	convert_register
4586
	call	convert_register
4808
	cmp	ah,4
4587
	cmp	ah,4
4809
	jne	invalid_operand_size
4588
	jne	invalid_operand_size
4810
	mov	bl,al
4589
	mov	bl,al
4811
	call	store_nomem_instruction
4590
	jmp	nomem_instruction_ready
4812
	jmp	instruction_assembled
-
 
4813
      make_mmx_prefix:
4591
      make_mmx_prefix:
4814
	cmp	[operand_size],16
4592
	cmp	[operand_size],16
4815
	jne	no_mmx_prefix
4593
	jne	no_mmx_prefix
4816
	mov	[operand_prefix],66h
4594
	mov	[operand_prefix],66h
4817
      no_mmx_prefix:
4595
      no_mmx_prefix:
4818
	ret
4596
	ret
Line 4839... Line 4617...
4839
	mov	[postbyte_register],al
4617
	mov	[postbyte_register],al
4840
	cmp	ah,16
4618
	cmp	ah,16
4841
	je	movq_mem_xmmreg
4619
	je	movq_mem_xmmreg
4842
	mov	[extended_code],7Fh
4620
	mov	[extended_code],7Fh
4843
	call	store_instruction
4621
	jmp	instruction_ready
4844
	jmp	instruction_assembled
-
 
4845
     movq_mem_xmmreg:
4622
     movq_mem_xmmreg:
4846
	mov	[extended_code],0D6h
4623
	mov	[extended_code],0D6h
4847
	mov	[opcode_prefix],66h
4624
	mov	[opcode_prefix],66h
4848
	call	store_instruction
4625
	jmp	instruction_ready
4849
	jmp	instruction_assembled
-
 
4850
     movq_reg:
4626
     movq_reg:
4851
	lods	byte [esi]
4627
	lods	byte [esi]
4852
	cmp	al,0B0h
4628
	cmp	al,0B0h
4853
	jae	movq_mmreg
4629
	jae	movq_mmreg
4854
	call	convert_register
4630
	call	convert_register
4855
	cmp	ah,8
4631
	cmp	ah,8
Line 4868... Line 4644...
4868
	mov	[postbyte_register],al
4644
	mov	[postbyte_register],al
4869
	call	make_mmx_prefix
4645
	call	make_mmx_prefix
4870
	mov	[extended_code],7Eh
4646
	mov	[extended_code],7Eh
4871
	call	operand_64bit
4647
	call	operand_64bit
4872
	call	store_nomem_instruction
4648
	jmp	nomem_instruction_ready
4873
	jmp	instruction_assembled
-
 
4874
     movq_mmreg:
4649
     movq_mmreg:
4875
	call	convert_mmx_register
4650
	call	convert_mmx_register
4876
	mov	[postbyte_register],al
4651
	mov	[postbyte_register],al
4877
	mov	[extended_code],6Fh
4652
	mov	[extended_code],6Fh
4878
	mov	[mmx_size],ah
4653
	mov	[mmx_size],ah
4879
	cmp	ah,16
4654
	cmp	ah,16
Line 4891... Line 4666...
4891
	je	movq_mmreg_reg
4666
	je	movq_mmreg_reg
4892
	call	get_address
4667
	call	get_address
4893
	test	[operand_size],not 8
4668
	test	[operand_size],not 8
4894
	jnz	invalid_operand_size
4669
	jnz	invalid_operand_size
4895
	call	store_instruction
4670
	jmp	instruction_ready
4896
	jmp	instruction_assembled
-
 
4897
      movq_mmreg_reg:
4671
      movq_mmreg_reg:
4898
	lods	byte [esi]
4672
	lods	byte [esi]
4899
	cmp	al,0B0h
4673
	cmp	al,0B0h
4900
	jae	movq_mmreg_mmreg
4674
	jae	movq_mmreg_mmreg
4901
	mov	[operand_size],0
4675
	mov	[operand_size],0
4902
	call	convert_register
4676
	call	convert_register
Line 4909... Line 4683...
4909
	jne	movq_mmreg_reg_store
4683
	jne	movq_mmreg_reg_store
4910
	mov	[opcode_prefix],66h
4684
	mov	[opcode_prefix],66h
4911
      movq_mmreg_reg_store:
4685
      movq_mmreg_reg_store:
4912
	call	operand_64bit
4686
	call	operand_64bit
4913
	call	store_nomem_instruction
4687
	jmp	nomem_instruction_ready
4914
	jmp	instruction_assembled
-
 
4915
      movq_mmreg_mmreg:
4688
      movq_mmreg_mmreg:
4916
	call	convert_mmx_register
4689
	call	convert_mmx_register
4917
	cmp	ah,[mmx_size]
4690
	cmp	ah,[mmx_size]
4918
	jne	invalid_operand_size
4691
	jne	invalid_operand_size
4919
	mov	bl,al
4692
	mov	bl,al
4920
	call	store_nomem_instruction
4693
	jmp	nomem_instruction_ready
4921
	jmp	instruction_assembled
-
 
4922
movdq_instruction:
4694
movdq_instruction:
4923
	mov	[opcode_prefix],al
4695
	mov	[opcode_prefix],al
4924
	mov	[base_code],0Fh
4696
	mov	[base_code],0Fh
4925
	mov	[extended_code],6Fh
4697
	mov	[extended_code],6Fh
4926
	lods	byte [esi]
4698
	lods	byte [esi]
4927
	call	get_size_operator
4699
	call	get_size_operator
Line 4942... Line 4714...
4942
	cmp	ah,16
4714
	cmp	ah,16
4943
	jne	invalid_operand_size
4715
	jne	invalid_operand_size
4944
	mov	[postbyte_register],al
4716
	mov	[postbyte_register],al
4945
	mov	[extended_code],7Fh
4717
	mov	[extended_code],7Fh
4946
	call	store_instruction
4718
	jmp	instruction_ready
4947
	jmp	instruction_assembled
-
 
4948
      movdq_mmreg:
4719
      movdq_mmreg:
4949
	lods	byte [esi]
4720
	lods	byte [esi]
4950
	call	convert_mmx_register
4721
	call	convert_mmx_register
4951
	cmp	ah,16
4722
	cmp	ah,16
4952
	jne	invalid_operand_size
4723
	jne	invalid_operand_size
4953
	mov	[postbyte_register],al
4724
	mov	[postbyte_register],al
Line 4960... Line 4731...
4960
	je	movdq_mmreg_mmreg
4731
	je	movdq_mmreg_mmreg
4961
	cmp	al,'['
4732
	cmp	al,'['
4962
	jne	invalid_operand
4733
	jne	invalid_operand
4963
	call	get_address
4734
	call	get_address
4964
	call	store_instruction
4735
	jmp	instruction_ready
4965
	jmp	instruction_assembled
-
 
4966
      movdq_mmreg_mmreg:
4736
      movdq_mmreg_mmreg:
4967
	lods	byte [esi]
4737
	lods	byte [esi]
4968
	call	convert_mmx_register
4738
	call	convert_mmx_register
4969
	cmp	ah,16
4739
	cmp	ah,16
4970
	jne	invalid_operand_size
4740
	jne	invalid_operand_size
4971
	mov	bl,al
4741
	mov	bl,al
4972
	call	store_nomem_instruction
4742
	jmp	nomem_instruction_ready
4973
	jmp	instruction_assembled
-
 
4974
lddqu_instruction:
4743
lddqu_instruction:
4975
	lods	byte [esi]
4744
	lods	byte [esi]
4976
	call	get_size_operator
4745
	call	get_size_operator
4977
	cmp	al,10h
4746
	cmp	al,10h
4978
	jne	invalid_operand
4747
	jne	invalid_operand
4979
	lods	byte [esi]
4748
	lods	byte [esi]
Line 4993... Line 4762...
4993
	mov	[postbyte_register],al
4762
	mov	[postbyte_register],al
4994
	mov	[opcode_prefix],0F2h
4763
	mov	[opcode_prefix],0F2h
4995
	mov	[base_code],0Fh
4764
	mov	[base_code],0Fh
4996
	mov	[extended_code],0F0h
4765
	mov	[extended_code],0F0h
4997
	call	store_instruction
4766
	jmp	instruction_ready
4998
	jmp	instruction_assembled
-
 
4999
movq2dq_instruction:
4767
movq2dq_instruction:
5000
	lods	byte [esi]
4768
	lods	byte [esi]
5001
	call	get_size_operator
4769
	call	get_size_operator
5002
	cmp	al,10h
4770
	cmp	al,10h
5003
	jne	invalid_operand
4771
	jne	invalid_operand
5004
	lods	byte [esi]
4772
	lods	byte [esi]
Line 5021... Line 4789...
5021
	mov	bl,al
4789
	mov	bl,al
5022
	mov	[opcode_prefix],0F3h
4790
	mov	[opcode_prefix],0F3h
5023
	mov	[base_code],0Fh
4791
	mov	[base_code],0Fh
5024
	mov	[extended_code],0D6h
4792
	mov	[extended_code],0D6h
5025
	call	store_nomem_instruction
4793
	jmp	nomem_instruction_ready
5026
	jmp	instruction_assembled
-
 
5027
movdq2q_instruction:
4794
movdq2q_instruction:
5028
	lods	byte [esi]
4795
	lods	byte [esi]
5029
	call	get_size_operator
4796
	call	get_size_operator
5030
	cmp	al,10h
4797
	cmp	al,10h
5031
	jne	invalid_operand
4798
	jne	invalid_operand
5032
	lods	byte [esi]
4799
	lods	byte [esi]
Line 5049... Line 4816...
5049
	mov	bl,al
4816
	mov	bl,al
5050
	mov	[opcode_prefix],0F2h
4817
	mov	[opcode_prefix],0F2h
5051
	mov	[base_code],0Fh
4818
	mov	[base_code],0Fh
5052
	mov	[extended_code],0D6h
4819
	mov	[extended_code],0D6h
5053
	call	store_nomem_instruction
4820
	jmp	nomem_instruction_ready
5054
	jmp	instruction_assembled
-
 
5055
 
4821
 
Line 5056... Line 4822...
5056
sse_ps_instruction_imm8:
4822
sse_ps_instruction_imm8:
5057
	mov	[immediate_size],8
4823
	mov	[immediate_size],8
5058
sse_ps_instruction:
4824
sse_ps_instruction:
5059
	mov	[mmx_size],16
4825
	mov	[mmx_size],16
Line 5126... Line 4892...
5126
	cmp	[immediate_size],-1
4892
	cmp	[immediate_size],-1
5127
	jne	sse_ok
4893
	jne	sse_ok
5128
	call	take_additional_xmm0
4894
	call	take_additional_xmm0
5129
      sse_ok:
4895
      sse_ok:
5130
	call	store_instruction
4896
	jmp	instruction_ready
5131
	jmp	instruction_assembled
-
 
5132
      sse_xmmreg_xmmreg:
4897
      sse_xmmreg_xmmreg:
5133
	cmp	[operand_prefix],66h
4898
	cmp	[operand_prefix],66h
5134
	jne	sse_xmmreg_xmmreg_ok
4899
	jne	sse_xmmreg_xmmreg_ok
5135
	cmp	[extended_code],12h
4900
	cmp	[extended_code],12h
5136
	je	invalid_operand
4901
	je	invalid_operand
5137
	cmp	[extended_code],16h
4902
	cmp	[extended_code],16h
Line 5147... Line 4912...
5147
	cmp	[immediate_size],-1
4912
	cmp	[immediate_size],-1
5148
	jne	sse_nomem_ok
4913
	jne	sse_nomem_ok
5149
	call	take_additional_xmm0
4914
	call	take_additional_xmm0
5150
      sse_nomem_ok:
4915
      sse_nomem_ok:
5151
	call	store_nomem_instruction
4916
	jmp	nomem_instruction_ready
5152
	jmp	instruction_assembled
-
 
5153
      take_additional_xmm0:
4917
      take_additional_xmm0:
5154
	lods	byte [esi]
4918
	lods	byte [esi]
5155
	cmp	al,','
4919
	cmp	al,','
5156
	jne	invalid_operand
4920
	jne	invalid_operand
5157
	lods	byte [esi]
4921
	lods	byte [esi]
5158
	cmp	al,10h
4922
	cmp	al,10h
Line 5232... Line 4996...
5232
	call	convert_mmx_register
4996
	call	convert_mmx_register
5233
	cmp	ah,16
4997
	cmp	ah,16
5234
	jne	invalid_operand_size
4998
	jne	invalid_operand_size
5235
	mov	[postbyte_register],al
4999
	mov	[postbyte_register],al
5236
	call	store_instruction
5000
	jmp	instruction_ready
5237
	jmp	instruction_assembled
-
 
5238
movlpd_instruction:
5001
movlpd_instruction:
5239
	mov	[opcode_prefix],66h
5002
	mov	[opcode_prefix],66h
5240
movlps_instruction:
5003
movlps_instruction:
5241
	mov	[base_code],0Fh
5004
	mov	[base_code],0Fh
5242
	mov	[extended_code],al
5005
	mov	[extended_code],al
5243
	mov	[mmx_size],8
5006
	mov	[mmx_size],8
Line 5305... Line 5068...
5305
	jne	invalid_operand
5068
	jne	invalid_operand
5306
	lods	byte [esi]
5069
	lods	byte [esi]
5307
	call	convert_mmx_register
5070
	call	convert_mmx_register
5308
	mov	bl,al
5071
	mov	bl,al
5309
	call	store_nomem_instruction
5072
	jmp	nomem_instruction_ready
5310
	jmp	instruction_assembled
-
 
5311
movmskpd_instruction:
5073
movmskpd_instruction:
5312
	mov	[opcode_prefix],66h
5074
	mov	[opcode_prefix],66h
5313
movmskps_instruction:
5075
movmskps_instruction:
5314
	mov	[base_code],0Fh
5076
	mov	[base_code],0Fh
5315
	mov	[extended_code],50h
5077
	mov	[extended_code],50h
5316
	lods	byte [esi]
5078
	lods	byte [esi]
Line 5334... Line 5096...
5334
	call	convert_mmx_register
5096
	call	convert_mmx_register
5335
	cmp	ah,16
5097
	cmp	ah,16
5336
	jne	invalid_operand_size
5098
	jne	invalid_operand_size
5337
	mov	bl,al
5099
	mov	bl,al
5338
	call	store_nomem_instruction
5100
	jmp	nomem_instruction_ready
5339
	jmp	instruction_assembled
-
 
5340
cmppd_instruction:
5101
cmppd_instruction:
5341
	mov	[opcode_prefix],66h
5102
	mov	[opcode_prefix],66h
5342
cmpps_instruction:
5103
cmpps_instruction:
5343
	mov	[base_code],0Fh
5104
	mov	[base_code],0Fh
5344
	mov	[extended_code],0C2h
5105
	mov	[extended_code],0C2h
5345
	mov	[mmx_size],16
5106
	mov	[mmx_size],16
Line 5473... Line 5234...
5473
	je	cvtpi_size_ok
5234
	je	cvtpi_size_ok
5474
	cmp	[operand_size],8
5235
	cmp	[operand_size],8
5475
	jne	invalid_operand_size
5236
	jne	invalid_operand_size
5476
      cvtpi_size_ok:
5237
      cvtpi_size_ok:
5477
	call	store_instruction
5238
	jmp	instruction_ready
5478
	jmp	instruction_assembled
-
 
5479
      cvtpi_xmmreg_xmmreg:
5239
      cvtpi_xmmreg_xmmreg:
5480
	lods	byte [esi]
5240
	lods	byte [esi]
5481
	call	convert_mmx_register
5241
	call	convert_mmx_register
5482
	cmp	ah,8
5242
	cmp	ah,8
5483
	jne	invalid_operand_size
5243
	jne	invalid_operand_size
5484
	mov	bl,al
5244
	mov	bl,al
5485
	call	store_nomem_instruction
5245
	jmp	nomem_instruction_ready
5486
	jmp	instruction_assembled
-
 
5487
cvtsi2ss_instruction:
5246
cvtsi2ss_instruction:
5488
	mov	[opcode_prefix],0F3h
5247
	mov	[opcode_prefix],0F3h
5489
	jmp	cvtsi_instruction
5248
	jmp	cvtsi_instruction
5490
cvtsi2sd_instruction:
5249
cvtsi2sd_instruction:
5491
	mov	[opcode_prefix],0F2h
5250
	mov	[opcode_prefix],0F2h
5492
      cvtsi_instruction:
5251
      cvtsi_instruction:
Line 5516... Line 5275...
5516
	je	cvtsi_size_ok
5275
	je	cvtsi_size_ok
5517
	cmp	[operand_size],4
5276
	cmp	[operand_size],4
5518
	jne	invalid_operand_size
5277
	jne	invalid_operand_size
5519
      cvtsi_size_ok:
5278
      cvtsi_size_ok:
5520
	call	store_instruction
5279
	jmp	instruction_ready
5521
	jmp	instruction_assembled
-
 
5522
      cvtsi_xmmreg_reg:
5280
      cvtsi_xmmreg_reg:
5523
	lods	byte [esi]
5281
	lods	byte [esi]
5524
	call	convert_register
5282
	call	convert_register
5525
	cmp	ah,4
5283
	cmp	ah,4
5526
	je	cvtsi_xmmreg_reg_store
5284
	je	cvtsi_xmmreg_reg_store
5527
	cmp	ah,8
5285
	cmp	ah,8
5528
	jne	invalid_operand_size
5286
	jne	invalid_operand_size
5529
	call	operand_64bit
5287
	call	operand_64bit
5530
      cvtsi_xmmreg_reg_store:
5288
      cvtsi_xmmreg_reg_store:
5531
	mov	bl,al
5289
	mov	bl,al
5532
	call	store_nomem_instruction
5290
	jmp	nomem_instruction_ready
5533
	jmp	instruction_assembled
-
 
5534
cvtps2pi_instruction:
5291
cvtps2pi_instruction:
5535
	mov	[mmx_size],8
5292
	mov	[mmx_size],8
5536
	jmp	cvtpd_instruction
5293
	jmp	cvtpd_instruction
5537
cvtpd2pi_instruction:
5294
cvtpd2pi_instruction:
5538
	mov	[opcode_prefix],66h
5295
	mov	[opcode_prefix],66h
5539
	mov	[mmx_size],16
5296
	mov	[mmx_size],16
Line 5944... Line 5701...
5944
	je	mmx_imm8
5701
	je	mmx_imm8
5945
	mov	al,[mmx_size]
5702
	mov	al,[mmx_size]
5946
	cmp	al,[operand_size]
5703
	cmp	al,[operand_size]
5947
	jne	invalid_operand_size
5704
	jne	invalid_operand_size
5948
	call	store_instruction
5705
	jmp	instruction_ready
5949
	jmp	instruction_assembled
-
 
5950
      pmovsx_xmmreg_reg:
5706
      pmovsx_xmmreg_reg:
5951
	lods	byte [esi]
5707
	lods	byte [esi]
5952
	call	convert_mmx_register
5708
	call	convert_mmx_register
5953
	cmp	ah,16
5709
	cmp	ah,16
5954
	jne	invalid_operand_size
5710
	jne	invalid_operand_size
5955
	mov	bl,al
5711
	mov	bl,al
5956
	call	store_nomem_instruction
5712
	jmp	nomem_instruction_ready
5957
	jmp	instruction_assembled
-
 
5958
 
5713
 
Line 5959... Line 5714...
5959
fxsave_instruction:
5714
fxsave_instruction:
5960
	mov	[extended_code],0AEh
5715
	mov	[extended_code],0AEh
5961
	mov	[base_code],0Fh
5716
	mov	[base_code],0Fh
5962
	mov	[postbyte_register],al
5717
	mov	[postbyte_register],al
Line 5981... Line 5736...
5981
      clflush_size_check:
5736
      clflush_size_check:
5982
	cmp	ah,1
5737
	cmp	ah,1
5983
	jne	invalid_operand_size
5738
	jne	invalid_operand_size
5984
      fxsave_size_ok:
5739
      fxsave_size_ok:
5985
	call	store_instruction
5740
	jmp	instruction_ready
5986
	jmp	instruction_assembled
-
 
5987
prefetch_instruction:
5741
prefetch_instruction:
5988
	mov	[extended_code],18h
5742
	mov	[extended_code],18h
5989
      prefetch_mem_8bit:
5743
      prefetch_mem_8bit:
5990
	mov	[base_code],0Fh
5744
	mov	[base_code],0Fh
5991
	mov	[postbyte_register],al
5745
	mov	[postbyte_register],al
5992
	lods	byte [esi]
5746
	lods	byte [esi]
Line 5998... Line 5752...
5998
	cmp	ah,1
5752
	cmp	ah,1
5999
	jne	invalid_operand_size
5753
	jne	invalid_operand_size
6000
      prefetch_size_ok:
5754
      prefetch_size_ok:
6001
	call	get_address
5755
	call	get_address
6002
	call	store_instruction
5756
	jmp	instruction_ready
6003
	jmp	instruction_assembled
-
 
6004
amd_prefetch_instruction:
5757
amd_prefetch_instruction:
6005
	mov	[extended_code],0Dh
5758
	mov	[extended_code],0Dh
6006
	jmp	prefetch_mem_8bit
5759
	jmp	prefetch_mem_8bit
6007
fence_instruction:
5760
fence_instruction:
6008
	mov	bl,al
5761
	mov	bl,al
6009
	mov	ax,0AE0Fh
5762
	mov	ax,0AE0Fh
Line 6043... Line 5796...
6043
	call	convert_mmx_register
5796
	call	convert_mmx_register
6044
	cmp	ah,[mmx_size]
5797
	cmp	ah,[mmx_size]
6045
	jne	invalid_operand_size
5798
	jne	invalid_operand_size
6046
	mov	[postbyte_register],al
5799
	mov	[postbyte_register],al
6047
	call	store_instruction
5800
	jmp	instruction_ready
6048
	jmp	instruction_assembled
-
 
6049
 
5801
 
Line 6050... Line 5802...
6050
movntsd_instruction:
5802
movntsd_instruction:
6051
	mov	[opcode_prefix],0F2h
5803
	mov	[opcode_prefix],0F2h
6052
	mov	[mmx_size],8
5804
	mov	[mmx_size],8
6053
	jmp	movnts_instruction
5805
	jmp	movnts_instruction
Line 6080... Line 5832...
6080
	call	convert_mmx_register
5832
	call	convert_mmx_register
6081
	cmp	ah,16
5833
	cmp	ah,16
6082
	jne	invalid_operand_size
5834
	jne	invalid_operand_size
6083
	mov	[postbyte_register],al
5835
	mov	[postbyte_register],al
6084
	call	store_instruction
5836
	jmp	instruction_ready
6085
	jmp	instruction_assembled
-
 
6086
 
5837
 
Line 6087... Line 5838...
6087
movnti_instruction:
5838
movnti_instruction:
6088
	mov	[base_code],0Fh
5839
	mov	[base_code],0Fh
6089
	mov	[extended_code],al
5840
	mov	[extended_code],al
6090
	lods	byte [esi]
5841
	lods	byte [esi]
Line 6107... Line 5858...
6107
	jne	invalid_operand_size
5858
	jne	invalid_operand_size
6108
	call	operand_64bit
5859
	call	operand_64bit
6109
      movnti_store:
5860
      movnti_store:
6110
	mov	[postbyte_register],al
5861
	mov	[postbyte_register],al
6111
	call	store_instruction
5862
	jmp	instruction_ready
6112
	jmp	instruction_assembled
-
 
6113
monitor_instruction:
5863
monitor_instruction:
6114
	mov	[postbyte_register],al
5864
	mov	[postbyte_register],al
6115
	lods	byte [esi]
5865
	lods	byte [esi]
6116
	call	get_size_operator
5866
	call	get_size_operator
6117
	cmp	al,10h
5867
	cmp	al,10h
6118
	jne	invalid_operand
5868
	jne	invalid_operand
Line 6171... Line 5921...
6171
	call	get_size_operator
5921
	call	get_size_operator
6172
	cmp	al,'['
5922
	cmp	al,'['
6173
	jne	invalid_operand
5923
	jne	invalid_operand
6174
	call	get_address
5924
	call	get_address
6175
	call	store_instruction
5925
	jmp	instruction_ready
6176
	jmp	instruction_assembled
-
 
6177
 
5926
 
Line 6178... Line 5927...
6178
extrq_instruction:
5927
extrq_instruction:
6179
	mov	[opcode_prefix],66h
5928
	mov	[opcode_prefix],66h
6180
	mov	[base_code],0Fh
5929
	mov	[base_code],0Fh
6181
	mov	[extended_code],78h
5930
	mov	[extended_code],78h
Line 6212... Line 5961...
6212
	call	convert_mmx_register
5961
	call	convert_mmx_register
6213
	cmp	ah,16
5962
	cmp	ah,16
6214
	jne	invalid_operand_size
5963
	jne	invalid_operand_size
6215
	mov	bl,al
5964
	mov	bl,al
6216
	call	store_nomem_instruction
5965
	jmp	nomem_instruction_ready
6217
	jmp	instruction_assembled
-
 
6218
insertq_instruction:
5966
insertq_instruction:
6219
	mov	[opcode_prefix],0F2h
5967
	mov	[opcode_prefix],0F2h
6220
	mov	[base_code],0Fh
5968
	mov	[base_code],0Fh
6221
	mov	[extended_code],78h
5969
	mov	[extended_code],78h
6222
	lods	byte [esi]
5970
	lods	byte [esi]
6223
	call	get_size_operator
5971
	call	get_size_operator
Line 6243... Line 5991...
6243
	mov	bl,al
5991
	mov	bl,al
6244
	cmp	byte [esi],','
5992
	cmp	byte [esi],','
6245
	je	insertq_with_imm
5993
	je	insertq_with_imm
6246
	inc	[extended_code]
5994
	inc	[extended_code]
6247
	call	store_nomem_instruction
5995
	jmp	nomem_instruction_ready
6248
	jmp	instruction_assembled
-
 
6249
      insertq_with_imm:
5996
      insertq_with_imm:
6250
	call	store_nomem_instruction
5997
	call	store_nomem_instruction
6251
	call	append_imm8
5998
	call	append_imm8
6252
	call	append_imm8
5999
	call	append_imm8
6253
	jmp	instruction_assembled
6000
	jmp	instruction_assembled
6254
 
6001
 
Line 6288... Line 6035...
6288
	ja	invalid_operand_size
6035
	ja	invalid_operand_size
6289
	inc	[supplemental_code]
6036
	inc	[supplemental_code]
6290
	call	operand_autodetect
6037
	call	operand_autodetect
6291
      crc32_reg32_mem_store:
6038
      crc32_reg32_mem_store:
6292
	call	store_instruction
6039
	jmp	instruction_ready
6293
	jmp	instruction_assembled
-
 
6294
      crc32_unknown_size:
6040
      crc32_unknown_size:
6295
	cmp	[error_line],0
6041
	cmp	[error_line],0
6296
	jne	crc32_reg32_mem_store
6042
	jne	crc32_reg32_mem_store
6297
	mov	eax,[current_line]
6043
	mov	eax,[current_line]
6298
	mov	[error_line],eax
6044
	mov	[error_line],eax
6299
	mov	[error],operand_size_not_specified
6045
	mov	[error],operand_size_not_specified
Line 6309... Line 6055...
6309
	ja	invalid_operand_size
6055
	ja	invalid_operand_size
6310
	inc	[supplemental_code]
6056
	inc	[supplemental_code]
6311
	call	operand_autodetect
6057
	call	operand_autodetect
6312
      crc32_reg32_reg_store:
6058
      crc32_reg32_reg_store:
6313
	call	store_nomem_instruction
6059
	jmp	nomem_instruction_ready
6314
	jmp	instruction_assembled
-
 
6315
      crc32_reg64:
6060
      crc32_reg64:
6316
	lods	byte [esi]
6061
	lods	byte [esi]
6317
	cmp	al,','
6062
	cmp	al,','
6318
	jne	invalid_operand
6063
	jne	invalid_operand
6319
	mov	[operand_size],0
6064
	mov	[operand_size],0
6320
	lods	byte [esi]
6065
	lods	byte [esi]
Line 6375... Line 6120...
6375
	cmp	al,8
6120
	cmp	al,8
6376
	jne	invalid_operand_size
6121
	jne	invalid_operand_size
6377
      vmx_size_ok:
6122
      vmx_size_ok:
6378
	mov	[base_code],0Fh
6123
	mov	[base_code],0Fh
6379
	call	store_instruction
6124
	jmp	instruction_ready
6380
	jmp	instruction_assembled
-
 
6381
vmread_instruction:
6125
vmread_instruction:
6382
	mov	[extended_code],78h
6126
	mov	[extended_code],78h
6383
	lods	byte [esi]
6127
	lods	byte [esi]
6384
	call	get_size_operator
6128
	call	get_size_operator
6385
	cmp	al,10h
6129
	cmp	al,10h
6386
	je	vmread_nomem
6130
	je	vmread_nomem
Line 6419... Line 6163...
6419
	mov	[postbyte_register],al
6163
	mov	[postbyte_register],al
6420
	call	vmread_check_size
6164
	call	vmread_check_size
6421
	pop	ebx
6165
	pop	ebx
6422
	mov	[base_code],0Fh
6166
	mov	[base_code],0Fh
6423
	call	store_nomem_instruction
6167
	jmp	nomem_instruction_ready
6424
	jmp	instruction_assembled
-
 
6425
      vmread_check_size:
6168
      vmread_check_size:
6426
	cmp	[code_type],64
6169
	cmp	[code_type],64
6427
	je	vmread_long
6170
	je	vmread_long
6428
	cmp	[operand_size],4
6171
	cmp	[operand_size],4
6429
	jne	invalid_operand_size
6172
	jne	invalid_operand_size
6430
	ret
6173
	ret
Line 6459... Line 6202...
6459
	lods	byte [esi]
6202
	lods	byte [esi]
6460
	call	convert_register
6203
	call	convert_register
6461
	mov	bl,al
6204
	mov	bl,al
6462
	mov	[base_code],0Fh
6205
	mov	[base_code],0Fh
6463
	call	store_nomem_instruction
6206
	jmp	nomem_instruction_ready
6464
	jmp	instruction_assembled
-
 
6465
simple_svm_instruction:
6207
simple_svm_instruction:
6466
	push	eax
6208
	push	eax
6467
	mov	[base_code],0Fh
6209
	mov	[base_code],0Fh
6468
	mov	[extended_code],1
6210
	mov	[extended_code],1
6469
	lods	byte [esi]
6211
	lods	byte [esi]
6470
	call	get_size_operator
6212
	call	get_size_operator
Line 6833... Line 6575...
6833
	cmp	[code_type],64
6575
	cmp	[code_type],64
6834
	je	invalid_address_size
6576
	je	invalid_address_size
6835
	call	address_16bit_prefix
6577
	call	address_16bit_prefix
6836
	call	store_instruction_code
6578
	call	store_instruction_code
6837
	cmp	bx,2326h
6579
	cmp	bl,bh
6838
	je	address_bx_si
-
 
6839
	cmp	bx,2623h
-
 
6840
	je	address_bx_si
6580
	jbe	determine_16bit_address
6841
	cmp	bx,2327h
-
 
6842
	je	address_bx_di
-
 
6843
	cmp	bx,2723h
-
 
6844
	je	address_bx_di
-
 
6845
	cmp	bx,2526h
-
 
6846
	je	address_bp_si
-
 
6847
	cmp	bx,2625h
-
 
6848
	je	address_bp_si
-
 
6849
	cmp	bx,2527h
6581
	xchg	bl,bh
6850
	je	address_bp_di
-
 
6851
	cmp	bx,2725h
-
 
6852
	je	address_bp_di
6582
      determine_16bit_address:
6853
	cmp	bx,2600h
6583
	cmp	bx,2600h
6854
	je	address_si
6584
	je	address_si
6855
	cmp	bx,2700h
6585
	cmp	bx,2700h
6856
	je	address_di
6586
	je	address_di
6857
	cmp	bx,2300h
6587
	cmp	bx,2300h
6858
	je	address_bx
6588
	je	address_bx
6859
	cmp	bx,2500h
6589
	cmp	bx,2500h
6860
	je	address_bp
6590
	je	address_bp
6861
	jmp	invalid_address
6591
	cmp	bx,2625h
-
 
6592
	je	address_bp_si
-
 
6593
	cmp	bx,2725h
-
 
6594
	je	address_bp_di
-
 
6595
	cmp	bx,2723h
-
 
6596
	je	address_bx_di
-
 
6597
	cmp	bx,2623h
-
 
6598
	jne	invalid_address
6862
      address_bx_si:
6599
      address_bx_si:
6863
	xor	al,al
6600
	xor	al,al
6864
	jmp	postbyte_16bit
6601
	jmp	postbyte_16bit
6865
      address_bx_di:
6602
      address_bx_di:
6866
	mov	al,1
6603
	mov	al,1
6867
	jmp	postbyte_16bit
6604
	jmp	postbyte_16bit