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
4746 | 4746 | purpose of controlling the format of generated code. |
4747 | 4747 | "format" directive followed by the format identifier allows to select the |
4748 | 4748 | 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 | |
4752 | 4751 | file. Unless the output file name was specified from the command line, |
4753 | 4752 | assembler will use this extension when generating the output file. |
4754 | 4753 | "use16" and "use32" directives force the assembler to generate 16-bit or |
4755 | 4754 | 32-bit code, omitting the default setting for selected output format. "use64" |
4756 | 4755 | 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. | |
4757 | 4764 | Below are described different output formats with the directives specific to |
4758 | 4765 | these formats. |
4759 | 4766 |
610 | 610 | xor cx,cx |
611 | 611 | jmp make_constant |
612 | 612 | get_data_point: |
613 | lods byte [esi] | |
614 | cmp al,':' | |
615 | je get_data_offset | |
616 | cmp al,'(' | |
617 | jne invalid_argument | |
613 | 618 | mov ebx,[addressing_space] |
614 | 619 | mov ecx,edi |
615 | 620 | sub ecx,[ebx+18h] |
616 | 621 | mov [ebx+1Ch],ecx |
617 | lods byte [esi] | |
618 | cmp al,'(' | |
619 | jne invalid_argument | |
620 | 622 | cmp byte [esi],11h |
621 | 623 | jne get_data_address |
622 | 624 | cmp word [esi+1+4],'):' |
684 | 686 | call recoverable_overflow |
685 | 687 | stc |
686 | 688 | 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 | ||
687 | 721 | store_directive: |
688 | 722 | cmp byte [esi],11h |
689 | 723 | je sized_store |
926 | 960 | shl ecx,16 |
927 | 961 | mov cx,bx |
928 | 962 | 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: | |
929 | 972 | call allocate_virtual_structure_data |
930 | 973 | call init_addressing_space |
931 | 974 | or byte [ebx+0Ah],1 |
953 | 953 | avx_pclmulqdq_instruction: |
954 | 954 | mov byte [value],al |
955 | 955 | mov [immediate_size],-4 |
956 | or [vex_required],2 | |
957 | mov cl,16 | |
956 | xor cl,cl | |
958 | 957 | mov al,44h |
958 | or [operand_flags],10h | |
959 | 959 | jmp avx_instruction_3a |
960 | avx_instruction_38_nomask: | |
961 | or [operand_flags],10h | |
962 | xor cl,cl | |
963 | jmp avx_instruction_38 | |
960 | 964 | |
961 | 965 | avx512_single_source_pd_instruction_sae_imm8: |
962 | 966 | or [operand_flags],2 |
207 | 207 | cmp al,[operand_size] |
208 | 208 | jne operand_sizes_do_not_match |
209 | 209 | 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 | |
210 | 233 | current_offset_label: |
211 | 234 | mov eax,[current_offset] |
212 | make_current_offset_label: | |
235 | make_current_offset_label: | |
213 | 236 | xor edx,edx |
214 | 237 | xor ch,ch |
215 | 238 | mov ebp,[addressing_space] |
218 | 241 | sbb ch,[ds:ebp+8] |
219 | 242 | jp current_offset_label_ok |
220 | 243 | call recoverable_overflow |
221 | current_offset_label_ok: | |
244 | current_offset_label_ok: | |
222 | 245 | stos dword [edi] |
223 | 246 | mov eax,edx |
224 | 247 | stos dword [edi] |
259 | 282 | je timestamp_label |
260 | 283 | cmp eax,3 |
261 | 284 | je org_origin_label |
285 | cmp eax,4 | |
286 | je current_file_offset_label | |
287 | cmp eax,5 | |
288 | je actual_file_offset_label | |
262 | 289 | mov edx,invalid_value |
263 | 290 | jmp error_undefined |
264 | 291 | label_out_of_scope: |
1395 | 1395 | je pe_entry_ok |
1396 | 1396 | call recoverable_invalid_address |
1397 | 1397 | pe_entry_ok: |
1398 | cdq | |
1398 | cdq | |
1399 | 1399 | test [format_flags],4 |
1400 | 1400 | jnz pe64_entry_type_ok |
1401 | 1401 | mov edx,[code_start] |
580 | 580 | cmp al,85h |
581 | 581 | je ptr_argument |
582 | 582 | stos byte [edi] |
583 | cmp al,80h | |
584 | je forced_multipart_expression | |
585 | 583 | cmp al,8Ch |
586 | 584 | je forced_expression |
587 | 585 | cmp al,81h |
588 | 586 | je forced_parenthesis |
587 | cmp al,80h | |
588 | je parse_at_operator | |
589 | 589 | cmp al,82h |
590 | 590 | je parse_from_operator |
591 | 591 | cmp al,89h |
746 | 746 | jmp argument_parsed |
747 | 747 | parse_from_operator: |
748 | 748 | 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 | |
751 | 754 | parse_quoted_extrn: |
752 | 755 | inc esi |
753 | 756 | mov ax,'(' |
1277 | 1280 | mov eax,0Fh |
1278 | 1281 | ret |
1279 | 1282 | current_address_label: |
1280 | cmp ecx,2 | |
1283 | cmp ecx,3 | |
1284 | je current_address_label_3_characters | |
1281 | 1285 | ja find_label |
1282 | 1286 | inc esi |
1283 | jb get_current_offset_id | |
1287 | cmp ecx,1 | |
1288 | jbe get_current_offset_id | |
1284 | 1289 | inc esi |
1285 | 1290 | cmp byte [esi-1],'$' |
1286 | 1291 | je get_org_origin_id |
1292 | cmp byte [esi-1],'%' | |
1293 | je get_file_offset_id | |
1287 | 1294 | sub esi,2 |
1288 | 1295 | jmp find_label |
1289 | 1296 | get_current_offset_id: |
1297 | 1304 | ret |
1298 | 1305 | get_org_origin_id: |
1299 | 1306 | 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 | |
1300 | 1317 | ret |
1301 | 1318 | get_predefined_id: |
1302 | 1319 | cmp ecx,2 |
2224 | 2224 | dw basic_mmx_instruction-instruction_handler |
2225 | 2225 | db 'pcommit',0F8h |
2226 | 2226 | dw pcommit_instruction-instruction_handler |
2227 | db 'pconfig',0C5h | |
2228 | dw pconfig_instruction-instruction_handler | |
2227 | 2229 | db 'pfcmpeq',0B0h |
2228 | 2230 | dw amd3dnow_instruction-instruction_handler |
2229 | 2231 | db 'pfcmpge',90h |
2285 | 2287 | db 'ucomiss',2Eh |
2286 | 2288 | dw comiss_instruction-instruction_handler |
2287 | 2289 | db 'vaesdec',0DEh |
2288 | dw avx_128bit_instruction_38_noevex-instruction_handler | |
2290 | dw avx_instruction_38_nomask-instruction_handler | |
2289 | 2291 | db 'vaesenc',0DCh |
2290 | dw avx_128bit_instruction_38_noevex-instruction_handler | |
2292 | dw avx_instruction_38_nomask-instruction_handler | |
2291 | 2293 | db 'vaesimc',0DBh |
2292 | 2294 | dw avx_single_source_128bit_instruction_38_noevex-instruction_handler |
2293 | 2295 | db 'valignd',3 |
3777 | 3779 | db 'sha256rnds2',0CBh |
3778 | 3780 | dw sse4_instruction_38_xmm0-instruction_handler |
3779 | 3781 | db 'vaesdeclast',0DFh |
3780 | dw avx_128bit_instruction_38_noevex-instruction_handler | |
3782 | dw avx_instruction_38_nomask-instruction_handler | |
3781 | 3783 | db 'vaesenclast',0DDh |
3782 | dw avx_128bit_instruction_38_noevex-instruction_handler | |
3784 | dw avx_instruction_38_nomask-instruction_handler | |
3783 | 3785 | db 'vcmpeq_ospd',10h |
3784 | 3786 | dw avx_cmp_pd_instruction-instruction_handler |
3785 | 3787 | db 'vcmpeq_osps',10h |
32 | 32 | ; cannot simply be copied and put under another distribution licence |
33 | 33 | ; (including the GNU Public Licence). |
34 | 34 | |
35 | VERSION_STRING equ "1.73.20" | |
35 | VERSION_STRING equ "1.73.21" | |
36 | 36 | |
37 | 37 | VERSION_MAJOR = 1 |
38 | 38 | VERSION_MINOR = 73 |
5687 | 5687 | mov al,[postbyte_register] |
5688 | 5688 | stos byte [edi] |
5689 | 5689 | jmp instruction_assembled |
5690 | pconfig_instruction: | |
5691 | mov [postbyte_register],al | |
5692 | jmp monitor_instruction_store | |
5690 | 5693 | movntdqa_instruction: |
5691 | 5694 | call setup_66_0f_38 |
5692 | 5695 | lods byte [esi] |
0 | 0 | |
1 | 1 | 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. | |
2 | 13 | |
3 | 14 | |
4 | 15 | version 1.73.20 (Nov 29, 2019) |