Codebase list fasm / a40e2f4
Update upstream source from tag 'upstream/1.73.21' Update to upstream version '1.73.21' with Debian dir 88e58b1a261f75c708bcc0f00ca2b3892f6d8201 Tomasz Buchert 4 years ago
12 changed file(s) with 136 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
Binary diff not shown
47464746 purpose of controlling the format of generated code.
47474747 "format" directive followed by the format identifier allows to select the
47484748 output format. This directive should be put at the beginning of the source.
4749 Default output format is a flat binary file, it can also be selected by using
4750 "format binary" directive. This directive can be followed by the "as" keyword
4751 and the quoted string specifying the default file extension for the output
4749 It can always be followed in the same line by the "as" keyword and
4750 a quoted string specifying the default file extension for the output
47524751 file. Unless the output file name was specified from the command line,
47534752 assembler will use this extension when generating the output file.
47544753 "use16" and "use32" directives force the assembler to generate 16-bit or
47554754 32-bit code, omitting the default setting for selected output format. "use64"
47564755 enables generating the code for the long mode of x86-64 processors.
4756 Default output format is a flat binary file, it can also be selected by using
4757 "format binary" directive. When this format is chosen, special symbol "$%" can
4758 be used to get an offset within the output and "$%%" can be used to get the
4759 actual offset in the output file, omitting any undefined data that would be
4760 discarded if the output was ended at this point. Additionally, for this format
4761 "load" and "store" directives allow access to any data within the already
4762 generated output by following "from" or "at" keyword with ":" character and
4763 then an expression specifying the offset within the output.
47574764 Below are described different output formats with the directives specific to
47584765 these formats.
47594766
Binary diff not shown
610610 xor cx,cx
611611 jmp make_constant
612612 get_data_point:
613 lods byte [esi]
614 cmp al,':'
615 je get_data_offset
616 cmp al,'('
617 jne invalid_argument
613618 mov ebx,[addressing_space]
614619 mov ecx,edi
615620 sub ecx,[ebx+18h]
616621 mov [ebx+1Ch],ecx
617 lods byte [esi]
618 cmp al,'('
619 jne invalid_argument
620622 cmp byte [esi],11h
621623 jne get_data_address
622624 cmp word [esi+1+4],'):'
684686 call recoverable_overflow
685687 stc
686688 ret
689 get_data_offset:
690 cmp [output_format],2
691 jae invalid_operand
692 lods byte [esi]
693 cmp al,'('
694 jne invalid_argument
695 cmp byte [esi],'.'
696 je invalid_value
697 call get_dword_value
698 cmp [value_type],0
699 je data_offset_ok
700 call recoverable_invalid_address
701 data_offset_ok:
702 add eax,[code_start]
703 jc bad_data_address
704 mov ebx,eax
705 movzx ecx,[operand_size]
706 add eax,ecx
707 jc bad_data_address
708 mov edx,[addressing_space]
709 test byte [edx+0Ah],1
710 jnz data_offset_from_virtual
711 cmp eax,edi
712 ja bad_data_address
713 clc
714 ret
715 data_offset_from_virtual:
716 cmp eax,[undefined_data_end]
717 ja bad_data_address
718 clc
719 ret
720
687721 store_directive:
688722 cmp byte [esi],11h
689723 je sized_store
926960 shl ecx,16
927961 mov cx,bx
928962 push ecx eax
963 mov ebx,[addressing_space]
964 test byte [ebx+0Ah],1
965 jnz non_virtual_end_ok
966 mov eax,edi
967 xchg eax,[undefined_data_end]
968 cmp eax,edi
969 je non_virtual_end_ok
970 mov [undefined_data_start],edi
971 non_virtual_end_ok:
929972 call allocate_virtual_structure_data
930973 call init_addressing_space
931974 or byte [ebx+0Ah],1
953953 avx_pclmulqdq_instruction:
954954 mov byte [value],al
955955 mov [immediate_size],-4
956 or [vex_required],2
957 mov cl,16
956 xor cl,cl
958957 mov al,44h
958 or [operand_flags],10h
959959 jmp avx_instruction_3a
960 avx_instruction_38_nomask:
961 or [operand_flags],10h
962 xor cl,cl
963 jmp avx_instruction_38
960964
961965 avx512_single_source_pd_instruction_sae_imm8:
962966 or [operand_flags],2
207207 cmp al,[operand_size]
208208 jne operand_sizes_do_not_match
209209 jmp calculation_loop
210 actual_file_offset_label:
211 mov eax,[undefined_data_end]
212 mov ebp,[addressing_space]
213 test byte [ds:ebp+0Ah],1
214 jnz use_undefined_data_offset
215 cmp eax,[current_offset]
216 jne use_current_offset
217 use_undefined_data_offset:
218 mov eax,[undefined_data_start]
219 jmp make_file_offset_label
220 current_file_offset_label:
221 mov ebp,[addressing_space]
222 test byte [ds:ebp+0Ah],1
223 jz use_current_offset
224 mov eax,[undefined_data_end]
225 jmp make_file_offset_label
226 use_current_offset:
227 mov eax,[current_offset]
228 make_file_offset_label:
229 cmp [output_format],2
230 jae invalid_use_of_symbol
231 sub eax,[code_start]
232 jmp make_dword_label_value
210233 current_offset_label:
211234 mov eax,[current_offset]
212 make_current_offset_label:
235 make_current_offset_label:
213236 xor edx,edx
214237 xor ch,ch
215238 mov ebp,[addressing_space]
218241 sbb ch,[ds:ebp+8]
219242 jp current_offset_label_ok
220243 call recoverable_overflow
221 current_offset_label_ok:
244 current_offset_label_ok:
222245 stos dword [edi]
223246 mov eax,edx
224247 stos dword [edi]
259282 je timestamp_label
260283 cmp eax,3
261284 je org_origin_label
285 cmp eax,4
286 je current_file_offset_label
287 cmp eax,5
288 je actual_file_offset_label
262289 mov edx,invalid_value
263290 jmp error_undefined
264291 label_out_of_scope:
13951395 je pe_entry_ok
13961396 call recoverable_invalid_address
13971397 pe_entry_ok:
1398 cdq
1398 cdq
13991399 test [format_flags],4
14001400 jnz pe64_entry_type_ok
14011401 mov edx,[code_start]
580580 cmp al,85h
581581 je ptr_argument
582582 stos byte [edi]
583 cmp al,80h
584 je forced_multipart_expression
585583 cmp al,8Ch
586584 je forced_expression
587585 cmp al,81h
588586 je forced_parenthesis
587 cmp al,80h
588 je parse_at_operator
589589 cmp al,82h
590590 je parse_from_operator
591591 cmp al,89h
746746 jmp argument_parsed
747747 parse_from_operator:
748748 cmp byte [esi],22h
749 jne forced_multipart_expression
750 jmp argument_parsed
749 je argument_parsed
750 parse_at_operator:
751 cmp byte [esi],':'
752 je argument_parsed
753 jmp forced_multipart_expression
751754 parse_quoted_extrn:
752755 inc esi
753756 mov ax,'('
12771280 mov eax,0Fh
12781281 ret
12791282 current_address_label:
1280 cmp ecx,2
1283 cmp ecx,3
1284 je current_address_label_3_characters
12811285 ja find_label
12821286 inc esi
1283 jb get_current_offset_id
1287 cmp ecx,1
1288 jbe get_current_offset_id
12841289 inc esi
12851290 cmp byte [esi-1],'$'
12861291 je get_org_origin_id
1292 cmp byte [esi-1],'%'
1293 je get_file_offset_id
12871294 sub esi,2
12881295 jmp find_label
12891296 get_current_offset_id:
12971304 ret
12981305 get_org_origin_id:
12991306 mov eax,3
1307 ret
1308 get_file_offset_id:
1309 mov eax,4
1310 ret
1311 current_address_label_3_characters:
1312 cmp word [esi+1],'%%'
1313 jne find_label
1314 add esi,3
1315 get_actual_file_offset_id:
1316 mov eax,5
13001317 ret
13011318 get_predefined_id:
13021319 cmp ecx,2
22242224 dw basic_mmx_instruction-instruction_handler
22252225 db 'pcommit',0F8h
22262226 dw pcommit_instruction-instruction_handler
2227 db 'pconfig',0C5h
2228 dw pconfig_instruction-instruction_handler
22272229 db 'pfcmpeq',0B0h
22282230 dw amd3dnow_instruction-instruction_handler
22292231 db 'pfcmpge',90h
22852287 db 'ucomiss',2Eh
22862288 dw comiss_instruction-instruction_handler
22872289 db 'vaesdec',0DEh
2288 dw avx_128bit_instruction_38_noevex-instruction_handler
2290 dw avx_instruction_38_nomask-instruction_handler
22892291 db 'vaesenc',0DCh
2290 dw avx_128bit_instruction_38_noevex-instruction_handler
2292 dw avx_instruction_38_nomask-instruction_handler
22912293 db 'vaesimc',0DBh
22922294 dw avx_single_source_128bit_instruction_38_noevex-instruction_handler
22932295 db 'valignd',3
37773779 db 'sha256rnds2',0CBh
37783780 dw sse4_instruction_38_xmm0-instruction_handler
37793781 db 'vaesdeclast',0DFh
3780 dw avx_128bit_instruction_38_noevex-instruction_handler
3782 dw avx_instruction_38_nomask-instruction_handler
37813783 db 'vaesenclast',0DDh
3782 dw avx_128bit_instruction_38_noevex-instruction_handler
3784 dw avx_instruction_38_nomask-instruction_handler
37833785 db 'vcmpeq_ospd',10h
37843786 dw avx_cmp_pd_instruction-instruction_handler
37853787 db 'vcmpeq_osps',10h
3232 ; cannot simply be copied and put under another distribution licence
3333 ; (including the GNU Public Licence).
3434
35 VERSION_STRING equ "1.73.20"
35 VERSION_STRING equ "1.73.21"
3636
3737 VERSION_MAJOR = 1
3838 VERSION_MINOR = 73
56875687 mov al,[postbyte_register]
56885688 stos byte [edi]
56895689 jmp instruction_assembled
5690 pconfig_instruction:
5691 mov [postbyte_register],al
5692 jmp monitor_instruction_store
56905693 movntdqa_instruction:
56915694 call setup_66_0f_38
56925695 lods byte [esi]
00
11 Visit http://flatassembler.net/ for more information.
2
3
4 version 1.73.21 (Dec 05, 2019)
5
6 [+] Added "$%" and "$%%" symbols, and output offset addressing with "load"
7 and "store" directives (backported from flat assembler g).
8 It can be used only with binary output format.
9
10 [+] Added VAES and VPCMULQDQ instruction set extensions.
11
12 [+] Added "pconfig" instruction.
213
314
415 version 1.73.20 (Nov 29, 2019)