Codebase list fasm / 0d88091
Update upstream source from tag 'upstream/1.73.19' Update to upstream version '1.73.19' with Debian dir 9a5ea9f543917e79cb0a03769f3553841723ff36 Tomasz Buchert 4 years ago
9 changed file(s) with 300 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
Binary diff not shown
32493249 vscatterdps [eax+xmm1]{k1},xmm0 ; scatter four floats
32503250 vscatterdpd [ymm3*8]{k3},zmm0 ; scatter eight doubles
32513251
3252 The AVX512_4VNNI extension introduces instructions with another unusual
3253 syntax variant. The first source operand of "vp4dpwssd" or "vp4dpwssds"
3254 instruction refers to an aligned block of four 512-bit registers, containing
3255 the base register specified by the operand. This can be indicated by attaching
3256 "+3" to the name of register, although it is optional.
3257
3258 vp4dpwssd zmm1{k1}{z},zmm2+3,xword[rbx]
3259
32523260
32533261 2.1.25 Other extensions of instruction set
32543262
32553263 There is a number of additional instruction set extensions recognized by flat
3256 assembler, and the general syntax of the instructions introduced by those
3257 extensions is provided here. For a detailed information on the operations
3258 performed by them, check out the manuals from Intel (for the VMX, SMX, XSAVE,
3259 RDRAND, FSGSBASE, INVPCID, HLE, RTM, and MPX extensions) or AMD (for the SVM
3260 extension).
3264 assembler, and examples of syntax of the instructions introduced by those
3265 extensions are provided here. For a detailed information on the operations
3266 performed by them, check out the manuals from Intel or AMD.
32613267 The Virtual-Machine Extensions (VMX) provide a set of instructions for the
32623268 management of virtual machines. The "vmxon" instruction, which enters the VMX
32633269 operation, requires a single 64-bit memory operand, which should be a physical
36763682 constant.
36773683 Instead of or in addition to an "at" argument, "virtual" can also be followed
36783684 by an "as" keyword and a string defining an extension of additional file where
3679 the initialized content of the block is going to be stored at the end of
3680 a successful assembly.
3685 the initialized content of the addressing space started by "virtual" is going
3686 to be stored at the end of a successful assembly.
36813687
36823688 virtual at 0 as 'asc'
36833689 times 256 db %-1
Binary diff not shown
107107 or [rex_prefix],80h
108108 mov ch,8
109109 jmp avx_pi_instruction
110 avx_single_source_d_instruction_38_evex_w1:
111 or [rex_prefix],8
110112 avx_single_source_d_instruction_38_evex:
111113 or [vex_required],8
112114 avx_single_source_d_instruction_38:
133135 avx_d_instruction:
134136 mov ch,4
135137 jmp avx_pi_instruction
138 avx_bw_instruction_3a_imm8_w1_evex:
139 or [rex_prefix],8
140 avx_bw_instruction_3a_imm8_evex:
141 mov [immediate_size],1
142 or [vex_required],8
143 mov [supplemental_code],al
144 mov al,3Ah
145 jmp avx_bw_instruction
136146 avx_single_source_bw_instruction_38:
137147 or [operand_flags],2
138148 avx_bw_instruction_38:
30973107 mov [xop_opcode_map],8
30983108 dec esi
30993109 jmp mmx_imm8
3110
3111 avx512_4vnniw_instruction:
3112 mov [opcode_prefix],0F2h
3113 mov [base_code],0Fh
3114 mov [extended_code],38h
3115 mov [supplemental_code],al
3116 mov [mmx_size],16
3117 mov [broadcast_size],0
3118 or [vex_required],8
3119 call take_avx_register
3120 mov [postbyte_register],al
3121 call take_avx512_mask
3122 lods byte [esi]
3123 cmp al,','
3124 jne invalid_operand
3125 call take_avx_register
3126 mov [vex_register],al
3127 cmp byte [esi],'+'
3128 jne reg4_ok
3129 inc esi
3130 cmp dword [esi],29030128h
3131 jne invalid_operand
3132 lods dword [esi]
3133 reg4_ok:
3134 cmp [operand_size],64
3135 jne invalid_operand_size
3136 mov [operand_size],0
3137 lods byte [esi]
3138 cmp al,','
3139 jne invalid_operand
3140 call take_avx_rm
3141 jc invalid_operand
3142 mov [operand_size],64
3143 jmp instruction_ready
31003144
31013145 set_evex_mode:
31023146 mov [evex_mode],al
568568 symbol_argument:
569569 pop edi
570570 stos word [edi]
571 cmp byte [esi],'+'
572 jne argument_parsed
573 and ax,0F0FFh
574 cmp ax,6010h
575 jne argument_parsed
576 movs byte [edi],[esi]
571577 jmp argument_parsed
572578 operator_argument:
573579 pop edi
14241424 dw while_directive-instruction_handler
14251425 db 'wrmsr',30h
14261426 dw simple_extended_instruction-instruction_handler
1427 db 'wrssd',0F6h
1428 dw wrssd_instruction-instruction_handler
1429 db 'wrssq',0F6h
1430 dw wrssq_instruction-instruction_handler
14271431 db 'xlatb',0D7h
14281432 dw simple_instruction-instruction_handler
14291433 db 'xorpd',57h
17691773 dw rdrand_instruction-instruction_handler
17701774 db 'rdseed',111b
17711775 dw rdrand_instruction-instruction_handler
1776 db 'rdsspd',1
1777 dw rdsspd_instruction-instruction_handler
1778 db 'rdsspq',1
1779 dw rdsspq_instruction-instruction_handler
17721780 db 'rdtscp',0F9h
17731781 dw simple_instruction_0f_01-instruction_handler
17741782 db 'repeat',0
20212029 dw simple_extended_instruction_64bit-instruction_handler
20222030 db 'wrpkru',0EFh
20232031 dw simple_instruction_0f_01-instruction_handler
2032 db 'wrussd',0F5h
2033 dw wrussd_instruction-instruction_handler
2034 db 'wrussq',0F5h
2035 dw wrussq_instruction-instruction_handler
20242036 db 'xabort',0
20252037 dw xabort_instruction-instruction_handler
20262038 db 'xbegin',0
20822094 dw basic_486_instruction-instruction_handler
20832095 db 'display',0
20842096 dw display_directive-instruction_handler
2097 db 'endbr32',0FBh
2098 dw endbr_instruction-instruction_handler
2099 db 'endbr64',0FAh
2100 dw endbr_instruction-instruction_handler
20852101 db 'fcmovbe',0D0h
20862102 dw fcmov_instruction-instruction_handler
20872103 db 'fcmovnb',0C0h
21262142 dw simple_fpu_instruction-instruction_handler
21272143 db 'fyl2xp1',111001b
21282144 dw simple_fpu_instruction-instruction_handler
2145 db 'incsspd',5
2146 dw incsspd_instruction-instruction_handler
2147 db 'incsspq',5
2148 dw incsspq_instruction-instruction_handler
21292149 db 'insertq',0
21302150 dw insertq_instruction-instruction_handler
21312151 db 'invlpga',0DFh
22342254 dw basic_mmx_instruction-instruction_handler
22352255 db 'psubusw',0D9h
22362256 dw basic_mmx_instruction-instruction_handler
2257 db 'ptwrite',4
2258 dw ptwrite_instruction-instruction_handler
22372259 db 'roundpd',9
22382260 dw sse4_instruction_66_3a_imm8-instruction_handler
22392261 db 'roundps',8
24482470 dw avx_q_instruction_38_evex-instruction_handler
24492471 db 'vpsadbw',0F6h
24502472 dw avx_bw_instruction-instruction_handler
2473 db 'vpshldd',71h
2474 dw avx_d_instruction_3a_imm8_evex-instruction_handler
2475 db 'vpshldq',71h
2476 dw avx_q_instruction_3a_imm8_evex-instruction_handler
2477 db 'vpshldw',70h
2478 dw avx_bw_instruction_3a_imm8_w1_evex-instruction_handler
2479 db 'vpshrdd',73h
2480 dw avx_d_instruction_3a_imm8_evex-instruction_handler
2481 db 'vpshrdq',73h
2482 dw avx_q_instruction_3a_imm8_evex-instruction_handler
2483 db 'vpshrdw',72h
2484 dw avx_bw_instruction_3a_imm8_w1_evex-instruction_handler
24512485 db 'vpshufb',0
24522486 dw avx_bw_instruction_38-instruction_handler
24532487 db 'vpshufd',70h
25152549 dw sse4_instruction_66_38_xmm0-instruction_handler
25162550 db 'cldemote',0
25172551 dw cldemote_instruction-instruction_handler
2552 db 'clrssbsy',6
2553 dw clrssbsy_instruction-instruction_handler
25182554 db 'cmpneqpd',4
25192555 dw cmp_pd_instruction-instruction_handler
25202556 db 'cmpneqps',4
26832719 dw rdfsbase_instruction-instruction_handler
26842720 db 'rdgsbase',1
26852721 dw rdfsbase_instruction-instruction_handler
2722 db 'rstorssp',5
2723 dw rstorssp_instruction-instruction_handler
2724 db 'setssbsy',0E8h
2725 dw setssbsy_instruction-instruction_handler
26862726 db 'sha1msg1',0C9h
26872727 dw sse4_instruction_38-instruction_handler
26882728 db 'sha1msg2',0CAh
28652905 dw xop_pcom_q_instruction-instruction_handler
28662906 db 'vpcomltw',0
28672907 dw xop_pcom_w_instruction-instruction_handler
2908 db 'vpdpbusd',50h
2909 dw avx_d_instruction_38_evex-instruction_handler
2910 db 'vpdpwssd',52h
2911 dw avx_d_instruction_38_evex-instruction_handler
28682912 db 'vpermi2b',75h
28692913 dw avx_bw_instruction_38_evex-instruction_handler
28702914 db 'vpermi2d',76h
29472991 dw avx_bw_instruction-instruction_handler
29482992 db 'vpmuludq',0F4h
29492993 dw avx_q_instruction-instruction_handler
2994 db 'vpopcntb',54h
2995 dw avx_single_source_d_instruction_38_evex-instruction_handler
2996 db 'vpopcntd',55h
2997 dw avx512_single_source_ps_instruction-instruction_handler
2998 db 'vpopcntq',55h
2999 dw avx512_single_source_pd_instruction-instruction_handler
3000 db 'vpopcntw',54h
3001 dw avx_single_source_d_instruction_38_evex_w1-instruction_handler
3002 db 'vpshldvd',71h
3003 dw avx_d_instruction_38_evex-instruction_handler
3004 db 'vpshldvq',71h
3005 dw avx_q_instruction_38_evex-instruction_handler
3006 db 'vpshldvw',70h
3007 dw avx_bw_instruction_38_w1_evex-instruction_handler
3008 db 'vpshrdvd',73h
3009 dw avx_d_instruction_38_evex-instruction_handler
3010 db 'vpshrdvq',73h
3011 dw avx_q_instruction_38_evex-instruction_handler
3012 db 'vpshrdvw',72
3013 dw avx_bw_instruction_38_w1_evex-instruction_handler
29503014 db 'vpshufhw',0F3h
29513015 dw avx_pshuf_w_instruction-instruction_handler
29523016 db 'vpshuflw',0F2h
31793243 db 'vcvtss2si',2Dh
31803244 dw avx_cvtss2si_instruction-instruction_handler
31813245 db 'vdbpsadbw',42h
3182 dw avx_d_instruction_3a_imm8_evex-instruction_handler
3246 dw avx_bw_instruction_3a_imm8_evex-instruction_handler
31833247 db 'vexpandpd',88h
31843248 dw avx_single_source_q_instruction_38_evex-instruction_handler
31853249 db 'vexpandps',88h
32303294 dw avx_movshdup_instruction-instruction_handler
32313295 db 'vmovsldup',12h
32323296 dw avx_movshdup_instruction-instruction_handler
3297 db 'vp4dpwssd',52h
3298 dw avx512_4vnniw_instruction-instruction_handler
32333299 db 'vpackssdw',6Bh
32343300 dw avx_d_instruction-instruction_handler
32353301 db 'vpacksswb',63h
33363402 dw xop_pcom_q_instruction-instruction_handler
33373403 db 'vpcomneqw',5
33383404 dw xop_pcom_w_instruction-instruction_handler
3405 db 'vpdpbusds',51h
3406 dw avx_d_instruction_38_evex-instruction_handler
3407 db 'vpdpwssds',53h
3408 dw avx_d_instruction_38_evex-instruction_handler
33393409 db 'vpermi2pd',77h
33403410 dw avx_q_instruction_38_evex-instruction_handler
33413411 db 'vpermi2ps',77h
33483418 dw avx_q_instruction_38_evex-instruction_handler
33493419 db 'vpermt2ps',7Fh
33503420 dw avx_d_instruction_38_evex-instruction_handler
3421 db 'vpexpandb',62h
3422 dw avx_single_source_d_instruction_38_evex-instruction_handler
33513423 db 'vpexpandd',89h
33523424 dw avx_single_source_d_instruction_38_evex-instruction_handler
33533425 db 'vpexpandq',89h
3426 dw avx_single_source_q_instruction_38_evex-instruction_handler
3427 db 'vpexpandw',62h
33543428 dw avx_single_source_q_instruction_38_evex-instruction_handler
33553429 db 'vphaddubd',0D2h
33563430 dw xop_single_source_128bit_instruction-instruction_handler
35653639 dw avx_maskmov_instruction-instruction_handler
35663640 db 'vmaskmovps',2Ch
35673641 dw avx_maskmov_instruction-instruction_handler
3642 db 'vp4dpwssds',53h
3643 dw avx512_4vnniw_instruction-instruction_handler
35683644 db 'vpclmulqdq',-1
35693645 dw avx_pclmulqdq_instruction-instruction_handler
35703646 db 'vpcmpestri',61h
36963772 dw prefetch_instruction-instruction_handler
36973773 db 'prefetchwt1',2
36983774 dw amd_prefetch_instruction-instruction_handler
3775 db 'saveprevssp',0EAh
3776 dw setssbsy_instruction-instruction_handler
36993777 db 'sha256rnds2',0CBh
37003778 dw sse4_instruction_38_xmm0-instruction_handler
37013779 db 'vaesdeclast',0DFh
38763954 dw xop_pcom_q_instruction-instruction_handler
38773955 db 'vpcomfalsew',6
38783956 dw xop_pcom_w_instruction-instruction_handler
3957 db 'vpcompressb',63h
3958 dw avx_compress_d_instruction-instruction_handler
38793959 db 'vpcompressd',8Bh
38803960 dw avx_compress_d_instruction-instruction_handler
38813961 db 'vpcompressq',8Bh
3962 dw avx_compress_q_instruction-instruction_handler
3963 db 'vpcompressw',63h
38823964 dw avx_compress_q_instruction-instruction_handler
38833965 db 'vpcomtrueub',7
38843966 dw xop_pcom_ub_instruction-instruction_handler
40954177 dw vpermil_2pd_instruction-instruction_handler
40964178 db 'vpermiltd2ps',0
40974179 dw vpermil_2ps_instruction-instruction_handler
4180 db 'vpshufbitqmb',8Fh
4181 dw avx512_ptestmb_instruction-instruction_handler
40984182 instructions_13:
40994183 db 'gf2p8affineqb',0CEh
41004184 dw sse4_instruction_66_3a_imm8-instruction_handler
3232 ; cannot simply be copied and put under another distribution licence
3333 ; (including the GNU Public Licence).
3434
35 VERSION_STRING equ "1.73.18"
35 VERSION_STRING equ "1.73.19"
3636
3737 VERSION_MAJOR = 1
3838 VERSION_MINOR = 73
37203720 cmp al,','
37213721 jne invalid_operand
37223722 call take_register
3723 mov bl,[postbyte_register]
3724 mov [postbyte_register],al
3723 mov al,bl
3724 xchg bl,[postbyte_register]
37253725 mov al,ah
37263726 cmp al,1
37273727 je basic_486_reg_reg_8bit
58985898 cmp ah,8
58995899 jne invalid_operand_size
59005900 jmp nomem_instruction_ready
5901 ptwrite_instruction:
5902 mov [base_code],0Fh
5903 mov [extended_code],0AEh
5904 mov [postbyte_register],al
5905 mov [opcode_prefix],0F3h
5906 lods byte [esi]
5907 call get_size_operator
5908 cmp al,10h
5909 je ptwrite_reg
5910 ptwrite_mem:
5911 cmp al,'['
5912 jne invalid_operand
5913 call get_address
5914 mov al,[operand_size]
5915 cmp al,4
5916 je ptwrite_mem_store
5917 cmp al,8
5918 je ptwrite_mem_64bit
5919 or al,al
5920 jnz invalid_operand_size
5921 call recoverable_unknown_size
5922 jmp ptwrite_mem_store
5923 ptwrite_mem_64bit:
5924 call operand_64bit
5925 ptwrite_mem_store:
5926 mov al,[operand_size]
5927 call operand_autodetect
5928 jmp instruction_ready
5929 ptwrite_reg:
5930 lods byte [esi]
5931 call convert_register
5932 mov bl,al
5933 mov al,ah
5934 cmp al,4
5935 je nomem_instruction_ready
5936 cmp al,8
5937 jne invalid_operand_size
5938 call operand_64bit
5939 jmp nomem_instruction_ready
59015940
59025941 vmclear_instruction:
59035942 mov [opcode_prefix],66h
64506489 jne invalid_operand_size
64516490 jmp instruction_assembled
64526491
6492 setssbsy_instruction:
6493 shl eax,24
6494 or eax,010FF3h
6495 stos dword [edi]
6496 jmp instruction_assembled
6497 rstorssp_instruction:
6498 mov ah,1
6499 jmp setup_clrssbsy
6500 clrssbsy_instruction:
6501 mov ah,0AEh
6502 setup_clrssbsy:
6503 mov [base_code],0Fh
6504 mov [extended_code],ah
6505 mov [postbyte_register],al
6506 mov [opcode_prefix],0F3h
6507 lods byte [esi]
6508 call get_size_operator
6509 cmp al,'['
6510 jne invalid_operand
6511 call get_address
6512 test [operand_size],not 8
6513 jnz invalid_operand_size
6514 jmp instruction_ready
6515 rdsspq_instruction:
6516 mov [rex_prefix],48h
6517 rdsspd_instruction:
6518 mov ah,1Eh
6519 jmp setup_incssp
6520 incsspq_instruction:
6521 mov [rex_prefix],48h
6522 incsspd_instruction:
6523 mov ah,0AEh
6524 setup_incssp:
6525 mov [base_code],0Fh
6526 mov [extended_code],ah
6527 mov [postbyte_register],al
6528 mov [opcode_prefix],0F3h
6529 lods byte [esi]
6530 call get_size_operator
6531 cmp al,10h
6532 jne invalid_operand
6533 lods byte [esi]
6534 call convert_register
6535 mov bl,al
6536 call cet_size_check
6537 jmp nomem_instruction_ready
6538 cet_size_check:
6539 cmp [rex_prefix],0
6540 je cet_dword
6541 cmp [code_type],64
6542 jne illegal_instruction
6543 shr ah,1
6544 cet_dword:
6545 cmp ah,4
6546 jne invalid_operand_size
6547 ret
6548 wrussq_instruction:
6549 mov [opcode_prefix],66h
6550 wrssq_instruction:
6551 mov [rex_prefix],48h
6552 jmp wrssd_instruction
6553 wrussd_instruction:
6554 mov [opcode_prefix],66h
6555 wrssd_instruction:
6556 mov [base_code],0Fh
6557 mov [extended_code],38h
6558 mov [supplemental_code],al
6559 lods byte [esi]
6560 call get_size_operator
6561 cmp al,10h
6562 je wrss_reg
6563 cmp al,'['
6564 jne invalid_operand
6565 call get_address
6566 push edx ebx ecx
6567 lods byte [esi]
6568 cmp al,','
6569 jne invalid_operand
6570 call take_register
6571 mov [postbyte_register],al
6572 pop ecx ebx edx
6573 call cet_size_check
6574 jmp instruction_ready
6575 wrss_reg:
6576 lods byte [esi]
6577 call convert_register
6578 mov [postbyte_register],al
6579 lods byte [esi]
6580 cmp al,','
6581 jne invalid_operand
6582 call take_register
6583 mov bl,al
6584 xchg bl,[postbyte_register]
6585 call cet_size_check
6586 jmp nomem_instruction_ready
6587 endbr_instruction:
6588 shl eax,24
6589 or eax,1E0FF3h
6590 stos dword [edi]
6591 jmp instruction_assembled
64536592
64546593 take_register:
64556594 lods byte [esi]
00
11 Visit http://flatassembler.net/ for more information.
2
3
4 version 1.73.19 (Nov 27, 2019)
5
6 [+] Added AVX512_BITALG, AVX512_VPOPCNTDQ, AVX512_VBMI2, AVX512_VNNI
7 and AVX512_4VNNIW instruction sets.
8
9 [+] Added CET_SS and CET_IBT instruction sets.
10
11 [+] Added "ptwrite" instruction.
212
313
414 version 1.73.18 (Nov 13, 2019)