From 53cca077c56b185dd05570d532305be8c5ba33d8 Mon Sep 17 00:00:00 2001 From: heavyiron Date: Wed, 16 Oct 2013 08:12:09 +0000 Subject: [PATCH] fasm 1.71.13, proc32.inc and struct.inc from fasm 1.71.13 git-svn-id: svn://kolibrios.org@4039 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/fasm/trunk/assemble.inc | 533 +- programs/develop/fasm/trunk/avx.inc | 3574 ++++++------ programs/develop/fasm/trunk/errors.inc | 2 +- programs/develop/fasm/trunk/exprcalc.inc | 4636 +++++++-------- programs/develop/fasm/trunk/exprpars.inc | 2532 ++++---- programs/develop/fasm/trunk/formats.inc | 222 +- programs/develop/fasm/trunk/messages.inc | 104 +- programs/develop/fasm/trunk/parser.inc | 66 +- programs/develop/fasm/trunk/preproce.inc | 22 +- programs/develop/fasm/trunk/symbdump.inc | 883 +-- programs/develop/fasm/trunk/tables.inc | 6814 +++++++++++----------- programs/develop/fasm/trunk/variable.inc | 14 +- programs/develop/fasm/trunk/version.inc | 8 +- programs/develop/fasm/trunk/x86_64.inc | 28 +- programs/proc32.inc | 65 +- programs/struct.inc | 160 +- 16 files changed, 10004 insertions(+), 9659 deletions(-) diff --git a/programs/develop/fasm/trunk/assemble.inc b/programs/develop/fasm/trunk/assemble.inc index 7e371bb34..4a4ba8941 100644 --- a/programs/develop/fasm/trunk/assemble.inc +++ b/programs/develop/fasm/trunk/assemble.inc @@ -1,6 +1,6 @@ ; flat assembler core -; Copyright (c) 1999-2012, Tomasz Grysztar. +; Copyright (c) 1999-2013, Tomasz Grysztar. ; All rights reserved. assembler: @@ -12,7 +12,7 @@ assembler: mov [actual_fixups_size],eax assembler_loop: mov eax,[labels_list] - mov [display_buffer],eax + mov [tagged_blocks],eax mov eax,[additional_memory] mov [free_additional_memory],eax mov eax,[additional_memory_end] @@ -22,11 +22,7 @@ assembler: xor eax,eax mov dword [adjustment],eax mov dword [adjustment+4],eax - mov dword [org_origin],edi - mov dword [org_origin+4],eax - mov [org_start],edi - mov [org_registers],eax - mov [org_symbol],eax + mov [addressing_space],eax mov [error_line],eax mov [counter],eax mov [format_flags],eax @@ -35,18 +31,16 @@ assembler: mov [file_extension],eax mov [next_pass_needed],al mov [output_format],al - mov [org_origin_sign],al mov [adjustment_sign],al - mov [labels_type],al - mov [virtual_data],al mov [code_type],16 + call init_addressing_space pass_loop: call assemble_line jnc pass_loop mov eax,[additional_memory_end] cmp eax,[structures_buffer] je pass_done - sub eax,20h + sub eax,18h mov eax,[eax+4] mov [current_line],eax jmp missing_end_directive @@ -141,8 +135,36 @@ assembler: assemble_ok: ret +create_addressing_space: + mov ebx,[addressing_space] + test ebx,ebx + jz init_addressing_space + test byte [ebx+0Ah],1 + jnz illegal_instruction + mov eax,edi + sub eax,[ebx+18h] + mov [ebx+1Ch],eax + init_addressing_space: + mov ebx,[tagged_blocks] + mov dword [ebx-4],10h + mov dword [ebx-8],20h + sub ebx,8+20h + cmp ebx,edi + jbe out_of_memory + mov [tagged_blocks],ebx + mov [addressing_space],ebx + xor eax,eax + mov [ebx],edi + mov [ebx+4],eax + mov [ebx+8],eax + mov [ebx+10h],eax + mov [ebx+14h],eax + mov [ebx+18h],edi + mov [ebx+1Ch],eax + ret + assemble_line: - mov eax,[display_buffer] + mov eax,[tagged_blocks] sub eax,100h cmp edi,eax ja out_of_memory @@ -153,6 +175,8 @@ assemble_line: cmp al,3 jb define_label je define_constant + cmp al,4 + je label_addressing_space cmp al,0Fh je new_line cmp al,13h @@ -164,7 +188,7 @@ assemble_line: code_type_setting: lods byte [esi] mov [code_type],al - jmp line_assembled + jmp instruction_assembled new_line: lods dword [esi] mov [current_line],eax @@ -173,30 +197,19 @@ assemble_line: je continue_line cmp [next_pass_needed],0 jne continue_line - mov ebx,[display_buffer] + mov ebx,[tagged_blocks] mov dword [ebx-4],1 - mov dword [ebx-8],1Ch - sub ebx,8+1Ch + mov dword [ebx-8],14h + sub ebx,8+14h cmp ebx,edi jbe out_of_memory - mov [display_buffer],ebx + mov [tagged_blocks],ebx mov [ebx],eax mov [ebx+4],edi - mov eax,dword [org_origin] - mov edx,dword [org_origin+4] - mov ecx,[org_registers] + mov eax,[addressing_space] mov [ebx+8],eax - mov [ebx+8+4],edx - mov [ebx+10h],ecx - mov edx,[org_symbol] -; mov al,[virtual_data] -; mov ah,[org_origin_sign] -; shl eax,16 -; mov al,[labels_type] -; mov ah,[code_type] - mov eax,dword [labels_type] - mov [ebx+14h],edx - mov [ebx+18h],eax + mov al,[code_type] + mov [ebx+10h],al continue_line: cmp byte [esi],0Fh je line_assembled @@ -215,15 +228,16 @@ assemble_line: mov eax,edi xor edx,edx xor cl,cl - sub eax,dword [org_origin] - sbb edx,dword [org_origin+4] - sbb cl,[org_origin_sign] + mov ebp,[addressing_space] + sub eax,[ds:ebp] + sbb edx,[ds:ebp+4] + sbb cl,[ds:ebp+8] jp label_value_ok call recoverable_overflow label_value_ok: mov [address_sign],cl - cmp [virtual_data],0 - jne make_virtual_label + test byte [ds:ebp+0Ah],1 + jnz make_virtual_label or byte [ebx+9],1 xchg eax,[ebx] xchg edx,[ebx+4] @@ -251,10 +265,11 @@ assemble_line: setne al or ah,al finish_label: - mov ch,[labels_type] + mov ebp,[addressing_space] + mov ch,[ds:ebp+9] mov cl,[label_size] - mov ebp,[org_registers] - mov edx,[org_symbol] + mov edx,[ds:ebp+14h] + mov ebp,[ds:ebp+10h] finish_label_symbol: mov al,[address_sign] xor al,[ebx+9] @@ -289,6 +304,8 @@ assemble_line: jz new_label cmp cx,[ebx+16] je symbol_already_defined + btr dword [ebx+8],10 + jc requalified_label inc cx sub cx,[ebx+16] setnz al @@ -299,6 +316,7 @@ assemble_line: mov cx,[current_pass] cmp cx,[ebx+18] jne label_made + requalified_label: or [next_pass_needed],-1 label_made: ret @@ -320,7 +338,7 @@ assemble_line: mov cx,[current_pass] cmp cx,[eax+16] je get_constant_value - and dl,not 1 + or dl,4 mov [eax+8],dl get_constant_value: push eax @@ -331,10 +349,11 @@ assemble_line: pop ebx mov ch,bl pop ebx - pop dword [ebx+8] - cmp ebx,0Fh - jb invalid_use_of_symbol - je reserved_word_used_as_symbol + pop ecx + test cl,4 + jnz constant_referencing_mode_ok + and byte [ebx+8],not 4 + constant_referencing_mode_ok: xor cl,cl mov ch,[value_type] cmp ch,3 @@ -385,8 +404,11 @@ assemble_line: test byte [ebx+8],2 jz symbol_already_defined or byte [ebx+8],4 + and byte [ebx+9],not 4 jmp instruction_assembled redeclare_constant: + btr dword [ebx+8],10 + jc requalified_constant inc cx sub cx,[ebx+16] setnz al @@ -399,11 +421,37 @@ assemble_line: mov cx,[current_pass] cmp cx,[ebx+18] jne instruction_assembled + requalified_constant: or [next_pass_needed],-1 jmp instruction_assembled new_constant: or byte [ebx+8],1+2 jmp instruction_assembled + label_addressing_space: + lods dword [esi] + cmp eax,0Fh + jb invalid_use_of_symbol + je reserved_word_used_as_symbol + mov cx,[current_pass] + test byte [eax+8],1 + jz make_addressing_space_label + cmp cx,[eax+16] + je symbol_already_defined + test byte [eax+9],4 + jnz make_addressing_space_label + or [next_pass_needed],-1 + make_addressing_space_label: + mov dx,[eax+8] + and dx,not (2 or 100h) + or dx,1 or 4 or 400h + mov [eax+8],dx + mov [eax+16],cx + mov edx,[current_line] + mov [eax+28],edx + mov ebx,[addressing_space] + mov [eax],ebx + or byte [ebx+0Ah],2 + jmp continue_line assemble_instruction: ; mov [operand_size],0 ; mov [size_override],0 @@ -446,22 +494,31 @@ org_directive: mov cl,[value_type] test cl,1 jnz invalid_use_of_symbol - mov [labels_type],cl - mov dword [org_origin],edi - xor ecx,ecx - mov dword [org_origin+4],ecx - mov [org_origin_sign],cl - mov [org_registers],ecx + push eax + mov ebx,[addressing_space] + mov eax,edi + sub eax,[ebx+18h] + mov [ebx+1Ch],eax + test byte [ebx+0Ah],1 + jnz in_virtual + call init_addressing_space + jmp org_space_ok + in_virtual: + call close_virtual_addressing_space + call init_addressing_space + or byte [ebx+0Ah],1 + org_space_ok: + pop eax + mov [ebx+9],cl mov cl,[value_sign] - sub dword [org_origin],eax - sbb dword [org_origin+4],edx - sbb [org_origin_sign],cl + sub [ebx],eax + sbb [ebx+4],edx + sbb byte [ebx+8],cl jp org_value_ok call recoverable_overflow org_value_ok: - mov [org_start],edi mov edx,[symbol_identifier] - mov [org_symbol],edx + mov [ebx+14h],edx cmp [output_format],1 ja instruction_assembled cmp edi,[code_start] @@ -502,9 +559,8 @@ label_directive: lods byte [esi] cmp al,'(' jne invalid_argument - push dword [ebx+8] push ebx ecx - and byte [ebx+8],not 1 + or byte [ebx+8],4 cmp byte [esi],'.' je invalid_value call get_address_value @@ -516,14 +572,10 @@ label_directive: xchg bl,bh mov bp,bx pop ecx ebx - pop dword [ebx+8] + and byte [ebx+8],not 4 mov ch,[value_type] - or ch,ch - jz make_free_label - cmp ch,4 - je make_free_label - cmp ch,2 - jne invalid_use_of_symbol + test ch,1 + jnz invalid_use_of_symbol make_free_label: and byte [ebx+9],not 1 cmp eax,[ebx] @@ -558,45 +610,102 @@ load_directive: mov [operand_size],al and dword [value],0 and dword [value+4],0 - lods word [esi] - cmp ax,82h+'(' shl 8 + lods byte [esi] + cmp al,82h jne invalid_argument - load_from_code: - cmp byte [esi],'.' - je invalid_value - or [size_override],-1 - call get_address_value - call calculate_relative_offset + call get_data_point + jc value_loaded push esi edi - cmp [next_pass_needed],0 - jne load_address_type_ok - cmp [value_type],0 - jne invalid_use_of_symbol - load_address_type_ok: - cmp edx,-1 - jne bad_load_address - neg eax - mov esi,edi - sub esi,eax - jc bad_load_address - cmp esi,[org_start] - jb bad_load_address + mov esi,ebx mov edi,value - movzx ecx,[operand_size] - cmp ecx,eax - ja bad_load_address rep movs byte [edi],[esi] - jmp value_loaded - bad_load_address: - call recoverable_overflow - value_loaded: pop edi esi + value_loaded: mov [value_sign],0 mov eax,dword [value] mov edx,dword [value+4] pop ebx xor cx,cx jmp make_constant + get_data_point: + mov ebx,[addressing_space] + mov ecx,edi + sub ecx,[ebx+18h] + mov [ebx+1Ch],ecx + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],11h + jne get_data_address + cmp word [esi+1+4],'):' + jne get_data_address + inc esi + lods dword [esi] + add esi,2 + cmp byte [esi],'(' + jne invalid_argument + inc esi + cmp eax,0Fh + jbe reserved_word_used_as_symbol + mov edx,undefined_symbol + test byte [eax+8],1 + jz addressing_space_unavailable + mov edx,symbol_out_of_scope + mov cx,[eax+16] + cmp cx,[current_pass] + jne addressing_space_unavailable + test byte [eax+9],4 + jz invalid_use_of_symbol + mov ebx,eax + mov ax,[current_pass] + mov [ebx+18],ax + or byte [ebx+8],8 + cmp [symbols_file],0 + je get_addressing_space + cmp [next_pass_needed],0 + jne get_addressing_space + call store_label_reference + get_addressing_space: + mov ebx,[ebx] + get_data_address: + push ebx + cmp byte [esi],'.' + je invalid_value + or [size_override],-1 + call get_address_value + pop ebp + call calculate_relative_offset + cmp [next_pass_needed],0 + jne data_address_type_ok + cmp [value_type],0 + jne invalid_use_of_symbol + data_address_type_ok: + mov ebx,edi + xor ecx,ecx + add ebx,eax + adc edx,ecx + mov eax,ebx + sub eax,[ds:ebp+18h] + sbb edx,ecx + jnz bad_data_address + mov cl,[operand_size] + add eax,ecx + cmp eax,[ds:ebp+1Ch] + ja bad_data_address + clc + ret + addressing_space_unavailable: + cmp [error_line],0 + jne get_data_address + push [current_line] + pop [error_line] + mov [error],edx + mov [error_info],eax + jmp get_data_address + bad_data_address: + call recoverable_overflow + stc + ret store_directive: cmp byte [esi],11h je sized_store @@ -616,44 +725,23 @@ store_directive: jne invalid_use_of_symbol mov dword [value],eax mov dword [value+4],edx - lods word [esi] - cmp ax,80h+'(' shl 8 + lods byte [esi] + cmp al,80h jne invalid_argument - cmp byte [esi],'.' - je invalid_value - or [size_override],-1 - call get_address_value - call calculate_relative_offset + call get_data_point + jc instruction_assembled push esi edi - cmp [next_pass_needed],0 - jne store_address_type_ok - cmp [value_type],0 - jne invalid_use_of_symbol - store_address_type_ok: - cmp edx,-1 - jne bad_store_address - neg eax - sub edi,eax - jc bad_store_address - cmp edi,[org_start] - jb bad_store_address mov esi,value - movzx ecx,[operand_size] - cmp ecx,eax - ja bad_store_address + mov edi,ebx rep movs byte [edi],[esi] mov eax,edi pop edi esi - cmp edi,[undefined_data_end] - jne instruction_assembled + cmp ebx,[undefined_data_end] + jae instruction_assembled cmp eax,[undefined_data_start] jbe instruction_assembled mov [undefined_data_start],eax jmp instruction_assembled - bad_store_address: - pop edi esi - call recoverable_overflow - jmp instruction_assembled display_directive: lods byte [esi] @@ -665,12 +753,12 @@ display_directive: lods dword [esi] mov ecx,eax push edi - mov edi,[display_buffer] + mov edi,[tagged_blocks] sub edi,8 sub edi,eax cmp edi,[esp] jbe out_of_memory - mov [display_buffer],edi + mov [tagged_blocks],edi rep movs byte [edi],[esi] stos dword [edi] xor eax,eax @@ -681,9 +769,9 @@ display_directive: display_byte: call get_byte_value push edi - mov edi,[display_buffer] + mov edi,[tagged_blocks] sub edi,8+1 - mov [display_buffer],edi + mov [tagged_blocks],edi stos byte [edi] mov eax,1 stos dword [edi] @@ -691,7 +779,7 @@ display_directive: stos dword [edi] pop edi display_next: - cmp edi,[display_buffer] + cmp edi,[tagged_blocks] ja out_of_memory lods byte [esi] cmp al,',' @@ -699,7 +787,7 @@ display_directive: dec esi jmp instruction_assembled show_display_buffer: - mov eax,[display_buffer] + mov eax,[tagged_blocks] or eax,eax jz display_done mov esi,[labels_list] @@ -711,12 +799,12 @@ show_display_buffer: mov ecx,[esi] sub esi,ecx test eax,eax - jnz skip_internal_message + jnz skip_block push esi call display_block pop esi - skip_internal_message: - cmp esi,[display_buffer] + skip_block: + cmp esi,[tagged_blocks] jne display_messages display_done: ret @@ -779,28 +867,41 @@ virtual_directive: jmp set_virtual virtual_at_current: dec esi - mov al,[labels_type] + mov ebp,[addressing_space] + mov al,[ds:ebp+9] mov [value_type],al - mov ebp,[org_symbol] mov eax,edi xor edx,edx xor cl,cl - sub eax,dword [org_origin] - sbb edx,dword [org_origin+4] - sbb cl,[org_origin_sign] + sub eax,[ds:ebp] + sbb edx,[ds:ebp+4] + sbb cl,[ds:ebp+8] mov [address_sign],cl - mov bx,word [org_registers] - mov cx,word [org_registers+2] + mov bx,[ds:ebp+10h] + mov cx,[ds:ebp+10h+2] xchg bh,bl xchg ch,cl + mov ebp,[ds:ebp+14h] set_virtual: - push [org_registers] - mov byte [org_registers],bh - mov byte [org_registers+1],bl - mov byte [org_registers+2],ch - mov byte [org_registers+3],cl + xchg bl,bh + xchg cl,ch + shl ecx,16 + mov cx,bx + push ecx eax call allocate_structure_data mov word [ebx],virtual_directive-instruction_handler + mov ecx,[addressing_space] + mov [ebx+12],ecx + mov [ebx+8],edi + mov ecx,[current_line] + mov [ebx+4],ecx + mov ebx,[addressing_space] + mov eax,edi + sub eax,[ebx+18h] + mov [ebx+1Ch],eax + call init_addressing_space + or byte [ebx+0Ah],1 + pop eax mov cl,[address_sign] not eax not edx @@ -811,37 +912,19 @@ virtual_directive: add eax,edi adc edx,0 adc cl,0 - xchg dword [org_origin],eax - xchg dword [org_origin+4],edx - xchg [org_origin_sign],cl - mov [ebx+10h],eax - mov [ebx+14h],edx - pop eax - mov [ebx+18h],eax - mov al,[virtual_data] - and al,0Fh - shl cl,4 - or al,cl - mov [ebx+2],al - mov al,[labels_type] - mov [ebx+3],al - mov eax,edi - xchg eax,[org_start] - mov [ebx+0Ch],eax - xchg ebp,[org_symbol] - mov [ebx+1Ch],ebp - mov [ebx+8],edi - mov eax,[current_line] - mov [ebx+4],eax - or [virtual_data],-1 + mov [ebx],eax + mov [ebx+4],edx + mov [ebx+8],cl + pop dword [ebx+10h] + mov [ebx+14h],ebp mov al,[value_type] test al,1 jnz invalid_use_of_symbol - mov [labels_type],al + mov [ebx+9],al jmp instruction_assembled allocate_structure_data: mov ebx,[structures_buffer] - sub ebx,20h + sub ebx,18h cmp ebx,[free_additional_memory] jb out_of_memory mov [structures_buffer],ebx @@ -853,7 +936,7 @@ virtual_directive: je no_such_structure cmp ax,[ebx] je structure_data_found - add ebx,20h + add ebx,18h jmp scan_structures structure_data_found: ret @@ -863,27 +946,11 @@ virtual_directive: end_virtual: call find_structure_data jc unexpected_instruction - mov al,[ebx+2] - mov ah,al - shr ah,4 - and al,1 - neg al - and ah,1 - neg ah - mov [virtual_data],al - mov [org_origin_sign],ah - mov al,[ebx+3] - mov [labels_type],al - mov eax,[ebx+10h] - mov dword [org_origin],eax - mov eax,[ebx+14h] - mov dword [org_origin+4],eax - mov eax,[ebx+18h] - mov [org_registers],eax - mov eax,[ebx+0Ch] - mov [org_start],eax - mov eax,[ebx+1Ch] - mov [org_symbol],eax + push ebx + call close_virtual_addressing_space + pop ebx + mov eax,[ebx+12] + mov [addressing_space],eax mov edi,[ebx+8] remove_structure_data: push esi edi @@ -891,13 +958,55 @@ virtual_directive: sub ecx,[structures_buffer] shr ecx,2 lea esi,[ebx-4] - lea edi,[esi+20h] + lea edi,[esi+18h] std rep movs dword [edi],[esi] cld - add [structures_buffer],20h + add [structures_buffer],18h pop edi esi ret + close_virtual_addressing_space: + mov ebx,[addressing_space] + mov eax,edi + sub eax,[ebx+18h] + mov [ebx+1Ch],eax + test byte [ebx+0Ah],2 + jz addressing_space_closed + push esi edi ecx edx + mov ecx,eax + mov eax,[tagged_blocks] + mov dword [eax-4],11h + mov dword [eax-8],ecx + sub eax,8 + sub eax,ecx + mov [tagged_blocks],eax + lea edi,[eax+ecx-1] + xchg eax,[ebx+18h] + lea esi,[eax+ecx-1] + mov eax,edi + sub eax,esi + std + shr ecx,1 + jnc virtual_byte_ok + movs byte [edi],[esi] + virtual_byte_ok: + dec esi + dec edi + shr ecx,1 + jnc virtual_word_ok + movs word [edi],[esi] + virtual_word_ok: + sub esi,2 + sub edi,2 + rep movs dword [edi],[esi] + cld + xor edx,edx + add [ebx],eax + adc dword [ebx+4],edx + adc byte [ebx+8],dl + pop edx ecx edi esi + addressing_space_closed: + ret repeat_directive: cmp [prefixed_instruction],0 jne unexpected_instruction @@ -1193,7 +1302,7 @@ break_directive: je break_while cmp ax,if_directive-instruction_handler je break_if - add ebx,20h + add ebx,18h jmp find_breakable_structure break_if: push [current_line] @@ -1235,14 +1344,15 @@ data_bytes: lods dword [esi] mov ecx,eax lea eax,[edi+ecx] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] ja out_of_memory rep movs byte [edi],[esi] inc esi ret undefined_data: - cmp [virtual_data],0 - je mark_undefined_data + mov ebp,[addressing_space] + test byte [ds:ebp+0Ah],1 + jz mark_undefined_data ret mark_undefined_data: cmp eax,[undefined_data_end] @@ -1252,7 +1362,7 @@ data_bytes: mov [undefined_data_end],edi ret define_data: - cmp edi,[display_buffer] + cmp edi,[tagged_blocks] jae out_of_memory cmp byte [esi],'(' jne simple_data_value @@ -1273,7 +1383,7 @@ data_bytes: duplicate_data: push eax esi duplicated_values: - cmp edi,[display_buffer] + cmp edi,[tagged_blocks] jae out_of_memory call near dword [esp+8] lods byte [esi] @@ -1287,7 +1397,7 @@ data_bytes: mov esi,ebx jmp duplicate_data duplicate_single_data_value: - cmp edi,[display_buffer] + cmp edi,[tagged_blocks] jae out_of_memory push eax esi call near dword [esp+8] @@ -1311,7 +1421,7 @@ data_bytes: call skip_symbol jmp data_defined simple_data_value: - cmp edi,[display_buffer] + cmp edi,[tagged_blocks] jae out_of_memory call near dword [esp] data_defined: @@ -1354,7 +1464,7 @@ data_words: mov ecx,eax jecxz word_string_ok lea eax,[edi+ecx*2] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] ja out_of_memory xor ah,ah copy_word_string: @@ -1624,7 +1734,7 @@ data_file: mov edx,edi add edi,ecx jc out_of_memory - cmp edi,[display_buffer] + cmp edi,[tagged_blocks] ja out_of_memory call read jc error_reading_file @@ -1704,7 +1814,7 @@ reserve_bytes: mov edx,ecx add edx,edi jc out_of_memory - cmp edx,[display_buffer] + cmp edx,[tagged_blocks] ja out_of_memory push edi cmp [next_pass_needed],0 @@ -1739,7 +1849,7 @@ reserve_words: jc out_of_memory add edx,edi jc out_of_memory - cmp edx,[display_buffer] + cmp edx,[tagged_blocks] ja out_of_memory push edi cmp [next_pass_needed],0 @@ -1769,7 +1879,7 @@ reserve_dwords: jc out_of_memory add edx,edi jc out_of_memory - cmp edx,[display_buffer] + cmp edx,[tagged_blocks] ja out_of_memory push edi cmp [next_pass_needed],0 @@ -1796,7 +1906,7 @@ reserve_pwords: jc out_of_memory add edx,edi jc out_of_memory - cmp edx,[display_buffer] + cmp edx,[tagged_blocks] ja out_of_memory push edi cmp [next_pass_needed],0 @@ -1820,7 +1930,7 @@ reserve_qwords: jc out_of_memory add edx,edi jc out_of_memory - cmp edx,[display_buffer] + cmp edx,[tagged_blocks] ja out_of_memory push edi cmp [next_pass_needed],0 @@ -1843,7 +1953,7 @@ reserve_twords: jc out_of_memory add edx,edi jc out_of_memory - cmp edx,[display_buffer] + cmp edx,[tagged_blocks] ja out_of_memory push edi cmp [next_pass_needed],0 @@ -1866,14 +1976,15 @@ align_directive: cmp eax,1 je instruction_assembled mov ecx,edi - sub ecx,dword [org_origin] - cmp [org_registers],0 + mov ebp,[addressing_space] + sub ecx,[ds:ebp] + cmp dword [ds:ebp+10h],0 jne section_not_aligned_enough - cmp [labels_type],0 + cmp byte [ds:ebp+9],0 je make_alignment cmp [output_format],3 je pe_alignment - mov ebx,[org_symbol] + mov ebx,[ds:ebp+14h] cmp byte [ebx],0 jne section_not_aligned_enough cmp eax,[ebx+10h] @@ -1892,7 +2003,7 @@ align_directive: mov edx,ecx add edx,edi jc out_of_memory - cmp edx,[display_buffer] + cmp edx,[tagged_blocks] ja out_of_memory push edi cmp [next_pass_needed],0 diff --git a/programs/develop/fasm/trunk/avx.inc b/programs/develop/fasm/trunk/avx.inc index 273c08612..5355a8e9f 100644 --- a/programs/develop/fasm/trunk/avx.inc +++ b/programs/develop/fasm/trunk/avx.inc @@ -1,1787 +1,1787 @@ - -; flat assembler core -; Copyright (c) 1999-2012, Tomasz Grysztar. -; All rights reserved. - -avx_single_source_pd_instruction: - or [vex_required],2 - jmp avx_pd_instruction -avx_pd_instruction_imm8: - mov [immediate_size],1 -avx_pd_instruction: - mov [opcode_prefix],66h - mov [mmx_size],0 - jmp avx_instruction -avx_single_source_ps_instruction: - or [vex_required],2 - jmp avx_ps_instruction -avx_ps_instruction_imm8: - mov [immediate_size],1 -avx_ps_instruction: - mov [mmx_size],0 - jmp avx_instruction -avx_sd_instruction_imm8: - mov [immediate_size],1 -avx_sd_instruction: - mov [opcode_prefix],0F2h - mov [mmx_size],8 - jmp avx_instruction -avx_ss_instruction_imm8: - mov [immediate_size],1 -avx_ss_instruction: - mov [opcode_prefix],0F3h - mov [mmx_size],4 - jmp avx_instruction -avx_cmp_pd_instruction: - mov [opcode_prefix],66h -avx_cmp_ps_instruction: - mov [mmx_size],0 - mov byte [value],al - mov al,0C2h - jmp avx_instruction -avx_cmp_sd_instruction: - mov [opcode_prefix],0F2h - mov [mmx_size],8 - mov byte [value],al - mov al,0C2h - jmp avx_instruction -avx_cmp_ss_instruction: - mov [opcode_prefix],0F3h - mov [mmx_size],4 - mov byte [value],al - mov al,0C2h - jmp avx_instruction -avx_comiss_instruction: - or [vex_required],2 - mov [mmx_size],4 - jmp avx_instruction -avx_comisd_instruction: - or [vex_required],2 - mov [opcode_prefix],66h - mov [mmx_size],8 - jmp avx_instruction -avx_haddps_instruction: - mov [opcode_prefix],0F2h - mov [mmx_size],0 - jmp avx_instruction -avx_movshdup_instruction: - or [vex_required],2 - mov [opcode_prefix],0F3h - mov [mmx_size],0 - jmp avx_instruction -avx_128bit_instruction: - mov [mmx_size],16 - mov [opcode_prefix],66h -avx_instruction: - mov [base_code],0Fh - mov [extended_code],al - avx_common: - or [vex_required],1 - lods byte [esi] - call get_size_operator - cmp al,10h - jne invalid_operand - avx_reg: - lods byte [esi] - call convert_avx_register - mov [postbyte_register],al - avx_vex_reg: - test [vex_required],2 - jnz avx_vex_reg_ok - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [vex_register],al - avx_vex_reg_ok: - cmp [mmx_size],0 - je avx_regs_size_ok - cmp ah,16 - jne invalid_operand - avx_regs_size_ok: - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_rm - jc avx_regs_reg - mov al,[extended_code] - mov ah,[supplemental_code] - cmp al,0C2h - je sse_cmp_mem_ok - cmp ax,443Ah - je sse_cmp_mem_ok - mov al,[base_code] - and al,11011100b - cmp al,11001100b - je sse_cmp_mem_ok - cmp [immediate_size],1 - je mmx_imm8 - cmp [immediate_size],0 - jge instruction_ready - cmp byte [esi],',' - jne invalid_operand - inc esi - call take_avx_register - shl al,4 - or byte [value],al - test al,80h - jz avx_regs_mem_reg_store - cmp [code_type],64 - jne invalid_operand - avx_regs_mem_reg_store: - call take_imm4_if_needed - call store_instruction_with_imm8 - jmp instruction_assembled - avx_regs_reg: - mov bl,al - mov al,[extended_code] - mov ah,[supplemental_code] - cmp al,0C2h - je sse_cmp_nomem_ok - cmp ax,443Ah - je sse_cmp_nomem_ok - mov al,[base_code] - and al,11011100b - cmp al,11001100b - je sse_cmp_nomem_ok - cmp [immediate_size],1 - je mmx_nomem_imm8 - cmp [immediate_size],0 - jge nomem_instruction_ready - lods byte [esi] - cmp al,',' - jne invalid_operand - mov al,bl - shl al,4 - or byte [value],al - test al,80h - jz avx_regs_reg_ - cmp [code_type],64 - jne invalid_operand - avx_regs_reg_: - call take_avx_rm - jc avx_regs_reg_reg - cmp [immediate_size],-2 - jg invalid_operand - or [rex_prefix],8 - call take_imm4_if_needed - call store_instruction_with_imm8 - jmp instruction_assembled - avx_regs_reg_reg: - shl al,4 - and byte [value],1111b - or byte [value],al - call take_imm4_if_needed - call store_nomem_instruction - mov al,byte [value] - stos byte [edi] - jmp instruction_assembled - take_avx_rm: - xor cl,cl - xchg cl,[operand_size] - lods byte [esi] - call get_size_operator - cmp al,'[' - je take_avx_mem - mov [operand_size],cl - cmp al,10h - jne invalid_operand - lods byte [esi] - call convert_avx_register - cmp [mmx_size],0 - je avx_reg_ok - cmp ah,16 - jne invalid_operand - avx_reg_ok: - stc - ret - take_avx_mem: - push ecx - call get_address - pop eax - cmp [mmx_size],0 - jne avx_smem - xchg al,[operand_size] - or al,al - jz avx_mem_ok - cmp al,[operand_size] - jne operand_sizes_do_not_match - avx_mem_ok: - clc - ret - avx_smem: - xchg al,[operand_size] - or al,al - jz avx_smem_ok - cmp al,[mmx_size] - jne invalid_operand_size - avx_smem_ok: - clc - ret - take_imm4_if_needed: - cmp [immediate_size],-3 - jne imm4_ok - push ebx ecx edx - lods byte [esi] - cmp al,',' - jne invalid_operand - lods byte [esi] - cmp al,'(' - jne invalid_operand - call get_byte_value - test al,11110000b - jnz value_out_of_range - or byte [value],al - pop edx ecx ebx - imm4_ok: - ret - -avx_single_source_128bit_instruction_38: - or [vex_required],2 -avx_128bit_instruction_38: - mov [mmx_size],16 - jmp avx_instruction_38_setup -avx_single_source_instruction_38: - or [vex_required],2 -avx_instruction_38: - mov [mmx_size],0 - avx_instruction_38_setup: - mov [opcode_prefix],66h - mov [supplemental_code],al - mov al,38h - jmp avx_instruction -avx_instruction_38_w1: - or [rex_prefix],8 - jmp avx_instruction_38 - -avx_ss_instruction_3a_imm8: - mov [mmx_size],4 - jmp avx_instruction_3a_imm8_setup -avx_sd_instruction_3a_imm8: - mov [mmx_size],8 - jmp avx_instruction_3a_imm8_setup -avx_single_source_128bit_instruction_3a_imm8: - or [vex_required],2 -avx_128bit_instruction_3a_imm8: - mov [mmx_size],16 - jmp avx_instruction_3a_imm8_setup -avx_triple_source_instruction_3a: - mov [mmx_size],0 - mov [immediate_size],-1 - mov byte [value],0 - jmp avx_instruction_3a_setup -avx_single_source_instruction_3a_imm8: - or [vex_required],2 -avx_instruction_3a_imm8: - mov [mmx_size],0 - avx_instruction_3a_imm8_setup: - mov [immediate_size],1 - avx_instruction_3a_setup: - mov [opcode_prefix],66h - mov [supplemental_code],al - mov al,3Ah - jmp avx_instruction -avx_pclmulqdq_instruction: - mov byte [value],al - mov [mmx_size],16 - mov al,44h - jmp avx_instruction_3a_setup - -avx_permq_instruction: - or [vex_required],2 - or [rex_prefix],8 -avx_perm2f128_instruction: - mov [immediate_size],1 - mov ah,3Ah - jmp avx_perm_instruction -avx_permd_instruction: - mov ah,38h - avx_perm_instruction: - mov [opcode_prefix],66h - mov [base_code],0Fh - mov [extended_code],ah - mov [supplemental_code],al - mov [mmx_size],0 - or [vex_required],1 - call take_avx_register - cmp ah,32 - jne invalid_operand_size - mov [postbyte_register],al - jmp avx_vex_reg - -avx_movdqu_instruction: - mov [opcode_prefix],0F3h - jmp avx_movps_instruction -avx_movpd_instruction: - mov [opcode_prefix],66h -avx_movps_instruction: - mov [mmx_size],0 - or [vex_required],2 - mov [base_code],0Fh - mov [extended_code],al - lods byte [esi] - call get_size_operator - cmp al,10h - je avx_reg - inc [extended_code] - test [extended_code],1 - jnz avx_mem - add [extended_code],-1+10h - avx_mem: - cmp al,'[' - jne invalid_operand - call get_address - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [postbyte_register],al - jmp instruction_ready -avx_movntpd_instruction: - mov [opcode_prefix],66h -avx_movntps_instruction: - or [vex_required],1 - mov [base_code],0Fh - mov [extended_code],al - lods byte [esi] - call get_size_operator - jmp avx_mem -avx_lddqu_instruction: - mov [opcode_prefix],0F2h - mov [mmx_size],0 - xor cx,cx - avx_load_instruction: - mov [base_code],0Fh - mov [extended_code],al - or [vex_required],1 - call take_avx_register - or cl,cl - jz avx_load_reg_ok - cmp ah,cl - jne invalid_operand - avx_load_reg_ok: - cmp [mmx_size],0 - je avx_load_reg_ - xor ah,ah - avx_load_reg_: - xchg ah,[operand_size] - push eax - lods byte [esi] - cmp al,',' - jne invalid_operand - lods byte [esi] - call get_size_operator - cmp al,10h - je avx_load_reg_reg - cmp al,'[' - jne invalid_operand - call get_address - pop eax - xchg ah,[operand_size] - mov [postbyte_register],al - mov al,[mmx_size] - or al,al - jz instruction_ready - or ah,ah - jz instruction_ready - cmp al,ah - jne invalid_operand_size - jmp instruction_ready - avx_load_reg_reg: - lods byte [esi] - call convert_avx_register - cmp ch,ah - jne invalid_operand - mov bl,al - pop eax - xchg ah,[operand_size] - mov [postbyte_register],al - jmp nomem_instruction_ready - -avx_movntdqa_instruction: - mov [mmx_size],0 - xor cx,cx - jmp avx_load_instruction_38 -avx_broadcastss_instruction: - mov [mmx_size],4 - xor cl,cl - mov ch,16 - jmp avx_load_instruction_38 -avx_broadcastsd_instruction: - mov [mmx_size],8 - mov cl,32 - mov ch,16 - jmp avx_load_instruction_38 -avx_pbroadcastb_instruction: - mov [mmx_size],1 - jmp avx_pbroadcast_instruction -avx_pbroadcastw_instruction: - mov [mmx_size],2 - jmp avx_pbroadcast_instruction -avx_pbroadcastd_instruction: - mov [mmx_size],4 - jmp avx_pbroadcast_instruction -avx_pbroadcastq_instruction: - mov [mmx_size],8 - avx_pbroadcast_instruction: - xor cl,cl - mov ch,16 - jmp avx_load_instruction_38 -avx_broadcastf128_instruction: - mov [mmx_size],16 - mov cl,32 - xor ch,ch - avx_load_instruction_38: - mov [opcode_prefix],66h - mov [supplemental_code],al - mov al,38h - jmp avx_load_instruction -avx_movlpd_instruction: - mov [opcode_prefix],66h -avx_movlps_instruction: - mov [base_code],0Fh - mov [extended_code],al - mov [mmx_size],8 - or [vex_required],1 - lods byte [esi] - call get_size_operator - cmp al,10h - jne avx_movlps_mem - lods byte [esi] - call convert_avx_register - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [vex_register],al - cmp [operand_size],16 - jne invalid_operand - mov [operand_size],0 - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_rm - jc invalid_operand - jmp instruction_ready - avx_movlps_mem: - cmp al,'[' - jne invalid_operand - call get_address - mov al,[operand_size] - or al,al - jz avx_movlps_mem_size_ok - cmp al,[mmx_size] - jne invalid_operand_size - mov [operand_size],0 - avx_movlps_mem_size_ok: - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - cmp ah,16 - jne invalid_operand - mov [postbyte_register],al - inc [extended_code] - jmp instruction_ready -avx_movhlps_instruction: - mov [base_code],0Fh - mov [extended_code],al - or [vex_required],1 - call take_avx_register - cmp ah,16 - jne invalid_operand - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [vex_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov bl,al - jmp nomem_instruction_ready -avx_maskmov_w1_instruction: - or [rex_prefix],8 -avx_maskmov_instruction: - call setup_66_0f_38 - mov [mmx_size],0 - or [vex_required],1 - lods byte [esi] - call get_size_operator - cmp al,10h - jne avx_maskmov_mem - lods byte [esi] - call convert_avx_register - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [vex_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_rm - jc invalid_operand - jmp instruction_ready - avx_maskmov_mem: - cmp al,'[' - jne invalid_operand - call get_address - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [vex_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [postbyte_register],al - add [supplemental_code],2 - jmp instruction_ready - setup_66_0f_38: - mov [extended_code],38h - mov [supplemental_code],al - mov [base_code],0Fh - mov [opcode_prefix],66h - ret -avx_movd_instruction: - or [vex_required],1 - jmp movd_instruction -avx_movq_instruction: - or [vex_required],1 - jmp movq_instruction -avx_movddup_instruction: - or [vex_required],1 - mov [opcode_prefix],0F2h - mov [base_code],0Fh - mov [extended_code],al - lods byte [esi] - call get_size_operator - cmp al,10h - jne invalid_operand - lods byte [esi] - call convert_avx_register - mov [postbyte_register],al - mov [mmx_size],0 - cmp ah,32 - je avx_regs_size_ok - mov [mmx_size],8 - jmp avx_regs_size_ok -avx_movmskpd_instruction: - mov [opcode_prefix],66h -avx_movmskps_instruction: - mov [base_code],0Fh - mov [extended_code],50h - or [vex_required],1 - lods byte [esi] - call get_size_operator - cmp al,10h - jne invalid_operand - lods byte [esi] - call convert_register - mov [postbyte_register],al - cmp ah,4 - je avx_movmskps_reg_ok - cmp ah,8 - jne invalid_operand_size - cmp [code_type],64 - jne invalid_operand - avx_movmskps_reg_ok: - mov [operand_size],0 - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov bl,al - jmp nomem_instruction_ready -avx_movsd_instruction: - mov [opcode_prefix],0F2h - mov [mmx_size],8 - jmp avx_movs_instruction -avx_movss_instruction: - mov [opcode_prefix],0F3h - mov [mmx_size],4 - avx_movs_instruction: - or [vex_required],1 - mov [base_code],0Fh - mov [extended_code],10h - lods byte [esi] - call get_size_operator - cmp al,10h - jne avx_movlps_mem - lods byte [esi] - call convert_xmm_register - mov [postbyte_register],al - xor cl,cl - xchg cl,[operand_size] - lods byte [esi] - cmp al,',' - jne invalid_operand - lods byte [esi] - call get_size_operator - cmp al,10h - jne avx_movs_reg_mem - mov [operand_size],cl - lods byte [esi] - call convert_avx_register - mov [vex_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov bl,al - cmp bl,8 - jb nomem_instruction_ready - inc [extended_code] - xchg bl,[postbyte_register] - jmp nomem_instruction_ready - avx_movs_reg_mem: - cmp al,'[' - jne invalid_operand - call get_address - mov al,[operand_size] - or al,al - jz avx_movs_reg_mem_ok - cmp al,[mmx_size] - jne invalid_operand_size - avx_movs_reg_mem_ok: - jmp instruction_ready - -avx_cvtdq2pd_instruction: - mov [opcode_prefix],0F3h -avx_cvtps2pd_instruction: - mov [base_code],0Fh - mov [extended_code],al - or [vex_required],1 - call take_avx_register - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - xor cl,cl - xchg cl,[operand_size] - lods byte [esi] - call get_size_operator - cmp al,10h - jne avx_cvtdq2pd_reg_mem - lods byte [esi] - call convert_xmm_register - mov bl,al - mov [operand_size],cl - jmp nomem_instruction_ready - avx_cvtdq2pd_reg_mem: - cmp al,'[' - jne invalid_operand - mov [mmx_size],cl - call get_address - mov al,[mmx_size] - mov ah,al - xchg al,[operand_size] - or al,al - jz instruction_ready - shl al,1 - cmp al,ah - jne invalid_operand_size - jmp instruction_ready -avx_cvtpd2dq_instruction: - mov [opcode_prefix],0F2h - jmp avx_cvtpd_instruction -avx_cvtpd2ps_instruction: - mov [opcode_prefix],66h - avx_cvtpd_instruction: - mov [base_code],0Fh - mov [extended_code],al - or [vex_required],1 - call take_avx_register - mov [postbyte_register],al - cmp ah,16 - jne invalid_operand - lods byte [esi] - cmp al,',' - jne invalid_operand - mov [operand_size],0 - lods byte [esi] - call get_size_operator - cmp al,10h - jne avx_cvtpd2dq_reg_mem - lods byte [esi] - call convert_avx_register - mov bl,al - jmp nomem_instruction_ready - avx_cvtpd2dq_reg_mem: - cmp al,'[' - jne invalid_operand - call get_address - mov al,[operand_size] - or al,al - jz operand_size_not_specified - cmp al,16 - je instruction_ready - cmp al,32 - jne invalid_operand_size - jmp instruction_ready -avx_cvttps2dq_instruction: - or [vex_required],2 - mov [opcode_prefix],0F3h - mov [mmx_size],0 - jmp avx_instruction -avx_cvtsd2si_instruction: - or [vex_required],1 - jmp cvtsd2si_instruction -avx_cvtss2si_instruction: - or [vex_required],1 - jmp cvtss2si_instruction -avx_cvtsi2ss_instruction: - mov [opcode_prefix],0F3h - jmp avx_cvtsi_instruction -avx_cvtsi2sd_instruction: - mov [opcode_prefix],0F2h - avx_cvtsi_instruction: - mov [base_code],0Fh - mov [extended_code],al - or [vex_required],1 - call take_avx_register - cmp ah,16 - jne invalid_operand_size - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [vex_register],al - jmp cvtsi_xmmreg - -avx_extractf128_instruction: - or [vex_required],1 - call setup_66_0f_3a - lods byte [esi] - call get_size_operator - cmp al,10h - je avx_extractf128_reg - cmp al,'[' - jne invalid_operand - call get_address - xor al,al - xchg al,[operand_size] - or al,al - jz avx_extractf128_mem_size_ok - cmp al,16 - jne invalid_operand_size - avx_extractf128_mem_size_ok: - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - cmp ah,32 - jne invalid_operand_size - mov [postbyte_register],al - jmp mmx_imm8 - avx_extractf128_reg: - lods byte [esi] - call convert_xmm_register - mov [operand_size],0 - push eax - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - cmp ah,32 - jne invalid_operand_size - mov [postbyte_register],al - pop ebx - jmp mmx_nomem_imm8 - setup_66_0f_3a: - mov [extended_code],3Ah - mov [supplemental_code],al - mov [base_code],0Fh - mov [opcode_prefix],66h - ret -avx_insertf128_instruction: - or [vex_required],1 - call setup_66_0f_3a - call take_avx_register - cmp ah,32 - jne invalid_operand - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [vex_register],al - mov [operand_size],0 - mov [mmx_size],16 - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_rm - mov [operand_size],32 - jnc mmx_imm8 - mov bl,al - jmp mmx_nomem_imm8 -avx_extractps_instruction: - or [vex_required],1 - jmp extractps_instruction -avx_insertps_instruction: - or [vex_required],1 - call take_avx_register - cmp ah,16 - jne invalid_operand_size - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [vex_register],al - jmp insertps_xmmreg -avx_pextrb_instruction: - or [vex_required],1 - jmp pextrb_instruction -avx_pextrw_instruction: - or [vex_required],1 - jmp pextrw_instruction -avx_pextrd_instruction: - or [vex_required],1 - jmp pextrd_instruction -avx_pextrq_instruction: - or [vex_required],1 - jmp pextrq_instruction -avx_pinsrb_instruction: - mov [mmx_size],1 - or [vex_required],1 - jmp avx_pinsr_instruction_3a -avx_pinsrw_instruction: - mov [mmx_size],2 - or [vex_required],1 - jmp avx_pinsr_instruction -avx_pinsrd_instruction: - mov [mmx_size],4 - or [vex_required],1 - jmp avx_pinsr_instruction_3a -avx_pinsrq_instruction: - mov [mmx_size],8 - or [vex_required],1 - call operand_64bit - avx_pinsr_instruction_3a: - mov [supplemental_code],al - mov al,3Ah - avx_pinsr_instruction: - mov [opcode_prefix],66h - mov [base_code],0Fh - mov [extended_code],al - call take_avx_register - cmp ah,16 - jne invalid_operand_size - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [vex_register],al - jmp pinsr_xmmreg -avx_maskmovdqu_instruction: - or [vex_required],1 - jmp maskmovdqu_instruction -avx_pmovmskb_instruction: - or [vex_required],1 - mov [opcode_prefix],66h - mov [base_code],0Fh - mov [extended_code],al - lods byte [esi] - call get_size_operator - cmp al,10h - jne invalid_operand - lods byte [esi] - call convert_register - cmp ah,4 - je avx_pmovmskb_reg_size_ok - cmp [code_type],64 - jne invalid_operand_size - cmp ah,8 - jnz invalid_operand_size - avx_pmovmskb_reg_size_ok: - mov [postbyte_register],al - mov [operand_size],0 - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov bl,al - jmp nomem_instruction_ready -avx_pshufd_instruction: - or [vex_required],1 - mov [mmx_size],0 - mov [opcode_prefix],al - mov [base_code],0Fh - mov [extended_code],70h - call take_avx_register - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_rm - jnc mmx_imm8 - mov bl,al - jmp mmx_nomem_imm8 - -avx_pmovsxbw_instruction: - mov [mmx_size],8 - jmp avx_pmovsx_instruction -avx_pmovsxbd_instruction: - mov [mmx_size],4 - jmp avx_pmovsx_instruction -avx_pmovsxbq_instruction: - mov [mmx_size],2 - jmp avx_pmovsx_instruction -avx_pmovsxwd_instruction: - mov [mmx_size],8 - jmp avx_pmovsx_instruction -avx_pmovsxwq_instruction: - mov [mmx_size],4 - jmp avx_pmovsx_instruction -avx_pmovsxdq_instruction: - mov [mmx_size],8 - avx_pmovsx_instruction: - or [vex_required],1 - call setup_66_0f_38 - call take_avx_register - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - xor al,al - xchg al,[operand_size] - push eax - lods byte [esi] - call get_size_operator - cmp al,10h - je avx_pmovsx_xmmreg_reg - cmp al,'[' - jne invalid_operand - call get_address - pop eax - cmp al,32 - jb avx_pmovsx_size_check - shl [mmx_size],1 - avx_pmovsx_size_check: - xchg al,[operand_size] - test al,al - jz instruction_ready - cmp al,[mmx_size] - jne invalid_operand_size - jmp instruction_ready - avx_pmovsx_xmmreg_reg: - lods byte [esi] - call convert_xmm_register - mov bl,al - pop eax - mov [operand_size],al - jmp nomem_instruction_ready -avx_permil_instruction: - call setup_66_0f_3a - or [vex_required],1 - call take_avx_register - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - lods byte [esi] - call get_size_operator - cmp al,'[' - je avx_permil_reg_mem - cmp al,10h - jne invalid_operand - lods byte [esi] - call convert_avx_register - mov [vex_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - push esi - xor cl,cl - xchg cl,[operand_size] - lods byte [esi] - call get_size_operator - xchg cl,[operand_size] - pop esi - cmp al,'[' - je avx_permil_reg_reg_mem - cmp al,10h - jne avx_permil_reg_reg_imm8 - call take_avx_register - mov bl,al - mov [extended_code],38h - add [supplemental_code],8 - jmp nomem_instruction_ready - avx_permil_reg_reg_mem: - lods byte [esi] - call get_size_operator - call get_address - mov [extended_code],38h - add [supplemental_code],8 - jmp instruction_ready - avx_permil_reg_reg_imm8: - dec esi - xor bl,bl - xchg bl,[vex_register] - jmp mmx_nomem_imm8 - avx_permil_reg_mem: - call get_address - jmp mmx_imm8 -avx_bit_shift_instruction: - mov [opcode_prefix],66h - mov [base_code],0Fh - mov [extended_code],al - or [vex_required],1 - call take_avx_register - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [vex_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - push esi - xor cl,cl - xchg cl,[operand_size] - lods byte [esi] - call get_size_operator - cmp al,10h - je avx_bit_shift_regs_reg - pop esi - cmp al,'[' - je avx_bit_shift_regs_mem - xchg cl,[operand_size] - dec esi - mov bl,[extended_code] - mov al,bl - shr bl,4 - and al,1111b - add al,70h - mov [extended_code],al - sub bl,0Ch - shl bl,1 - xchg bl,[postbyte_register] - xchg bl,[vex_register] - jmp mmx_nomem_imm8 - avx_bit_shift_regs_reg: - pop eax - lods byte [esi] - call convert_xmm_register - xchg cl,[operand_size] - mov bl,al - jmp nomem_instruction_ready - avx_bit_shift_regs_mem: - push ecx - lods byte [esi] - call get_size_operator - call get_address - pop eax - xchg al,[operand_size] - test al,al - jz instruction_ready - cmp al,16 - jne invalid_operand_size - jmp instruction_ready -avx_pslldq_instruction: - mov [postbyte_register],al - mov [opcode_prefix],66h - mov [base_code],0Fh - mov [extended_code],73h - or [vex_required],1 - call take_avx_register - mov [vex_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov bl,al - jmp mmx_nomem_imm8 - -vzeroall_instruction: - mov [operand_size],32 -vzeroupper_instruction: - mov [base_code],0Fh - mov [extended_code],al - or [vex_required],1 - call store_instruction_code - jmp instruction_assembled -vldmxcsr_instruction: - or [vex_required],1 - jmp fxsave_instruction -vcvtph2ps_instruction: - mov [opcode_prefix],66h - mov [supplemental_code],al - mov al,38h - jmp avx_cvtps2pd_instruction -vcvtps2ph_instruction: - call setup_66_0f_3a - or [vex_required],1 - lods byte [esi] - call get_size_operator - cmp al,10h - je vcvtps2ph_reg - cmp al,'[' - jne invalid_operand - call get_address - lods byte [esi] - cmp al,',' - jne invalid_operand - shl [operand_size],1 - call take_avx_register - mov [postbyte_register],al - jmp mmx_imm8 - vcvtps2ph_reg: - lods byte [esi] - call convert_xmm_register - mov bl,al - mov [operand_size],0 - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [postbyte_register],al - jmp mmx_nomem_imm8 - -bmi_instruction: - mov [base_code],0Fh - mov [extended_code],38h - mov [supplemental_code],0F3h - mov [postbyte_register],al - bmi_reg: - or [vex_required],1 - lods byte [esi] - call get_size_operator - cmp al,10h - jne invalid_operand - lods byte [esi] - call convert_register - mov [vex_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - lods byte [esi] - call get_size_operator - cmp al,10h - je bmi_reg_reg - cmp al,'[' - jne invalid_argument - call get_address - call operand_32or64 - jmp instruction_ready - bmi_reg_reg: - lods byte [esi] - call convert_register - mov bl,al - call operand_32or64 - jmp nomem_instruction_ready - operand_32or64: - mov al,[operand_size] - cmp al,4 - je operand_32or64_ok - cmp al,8 - jne invalid_operand_size - cmp [code_type],64 - jne invalid_operand - or [rex_prefix],8 - operand_32or64_ok: - ret -pdep_instruction: - mov [opcode_prefix],0F2h - jmp andn_instruction -pext_instruction: - mov [opcode_prefix],0F3h -andn_instruction: - mov [base_code],0Fh - mov [extended_code],38h - mov [supplemental_code],al - or [vex_required],1 - lods byte [esi] - call get_size_operator - cmp al,10h - jne invalid_operand - lods byte [esi] - call convert_register - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - jmp bmi_reg -sarx_instruction: - mov [opcode_prefix],0F3h - jmp bzhi_instruction -shrx_instruction: - mov [opcode_prefix],0F2h - jmp bzhi_instruction -shlx_instruction: - mov [opcode_prefix],66h -bzhi_instruction: - mov [base_code],0Fh - mov [extended_code],38h - mov [supplemental_code],al - or [vex_required],1 - call get_reg_mem - jc bzhi_reg_reg - call get_vex_source_register - jc invalid_operand - call operand_32or64 - jmp instruction_ready - bzhi_reg_reg: - call get_vex_source_register - jc invalid_operand - call operand_32or64 - jmp nomem_instruction_ready - get_vex_source_register: - lods byte [esi] - cmp al,',' - jne invalid_operand - lods byte [esi] - call get_size_operator - cmp al,10h - jne no_vex_source_register - lods byte [esi] - call convert_register - mov [vex_register],al - clc - ret - no_vex_source_register: - stc - ret -bextr_instruction: - mov [base_code],0Fh - mov [extended_code],38h - mov [supplemental_code],al - or [vex_required],1 - call get_reg_mem - jc bextr_reg_reg - call get_vex_source_register - jc bextr_reg_mem_imm32 - call operand_32or64 - jmp instruction_ready - bextr_reg_reg: - call get_vex_source_register - jc bextr_reg_reg_imm32 - call operand_32or64 - jmp nomem_instruction_ready - setup_bextr_imm_opcode: - mov [xop_opcode_map],0Ah - mov [base_code],10h - call operand_32or64 - ret - bextr_reg_mem_imm32: - call get_imm32 - call setup_bextr_imm_opcode - jmp store_instruction_with_imm32 - bextr_reg_reg_imm32: - call get_imm32 - call setup_bextr_imm_opcode - store_nomem_instruction_with_imm32: - call store_nomem_instruction - mov eax,dword [value] - call mark_relocation - stos dword [edi] - jmp instruction_assembled - get_imm32: - cmp al,'(' - jne invalid_operand - push edx ebx ecx - call get_dword_value - mov dword [value],eax - pop ecx ebx edx - ret -rorx_instruction: - mov [opcode_prefix],0F2h - mov [base_code],0Fh - mov [extended_code],3Ah - mov [supplemental_code],al - or [vex_required],1 - call get_reg_mem - jc rorx_reg_reg - call operand_32or64 - jmp mmx_imm8 - rorx_reg_reg: - call operand_32or64 - jmp mmx_nomem_imm8 - -fma_instruction_pd: - or [rex_prefix],8 -fma_instruction_ps: - mov [mmx_size],0 - jmp avx_instruction_38_setup -fma_instruction_sd: - or [rex_prefix],8 - mov [mmx_size],8 - jmp avx_instruction_38_setup -fma_instruction_ss: - mov [mmx_size],4 - jmp avx_instruction_38_setup - -fma4_instruction_p: - mov [mmx_size],0 - jmp fma4_instruction_setup -fma4_instruction_sd: - mov [mmx_size],8 - jmp fma4_instruction_setup -fma4_instruction_ss: - mov [mmx_size],4 - fma4_instruction_setup: - mov [immediate_size],-2 - mov byte [value],0 - jmp avx_instruction_3a_setup - -xop_single_source_sd_instruction: - or [vex_required],2 - mov [mmx_size],8 - jmp xop_instruction_9 -xop_single_source_ss_instruction: - or [vex_required],2 - mov [mmx_size],4 - jmp xop_instruction_9 -xop_single_source_instruction: - or [vex_required],2 - mov [mmx_size],0 - xop_instruction_9: - mov [base_code],al - mov [xop_opcode_map],9 - jmp avx_common -xop_single_source_128bit_instruction: - or [vex_required],2 - mov [mmx_size],16 - jmp xop_instruction_9 -xop_triple_source_128bit_instruction: - mov [immediate_size],-1 - mov byte [value],0 - mov [mmx_size],16 - jmp xop_instruction_8 -xop_128bit_instruction: - mov [immediate_size],-2 - mov byte [value],0 - mov [mmx_size],16 - xop_instruction_8: - mov [base_code],al - mov [xop_opcode_map],8 - jmp avx_common -xop_pcom_b_instruction: - mov ah,0CCh - jmp xop_pcom_instruction -xop_pcom_d_instruction: - mov ah,0CEh - jmp xop_pcom_instruction -xop_pcom_q_instruction: - mov ah,0CFh - jmp xop_pcom_instruction -xop_pcom_w_instruction: - mov ah,0CDh - jmp xop_pcom_instruction -xop_pcom_ub_instruction: - mov ah,0ECh - jmp xop_pcom_instruction -xop_pcom_ud_instruction: - mov ah,0EEh - jmp xop_pcom_instruction -xop_pcom_uq_instruction: - mov ah,0EFh - jmp xop_pcom_instruction -xop_pcom_uw_instruction: - mov ah,0EDh - xop_pcom_instruction: - mov byte [value],al - mov [mmx_size],16 - mov [base_code],ah - mov [xop_opcode_map],8 - jmp avx_common -vpcmov_instruction: - or [vex_required],1 - mov [immediate_size],-2 - mov byte [value],0 - mov [mmx_size],0 - mov [base_code],al - mov [xop_opcode_map],8 - jmp avx_common -xop_shift_instruction: - mov [base_code],al - or [vex_required],1 - mov [xop_opcode_map],9 - call take_avx_register - cmp ah,16 - jne invalid_operand - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - lods byte [esi] - call get_size_operator - cmp al,'[' - je xop_shift_reg_mem - cmp al,10h - jne invalid_operand - lods byte [esi] - call convert_xmm_register - mov [vex_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - push esi - xor cl,cl - xchg cl,[operand_size] - lods byte [esi] - call get_size_operator - pop esi - xchg cl,[operand_size] - cmp al,'[' - je xop_shift_reg_reg_mem - cmp al,10h - jne xop_shift_reg_reg_imm - call take_avx_register - mov bl,al - xchg bl,[vex_register] - jmp nomem_instruction_ready - xop_shift_reg_reg_mem: - or [rex_prefix],8 - lods byte [esi] - call get_size_operator - call get_address - jmp instruction_ready - xop_shift_reg_reg_imm: - xor bl,bl - xchg bl,[vex_register] - cmp [base_code],94h - jae invalid_operand - add [base_code],30h - mov [xop_opcode_map],8 - dec esi - jmp mmx_nomem_imm8 - xop_shift_reg_mem: - call get_address - lods byte [esi] - cmp al,',' - jne invalid_operand - push esi - xor cl,cl - xchg cl,[operand_size] - lods byte [esi] - call get_size_operator - pop esi - xchg cl,[operand_size] - cmp al,10h - jne xop_shift_reg_mem_imm - call take_avx_register - mov [vex_register],al - jmp instruction_ready - xop_shift_reg_mem_imm: - cmp [base_code],94h - jae invalid_operand - add [base_code],30h - mov [xop_opcode_map],8 - dec esi - jmp mmx_imm8 - -vpermil_2pd_instruction: - mov [immediate_size],-2 - mov byte [value],al - mov al,49h - jmp vpermil2_instruction_setup -vpermil_2ps_instruction: - mov [immediate_size],-2 - mov byte [value],al - mov al,48h - jmp vpermil2_instruction_setup -vpermil2_instruction: - mov [immediate_size],-3 - mov byte [value],0 - vpermil2_instruction_setup: - mov [base_code],0Fh - mov [supplemental_code],al - mov al,3Ah - mov [mmx_size],0 - jmp avx_instruction - -tbm_instruction: - mov [xop_opcode_map],9 - mov ah,al - shr ah,4 - and al,111b - mov [base_code],ah - mov [postbyte_register],al - jmp bmi_reg - -llwpcb_instruction: - or [vex_required],1 - mov [xop_opcode_map],9 - mov [base_code],12h - mov [postbyte_register],al - lods byte [esi] - call get_size_operator - cmp al,10h - jne invalid_operand - lods byte [esi] - call convert_register - mov bl,al - call operand_32or64 - jmp nomem_instruction_ready -lwpins_instruction: - or [vex_required],1 - mov [xop_opcode_map],0Ah - mov [base_code],12h - mov [vex_register],al - lods byte [esi] - call get_size_operator - cmp al,10h - jne invalid_operand - lods byte [esi] - call convert_register - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - xor cl,cl - xchg cl,[operand_size] - lods byte [esi] - call get_size_operator - cmp al,10h - je lwpins_reg_reg - cmp al,'[' - jne invalid_argument - push ecx - call get_address - pop eax - xchg al,[operand_size] - test al,al - jz lwpins_reg_mem_size_ok - cmp al,4 - jne invalid_operand_size - lwpins_reg_mem_size_ok: - call prepare_lwpins - jmp store_instruction_with_imm32 - lwpins_reg_reg: - lods byte [esi] - call convert_register - cmp ah,4 - jne invalid_operand_size - mov [operand_size],cl - mov bl,al - call prepare_lwpins - jmp store_nomem_instruction_with_imm32 - prepare_lwpins: - lods byte [esi] - cmp al,',' - jne invalid_operand - lods byte [esi] - call get_imm32 - call operand_32or64 - mov al,[vex_register] - xchg al,[postbyte_register] - mov [vex_register],al - ret - -gather_instruction_pd: - or [rex_prefix],8 -gather_instruction_ps: - call setup_66_0f_38 - or [vex_required],4 - call take_avx_register - mov [postbyte_register],al - lods byte [esi] - cmp al,',' - jne invalid_operand - xor cl,cl - xchg cl,[operand_size] - push ecx - lods byte [esi] - call get_size_operator - cmp al,'[' - jne invalid_argument - call get_address - pop eax - xchg al,[operand_size] - test al,al - jz gather_elements_size_ok - test [rex_prefix],8 - jnz gather_elements_64bit - cmp al,4 - jne invalid_operand_size - jmp gather_elements_size_ok - gather_elements_64bit: - cmp al,8 - jne invalid_operand_size - gather_elements_size_ok: - lods byte [esi] - cmp al,',' - jne invalid_operand - call take_avx_register - mov [vex_register],al - cmp al,[postbyte_register] - je disallowed_combination_of_registers - mov al,bl - and al,1111b - cmp al,[postbyte_register] - je disallowed_combination_of_registers - cmp al,[vex_register] - je disallowed_combination_of_registers - mov al,bl - shr al,4 - cmp al,0Ch - je gather_vr_128bit - mov al,[rex_prefix] - shr al,3 - xor al,[supplemental_code] - test al,1 - jz gather_256bit - test [supplemental_code],1 - jz invalid_operand_size - mov al,32 - xchg al,[operand_size] - cmp al,16 - jne invalid_operand_size - jmp instruction_ready - gather_256bit: - cmp ah,32 - jne invalid_operand_size - jmp instruction_ready - gather_vr_128bit: - cmp ah,16 - je instruction_ready - test [supplemental_code],1 - jnz invalid_operand_size - test [rex_prefix],8 - jz invalid_operand_size - jmp instruction_ready - -take_avx_register: - lods byte [esi] - call get_size_operator - cmp al,10h - jne invalid_operand - lods byte [esi] -convert_avx_register: - mov ah,al - and al,0Fh - and ah,0F0h - sub ah,0B0h - jbe invalid_operand - cmp ah,32 - ja invalid_operand - cmp al,8 - jb match_register_size - cmp [code_type],64 - jne invalid_operand - jmp match_register_size -store_vex_instruction_code: - mov al,[base_code] - cmp al,0Fh - jne store_xop_instruction_code - mov ah,[extended_code] - cmp ah,38h - je store_vex_0f38_instruction_code - cmp ah,3Ah - je store_vex_0f3a_instruction_code - test [rex_prefix],1011b - jnz store_vex_0f_instruction_code - mov [edi+2],ah - mov byte [edi],0C5h - mov al,[vex_register] - not al - shl al,3 - mov ah,[rex_prefix] - shl ah,5 - and ah,80h - xor al,ah - call get_vex_lpp_bits - mov [edi+1],al - call check_vex - add edi,3 - ret - get_vex_lpp_bits: - cmp [operand_size],32 - jne vex_l_bit_ok - or al,100b - vex_l_bit_ok: - mov ah,[opcode_prefix] - cmp ah,66h - je vex_66 - cmp ah,0F3h - je vex_f3 - cmp ah,0F2h - je vex_f2 - test ah,ah - jnz disallowed_combination_of_registers - ret - vex_f2: - or al,11b - ret - vex_f3: - or al,10b - ret - vex_66: - or al,1 - ret - store_vex_0f38_instruction_code: - mov al,11100010b - mov ah,[supplemental_code] - jmp make_c4_vex - store_vex_0f3a_instruction_code: - mov al,11100011b - mov ah,[supplemental_code] - jmp make_c4_vex - store_vex_0f_instruction_code: - mov al,11100001b - make_c4_vex: - mov [edi+3],ah - mov byte [edi],0C4h - mov ah,[rex_prefix] - shl ah,5 - xor al,ah - mov [edi+1],al - call check_vex - mov al,[vex_register] - xor al,1111b - shl al,3 - mov ah,[rex_prefix] - shl ah,4 - and ah,80h - or al,ah - call get_vex_lpp_bits - mov [edi+2],al - add edi,4 - ret - check_vex: - cmp [code_type],64 - je vex_ok - not al - test al,11000000b - jnz invalid_operand - test [rex_prefix],40h - jnz invalid_operand - vex_ok: - ret -store_xop_instruction_code: - mov [edi+3],al - mov byte [edi],8Fh - mov al,[xop_opcode_map] - mov ah,[rex_prefix] - test ah,40h - jz xop_ok - cmp [code_type],64 - jne invalid_operand - xop_ok: - not ah - shl ah,5 - xor al,ah - mov [edi+1],al - mov al,[vex_register] - xor al,1111b - shl al,3 - mov ah,[rex_prefix] - shl ah,4 - and ah,80h - or al,ah - call get_vex_lpp_bits - mov [edi+2],al - add edi,4 - ret + +; flat assembler core +; Copyright (c) 1999-2013, Tomasz Grysztar. +; All rights reserved. + +avx_single_source_pd_instruction: + or [vex_required],2 + jmp avx_pd_instruction +avx_pd_instruction_imm8: + mov [immediate_size],1 +avx_pd_instruction: + mov [opcode_prefix],66h + mov [mmx_size],0 + jmp avx_instruction +avx_single_source_ps_instruction: + or [vex_required],2 + jmp avx_ps_instruction +avx_ps_instruction_imm8: + mov [immediate_size],1 +avx_ps_instruction: + mov [mmx_size],0 + jmp avx_instruction +avx_sd_instruction_imm8: + mov [immediate_size],1 +avx_sd_instruction: + mov [opcode_prefix],0F2h + mov [mmx_size],8 + jmp avx_instruction +avx_ss_instruction_imm8: + mov [immediate_size],1 +avx_ss_instruction: + mov [opcode_prefix],0F3h + mov [mmx_size],4 + jmp avx_instruction +avx_cmp_pd_instruction: + mov [opcode_prefix],66h +avx_cmp_ps_instruction: + mov [mmx_size],0 + mov byte [value],al + mov al,0C2h + jmp avx_instruction +avx_cmp_sd_instruction: + mov [opcode_prefix],0F2h + mov [mmx_size],8 + mov byte [value],al + mov al,0C2h + jmp avx_instruction +avx_cmp_ss_instruction: + mov [opcode_prefix],0F3h + mov [mmx_size],4 + mov byte [value],al + mov al,0C2h + jmp avx_instruction +avx_comiss_instruction: + or [vex_required],2 + mov [mmx_size],4 + jmp avx_instruction +avx_comisd_instruction: + or [vex_required],2 + mov [opcode_prefix],66h + mov [mmx_size],8 + jmp avx_instruction +avx_haddps_instruction: + mov [opcode_prefix],0F2h + mov [mmx_size],0 + jmp avx_instruction +avx_movshdup_instruction: + or [vex_required],2 + mov [opcode_prefix],0F3h + mov [mmx_size],0 + jmp avx_instruction +avx_128bit_instruction: + mov [mmx_size],16 + mov [opcode_prefix],66h +avx_instruction: + mov [base_code],0Fh + mov [extended_code],al + avx_common: + or [vex_required],1 + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + avx_reg: + lods byte [esi] + call convert_avx_register + mov [postbyte_register],al + avx_vex_reg: + test [vex_required],2 + jnz avx_vex_reg_ok + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [vex_register],al + avx_vex_reg_ok: + cmp [mmx_size],0 + je avx_regs_size_ok + cmp ah,16 + jne invalid_operand + avx_regs_size_ok: + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_rm + jc avx_regs_reg + mov al,[extended_code] + mov ah,[supplemental_code] + cmp al,0C2h + je sse_cmp_mem_ok + cmp ax,443Ah + je sse_cmp_mem_ok + mov al,[base_code] + and al,11011100b + cmp al,11001100b + je sse_cmp_mem_ok + cmp [immediate_size],1 + je mmx_imm8 + cmp [immediate_size],0 + jge instruction_ready + cmp byte [esi],',' + jne invalid_operand + inc esi + call take_avx_register + shl al,4 + or byte [value],al + test al,80h + jz avx_regs_mem_reg_store + cmp [code_type],64 + jne invalid_operand + avx_regs_mem_reg_store: + call take_imm4_if_needed + call store_instruction_with_imm8 + jmp instruction_assembled + avx_regs_reg: + mov bl,al + mov al,[extended_code] + mov ah,[supplemental_code] + cmp al,0C2h + je sse_cmp_nomem_ok + cmp ax,443Ah + je sse_cmp_nomem_ok + mov al,[base_code] + and al,11011100b + cmp al,11001100b + je sse_cmp_nomem_ok + cmp [immediate_size],1 + je mmx_nomem_imm8 + cmp [immediate_size],0 + jge nomem_instruction_ready + lods byte [esi] + cmp al,',' + jne invalid_operand + mov al,bl + shl al,4 + or byte [value],al + test al,80h + jz avx_regs_reg_ + cmp [code_type],64 + jne invalid_operand + avx_regs_reg_: + call take_avx_rm + jc avx_regs_reg_reg + cmp [immediate_size],-2 + jg invalid_operand + or [rex_prefix],8 + call take_imm4_if_needed + call store_instruction_with_imm8 + jmp instruction_assembled + avx_regs_reg_reg: + shl al,4 + and byte [value],1111b + or byte [value],al + call take_imm4_if_needed + call store_nomem_instruction + mov al,byte [value] + stos byte [edi] + jmp instruction_assembled + take_avx_rm: + xor cl,cl + xchg cl,[operand_size] + lods byte [esi] + call get_size_operator + cmp al,'[' + je take_avx_mem + mov [operand_size],cl + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_avx_register + cmp [mmx_size],0 + je avx_reg_ok + cmp ah,16 + jne invalid_operand + avx_reg_ok: + stc + ret + take_avx_mem: + push ecx + call get_address + pop eax + cmp [mmx_size],0 + jne avx_smem + xchg al,[operand_size] + or al,al + jz avx_mem_ok + cmp al,[operand_size] + jne operand_sizes_do_not_match + avx_mem_ok: + clc + ret + avx_smem: + xchg al,[operand_size] + or al,al + jz avx_smem_ok + cmp al,[mmx_size] + jne invalid_operand_size + avx_smem_ok: + clc + ret + take_imm4_if_needed: + cmp [immediate_size],-3 + jne imm4_ok + push ebx ecx edx + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + cmp al,'(' + jne invalid_operand + call get_byte_value + test al,11110000b + jnz value_out_of_range + or byte [value],al + pop edx ecx ebx + imm4_ok: + ret + +avx_single_source_128bit_instruction_38: + or [vex_required],2 +avx_128bit_instruction_38: + mov [mmx_size],16 + jmp avx_instruction_38_setup +avx_single_source_instruction_38: + or [vex_required],2 +avx_instruction_38: + mov [mmx_size],0 + avx_instruction_38_setup: + mov [opcode_prefix],66h + mov [supplemental_code],al + mov al,38h + jmp avx_instruction +avx_instruction_38_w1: + or [rex_prefix],8 + jmp avx_instruction_38 + +avx_ss_instruction_3a_imm8: + mov [mmx_size],4 + jmp avx_instruction_3a_imm8_setup +avx_sd_instruction_3a_imm8: + mov [mmx_size],8 + jmp avx_instruction_3a_imm8_setup +avx_single_source_128bit_instruction_3a_imm8: + or [vex_required],2 +avx_128bit_instruction_3a_imm8: + mov [mmx_size],16 + jmp avx_instruction_3a_imm8_setup +avx_triple_source_instruction_3a: + mov [mmx_size],0 + mov [immediate_size],-1 + mov byte [value],0 + jmp avx_instruction_3a_setup +avx_single_source_instruction_3a_imm8: + or [vex_required],2 +avx_instruction_3a_imm8: + mov [mmx_size],0 + avx_instruction_3a_imm8_setup: + mov [immediate_size],1 + avx_instruction_3a_setup: + mov [opcode_prefix],66h + mov [supplemental_code],al + mov al,3Ah + jmp avx_instruction +avx_pclmulqdq_instruction: + mov byte [value],al + mov [mmx_size],16 + mov al,44h + jmp avx_instruction_3a_setup + +avx_permq_instruction: + or [vex_required],2 + or [rex_prefix],8 +avx_perm2f128_instruction: + mov [immediate_size],1 + mov ah,3Ah + jmp avx_perm_instruction +avx_permd_instruction: + mov ah,38h + avx_perm_instruction: + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],ah + mov [supplemental_code],al + mov [mmx_size],0 + or [vex_required],1 + call take_avx_register + cmp ah,32 + jne invalid_operand_size + mov [postbyte_register],al + jmp avx_vex_reg + +avx_movdqu_instruction: + mov [opcode_prefix],0F3h + jmp avx_movps_instruction +avx_movpd_instruction: + mov [opcode_prefix],66h +avx_movps_instruction: + mov [mmx_size],0 + or [vex_required],2 + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + je avx_reg + inc [extended_code] + test [extended_code],1 + jnz avx_mem + add [extended_code],-1+10h + avx_mem: + cmp al,'[' + jne invalid_operand + call get_address + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [postbyte_register],al + jmp instruction_ready +avx_movntpd_instruction: + mov [opcode_prefix],66h +avx_movntps_instruction: + or [vex_required],1 + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + jmp avx_mem +avx_lddqu_instruction: + mov [opcode_prefix],0F2h + mov [mmx_size],0 + xor cx,cx + avx_load_instruction: + mov [base_code],0Fh + mov [extended_code],al + or [vex_required],1 + call take_avx_register + or cl,cl + jz avx_load_reg_ok + cmp ah,cl + jne invalid_operand + avx_load_reg_ok: + cmp [mmx_size],0 + je avx_load_reg_ + xor ah,ah + avx_load_reg_: + xchg ah,[operand_size] + push eax + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je avx_load_reg_reg + cmp al,'[' + jne invalid_operand + call get_address + pop eax + xchg ah,[operand_size] + mov [postbyte_register],al + mov al,[mmx_size] + or al,al + jz instruction_ready + or ah,ah + jz instruction_ready + cmp al,ah + jne invalid_operand_size + jmp instruction_ready + avx_load_reg_reg: + lods byte [esi] + call convert_avx_register + cmp ch,ah + jne invalid_operand + mov bl,al + pop eax + xchg ah,[operand_size] + mov [postbyte_register],al + jmp nomem_instruction_ready + +avx_movntdqa_instruction: + mov [mmx_size],0 + xor cx,cx + jmp avx_load_instruction_38 +avx_broadcastss_instruction: + mov [mmx_size],4 + xor cl,cl + mov ch,16 + jmp avx_load_instruction_38 +avx_broadcastsd_instruction: + mov [mmx_size],8 + mov cl,32 + mov ch,16 + jmp avx_load_instruction_38 +avx_pbroadcastb_instruction: + mov [mmx_size],1 + jmp avx_pbroadcast_instruction +avx_pbroadcastw_instruction: + mov [mmx_size],2 + jmp avx_pbroadcast_instruction +avx_pbroadcastd_instruction: + mov [mmx_size],4 + jmp avx_pbroadcast_instruction +avx_pbroadcastq_instruction: + mov [mmx_size],8 + avx_pbroadcast_instruction: + xor cl,cl + mov ch,16 + jmp avx_load_instruction_38 +avx_broadcastf128_instruction: + mov [mmx_size],16 + mov cl,32 + xor ch,ch + avx_load_instruction_38: + mov [opcode_prefix],66h + mov [supplemental_code],al + mov al,38h + jmp avx_load_instruction +avx_movlpd_instruction: + mov [opcode_prefix],66h +avx_movlps_instruction: + mov [base_code],0Fh + mov [extended_code],al + mov [mmx_size],8 + or [vex_required],1 + lods byte [esi] + call get_size_operator + cmp al,10h + jne avx_movlps_mem + lods byte [esi] + call convert_avx_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [vex_register],al + cmp [operand_size],16 + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_rm + jc invalid_operand + jmp instruction_ready + avx_movlps_mem: + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + or al,al + jz avx_movlps_mem_size_ok + cmp al,[mmx_size] + jne invalid_operand_size + mov [operand_size],0 + avx_movlps_mem_size_ok: + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + cmp ah,16 + jne invalid_operand + mov [postbyte_register],al + inc [extended_code] + jmp instruction_ready +avx_movhlps_instruction: + mov [base_code],0Fh + mov [extended_code],al + or [vex_required],1 + call take_avx_register + cmp ah,16 + jne invalid_operand + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [vex_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov bl,al + jmp nomem_instruction_ready +avx_maskmov_w1_instruction: + or [rex_prefix],8 +avx_maskmov_instruction: + call setup_66_0f_38 + mov [mmx_size],0 + or [vex_required],1 + lods byte [esi] + call get_size_operator + cmp al,10h + jne avx_maskmov_mem + lods byte [esi] + call convert_avx_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [vex_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_rm + jc invalid_operand + jmp instruction_ready + avx_maskmov_mem: + cmp al,'[' + jne invalid_operand + call get_address + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [vex_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [postbyte_register],al + add [supplemental_code],2 + jmp instruction_ready + setup_66_0f_38: + mov [extended_code],38h + mov [supplemental_code],al + mov [base_code],0Fh + mov [opcode_prefix],66h + ret +avx_movd_instruction: + or [vex_required],1 + jmp movd_instruction +avx_movq_instruction: + or [vex_required],1 + jmp movq_instruction +avx_movddup_instruction: + or [vex_required],1 + mov [opcode_prefix],0F2h + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_avx_register + mov [postbyte_register],al + mov [mmx_size],0 + cmp ah,32 + je avx_regs_size_ok + mov [mmx_size],8 + jmp avx_regs_size_ok +avx_movmskpd_instruction: + mov [opcode_prefix],66h +avx_movmskps_instruction: + mov [base_code],0Fh + mov [extended_code],50h + or [vex_required],1 + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + cmp ah,4 + je avx_movmskps_reg_ok + cmp ah,8 + jne invalid_operand_size + cmp [code_type],64 + jne invalid_operand + avx_movmskps_reg_ok: + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov bl,al + jmp nomem_instruction_ready +avx_movsd_instruction: + mov [opcode_prefix],0F2h + mov [mmx_size],8 + jmp avx_movs_instruction +avx_movss_instruction: + mov [opcode_prefix],0F3h + mov [mmx_size],4 + avx_movs_instruction: + or [vex_required],1 + mov [base_code],0Fh + mov [extended_code],10h + lods byte [esi] + call get_size_operator + cmp al,10h + jne avx_movlps_mem + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + xor cl,cl + xchg cl,[operand_size] + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne avx_movs_reg_mem + mov [operand_size],cl + lods byte [esi] + call convert_avx_register + mov [vex_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov bl,al + cmp bl,8 + jb nomem_instruction_ready + inc [extended_code] + xchg bl,[postbyte_register] + jmp nomem_instruction_ready + avx_movs_reg_mem: + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + or al,al + jz avx_movs_reg_mem_ok + cmp al,[mmx_size] + jne invalid_operand_size + avx_movs_reg_mem_ok: + jmp instruction_ready + +avx_cvtdq2pd_instruction: + mov [opcode_prefix],0F3h +avx_cvtps2pd_instruction: + mov [base_code],0Fh + mov [extended_code],al + or [vex_required],1 + call take_avx_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + xor cl,cl + xchg cl,[operand_size] + lods byte [esi] + call get_size_operator + cmp al,10h + jne avx_cvtdq2pd_reg_mem + lods byte [esi] + call convert_xmm_register + mov bl,al + mov [operand_size],cl + jmp nomem_instruction_ready + avx_cvtdq2pd_reg_mem: + cmp al,'[' + jne invalid_operand + mov [mmx_size],cl + call get_address + mov al,[mmx_size] + mov ah,al + xchg al,[operand_size] + or al,al + jz instruction_ready + shl al,1 + cmp al,ah + jne invalid_operand_size + jmp instruction_ready +avx_cvtpd2dq_instruction: + mov [opcode_prefix],0F2h + jmp avx_cvtpd_instruction +avx_cvtpd2ps_instruction: + mov [opcode_prefix],66h + avx_cvtpd_instruction: + mov [base_code],0Fh + mov [extended_code],al + or [vex_required],1 + call take_avx_register + mov [postbyte_register],al + cmp ah,16 + jne invalid_operand + lods byte [esi] + cmp al,',' + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,10h + jne avx_cvtpd2dq_reg_mem + lods byte [esi] + call convert_avx_register + mov bl,al + jmp nomem_instruction_ready + avx_cvtpd2dq_reg_mem: + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + or al,al + jz operand_size_not_specified + cmp al,16 + je instruction_ready + cmp al,32 + jne invalid_operand_size + jmp instruction_ready +avx_cvttps2dq_instruction: + or [vex_required],2 + mov [opcode_prefix],0F3h + mov [mmx_size],0 + jmp avx_instruction +avx_cvtsd2si_instruction: + or [vex_required],1 + jmp cvtsd2si_instruction +avx_cvtss2si_instruction: + or [vex_required],1 + jmp cvtss2si_instruction +avx_cvtsi2ss_instruction: + mov [opcode_prefix],0F3h + jmp avx_cvtsi_instruction +avx_cvtsi2sd_instruction: + mov [opcode_prefix],0F2h + avx_cvtsi_instruction: + mov [base_code],0Fh + mov [extended_code],al + or [vex_required],1 + call take_avx_register + cmp ah,16 + jne invalid_operand_size + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [vex_register],al + jmp cvtsi_xmmreg + +avx_extractf128_instruction: + or [vex_required],1 + call setup_66_0f_3a + lods byte [esi] + call get_size_operator + cmp al,10h + je avx_extractf128_reg + cmp al,'[' + jne invalid_operand + call get_address + xor al,al + xchg al,[operand_size] + or al,al + jz avx_extractf128_mem_size_ok + cmp al,16 + jne invalid_operand_size + avx_extractf128_mem_size_ok: + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + cmp ah,32 + jne invalid_operand_size + mov [postbyte_register],al + jmp mmx_imm8 + avx_extractf128_reg: + lods byte [esi] + call convert_xmm_register + mov [operand_size],0 + push eax + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + cmp ah,32 + jne invalid_operand_size + mov [postbyte_register],al + pop ebx + jmp mmx_nomem_imm8 + setup_66_0f_3a: + mov [extended_code],3Ah + mov [supplemental_code],al + mov [base_code],0Fh + mov [opcode_prefix],66h + ret +avx_insertf128_instruction: + or [vex_required],1 + call setup_66_0f_3a + call take_avx_register + cmp ah,32 + jne invalid_operand + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [vex_register],al + mov [operand_size],0 + mov [mmx_size],16 + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_rm + mov [operand_size],32 + jnc mmx_imm8 + mov bl,al + jmp mmx_nomem_imm8 +avx_extractps_instruction: + or [vex_required],1 + jmp extractps_instruction +avx_insertps_instruction: + or [vex_required],1 + call take_avx_register + cmp ah,16 + jne invalid_operand_size + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [vex_register],al + jmp insertps_xmmreg +avx_pextrb_instruction: + or [vex_required],1 + jmp pextrb_instruction +avx_pextrw_instruction: + or [vex_required],1 + jmp pextrw_instruction +avx_pextrd_instruction: + or [vex_required],1 + jmp pextrd_instruction +avx_pextrq_instruction: + or [vex_required],1 + jmp pextrq_instruction +avx_pinsrb_instruction: + mov [mmx_size],1 + or [vex_required],1 + jmp avx_pinsr_instruction_3a +avx_pinsrw_instruction: + mov [mmx_size],2 + or [vex_required],1 + jmp avx_pinsr_instruction +avx_pinsrd_instruction: + mov [mmx_size],4 + or [vex_required],1 + jmp avx_pinsr_instruction_3a +avx_pinsrq_instruction: + mov [mmx_size],8 + or [vex_required],1 + call operand_64bit + avx_pinsr_instruction_3a: + mov [supplemental_code],al + mov al,3Ah + avx_pinsr_instruction: + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],al + call take_avx_register + cmp ah,16 + jne invalid_operand_size + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [vex_register],al + jmp pinsr_xmmreg +avx_maskmovdqu_instruction: + or [vex_required],1 + jmp maskmovdqu_instruction +avx_pmovmskb_instruction: + or [vex_required],1 + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + cmp ah,4 + je avx_pmovmskb_reg_size_ok + cmp [code_type],64 + jne invalid_operand_size + cmp ah,8 + jnz invalid_operand_size + avx_pmovmskb_reg_size_ok: + mov [postbyte_register],al + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov bl,al + jmp nomem_instruction_ready +avx_pshufd_instruction: + or [vex_required],1 + mov [mmx_size],0 + mov [opcode_prefix],al + mov [base_code],0Fh + mov [extended_code],70h + call take_avx_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_rm + jnc mmx_imm8 + mov bl,al + jmp mmx_nomem_imm8 + +avx_pmovsxbw_instruction: + mov [mmx_size],8 + jmp avx_pmovsx_instruction +avx_pmovsxbd_instruction: + mov [mmx_size],4 + jmp avx_pmovsx_instruction +avx_pmovsxbq_instruction: + mov [mmx_size],2 + jmp avx_pmovsx_instruction +avx_pmovsxwd_instruction: + mov [mmx_size],8 + jmp avx_pmovsx_instruction +avx_pmovsxwq_instruction: + mov [mmx_size],4 + jmp avx_pmovsx_instruction +avx_pmovsxdq_instruction: + mov [mmx_size],8 + avx_pmovsx_instruction: + or [vex_required],1 + call setup_66_0f_38 + call take_avx_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + xor al,al + xchg al,[operand_size] + push eax + lods byte [esi] + call get_size_operator + cmp al,10h + je avx_pmovsx_xmmreg_reg + cmp al,'[' + jne invalid_operand + call get_address + pop eax + cmp al,32 + jb avx_pmovsx_size_check + shl [mmx_size],1 + avx_pmovsx_size_check: + xchg al,[operand_size] + test al,al + jz instruction_ready + cmp al,[mmx_size] + jne invalid_operand_size + jmp instruction_ready + avx_pmovsx_xmmreg_reg: + lods byte [esi] + call convert_xmm_register + mov bl,al + pop eax + mov [operand_size],al + jmp nomem_instruction_ready +avx_permil_instruction: + call setup_66_0f_3a + or [vex_required],1 + call take_avx_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + je avx_permil_reg_mem + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_avx_register + mov [vex_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + push esi + xor cl,cl + xchg cl,[operand_size] + lods byte [esi] + call get_size_operator + xchg cl,[operand_size] + pop esi + cmp al,'[' + je avx_permil_reg_reg_mem + cmp al,10h + jne avx_permil_reg_reg_imm8 + call take_avx_register + mov bl,al + mov [extended_code],38h + add [supplemental_code],8 + jmp nomem_instruction_ready + avx_permil_reg_reg_mem: + lods byte [esi] + call get_size_operator + call get_address + mov [extended_code],38h + add [supplemental_code],8 + jmp instruction_ready + avx_permil_reg_reg_imm8: + dec esi + xor bl,bl + xchg bl,[vex_register] + jmp mmx_nomem_imm8 + avx_permil_reg_mem: + call get_address + jmp mmx_imm8 +avx_bit_shift_instruction: + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],al + or [vex_required],1 + call take_avx_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [vex_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + push esi + xor cl,cl + xchg cl,[operand_size] + lods byte [esi] + call get_size_operator + cmp al,10h + je avx_bit_shift_regs_reg + pop esi + cmp al,'[' + je avx_bit_shift_regs_mem + xchg cl,[operand_size] + dec esi + mov bl,[extended_code] + mov al,bl + shr bl,4 + and al,1111b + add al,70h + mov [extended_code],al + sub bl,0Ch + shl bl,1 + xchg bl,[postbyte_register] + xchg bl,[vex_register] + jmp mmx_nomem_imm8 + avx_bit_shift_regs_reg: + pop eax + lods byte [esi] + call convert_xmm_register + xchg cl,[operand_size] + mov bl,al + jmp nomem_instruction_ready + avx_bit_shift_regs_mem: + push ecx + lods byte [esi] + call get_size_operator + call get_address + pop eax + xchg al,[operand_size] + test al,al + jz instruction_ready + cmp al,16 + jne invalid_operand_size + jmp instruction_ready +avx_pslldq_instruction: + mov [postbyte_register],al + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],73h + or [vex_required],1 + call take_avx_register + mov [vex_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov bl,al + jmp mmx_nomem_imm8 + +vzeroall_instruction: + mov [operand_size],32 +vzeroupper_instruction: + mov [base_code],0Fh + mov [extended_code],al + or [vex_required],1 + call store_instruction_code + jmp instruction_assembled +vldmxcsr_instruction: + or [vex_required],1 + jmp fxsave_instruction +vcvtph2ps_instruction: + mov [opcode_prefix],66h + mov [supplemental_code],al + mov al,38h + jmp avx_cvtps2pd_instruction +vcvtps2ph_instruction: + call setup_66_0f_3a + or [vex_required],1 + lods byte [esi] + call get_size_operator + cmp al,10h + je vcvtps2ph_reg + cmp al,'[' + jne invalid_operand + call get_address + lods byte [esi] + cmp al,',' + jne invalid_operand + shl [operand_size],1 + call take_avx_register + mov [postbyte_register],al + jmp mmx_imm8 + vcvtps2ph_reg: + lods byte [esi] + call convert_xmm_register + mov bl,al + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [postbyte_register],al + jmp mmx_nomem_imm8 + +bmi_instruction: + mov [base_code],0Fh + mov [extended_code],38h + mov [supplemental_code],0F3h + mov [postbyte_register],al + bmi_reg: + or [vex_required],1 + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [vex_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je bmi_reg_reg + cmp al,'[' + jne invalid_argument + call get_address + call operand_32or64 + jmp instruction_ready + bmi_reg_reg: + lods byte [esi] + call convert_register + mov bl,al + call operand_32or64 + jmp nomem_instruction_ready + operand_32or64: + mov al,[operand_size] + cmp al,4 + je operand_32or64_ok + cmp al,8 + jne invalid_operand_size + cmp [code_type],64 + jne invalid_operand + or [rex_prefix],8 + operand_32or64_ok: + ret +pdep_instruction: + mov [opcode_prefix],0F2h + jmp andn_instruction +pext_instruction: + mov [opcode_prefix],0F3h +andn_instruction: + mov [base_code],0Fh + mov [extended_code],38h + mov [supplemental_code],al + or [vex_required],1 + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + jmp bmi_reg +sarx_instruction: + mov [opcode_prefix],0F3h + jmp bzhi_instruction +shrx_instruction: + mov [opcode_prefix],0F2h + jmp bzhi_instruction +shlx_instruction: + mov [opcode_prefix],66h +bzhi_instruction: + mov [base_code],0Fh + mov [extended_code],38h + mov [supplemental_code],al + or [vex_required],1 + call get_reg_mem + jc bzhi_reg_reg + call get_vex_source_register + jc invalid_operand + call operand_32or64 + jmp instruction_ready + bzhi_reg_reg: + call get_vex_source_register + jc invalid_operand + call operand_32or64 + jmp nomem_instruction_ready + get_vex_source_register: + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne no_vex_source_register + lods byte [esi] + call convert_register + mov [vex_register],al + clc + ret + no_vex_source_register: + stc + ret +bextr_instruction: + mov [base_code],0Fh + mov [extended_code],38h + mov [supplemental_code],al + or [vex_required],1 + call get_reg_mem + jc bextr_reg_reg + call get_vex_source_register + jc bextr_reg_mem_imm32 + call operand_32or64 + jmp instruction_ready + bextr_reg_reg: + call get_vex_source_register + jc bextr_reg_reg_imm32 + call operand_32or64 + jmp nomem_instruction_ready + setup_bextr_imm_opcode: + mov [xop_opcode_map],0Ah + mov [base_code],10h + call operand_32or64 + ret + bextr_reg_mem_imm32: + call get_imm32 + call setup_bextr_imm_opcode + jmp store_instruction_with_imm32 + bextr_reg_reg_imm32: + call get_imm32 + call setup_bextr_imm_opcode + store_nomem_instruction_with_imm32: + call store_nomem_instruction + mov eax,dword [value] + call mark_relocation + stos dword [edi] + jmp instruction_assembled + get_imm32: + cmp al,'(' + jne invalid_operand + push edx ebx ecx + call get_dword_value + mov dword [value],eax + pop ecx ebx edx + ret +rorx_instruction: + mov [opcode_prefix],0F2h + mov [base_code],0Fh + mov [extended_code],3Ah + mov [supplemental_code],al + or [vex_required],1 + call get_reg_mem + jc rorx_reg_reg + call operand_32or64 + jmp mmx_imm8 + rorx_reg_reg: + call operand_32or64 + jmp mmx_nomem_imm8 + +fma_instruction_pd: + or [rex_prefix],8 +fma_instruction_ps: + mov [mmx_size],0 + jmp avx_instruction_38_setup +fma_instruction_sd: + or [rex_prefix],8 + mov [mmx_size],8 + jmp avx_instruction_38_setup +fma_instruction_ss: + mov [mmx_size],4 + jmp avx_instruction_38_setup + +fma4_instruction_p: + mov [mmx_size],0 + jmp fma4_instruction_setup +fma4_instruction_sd: + mov [mmx_size],8 + jmp fma4_instruction_setup +fma4_instruction_ss: + mov [mmx_size],4 + fma4_instruction_setup: + mov [immediate_size],-2 + mov byte [value],0 + jmp avx_instruction_3a_setup + +xop_single_source_sd_instruction: + or [vex_required],2 + mov [mmx_size],8 + jmp xop_instruction_9 +xop_single_source_ss_instruction: + or [vex_required],2 + mov [mmx_size],4 + jmp xop_instruction_9 +xop_single_source_instruction: + or [vex_required],2 + mov [mmx_size],0 + xop_instruction_9: + mov [base_code],al + mov [xop_opcode_map],9 + jmp avx_common +xop_single_source_128bit_instruction: + or [vex_required],2 + mov [mmx_size],16 + jmp xop_instruction_9 +xop_triple_source_128bit_instruction: + mov [immediate_size],-1 + mov byte [value],0 + mov [mmx_size],16 + jmp xop_instruction_8 +xop_128bit_instruction: + mov [immediate_size],-2 + mov byte [value],0 + mov [mmx_size],16 + xop_instruction_8: + mov [base_code],al + mov [xop_opcode_map],8 + jmp avx_common +xop_pcom_b_instruction: + mov ah,0CCh + jmp xop_pcom_instruction +xop_pcom_d_instruction: + mov ah,0CEh + jmp xop_pcom_instruction +xop_pcom_q_instruction: + mov ah,0CFh + jmp xop_pcom_instruction +xop_pcom_w_instruction: + mov ah,0CDh + jmp xop_pcom_instruction +xop_pcom_ub_instruction: + mov ah,0ECh + jmp xop_pcom_instruction +xop_pcom_ud_instruction: + mov ah,0EEh + jmp xop_pcom_instruction +xop_pcom_uq_instruction: + mov ah,0EFh + jmp xop_pcom_instruction +xop_pcom_uw_instruction: + mov ah,0EDh + xop_pcom_instruction: + mov byte [value],al + mov [mmx_size],16 + mov [base_code],ah + mov [xop_opcode_map],8 + jmp avx_common +vpcmov_instruction: + or [vex_required],1 + mov [immediate_size],-2 + mov byte [value],0 + mov [mmx_size],0 + mov [base_code],al + mov [xop_opcode_map],8 + jmp avx_common +xop_shift_instruction: + mov [base_code],al + or [vex_required],1 + mov [xop_opcode_map],9 + call take_avx_register + cmp ah,16 + jne invalid_operand + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + je xop_shift_reg_mem + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [vex_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + push esi + xor cl,cl + xchg cl,[operand_size] + lods byte [esi] + call get_size_operator + pop esi + xchg cl,[operand_size] + cmp al,'[' + je xop_shift_reg_reg_mem + cmp al,10h + jne xop_shift_reg_reg_imm + call take_avx_register + mov bl,al + xchg bl,[vex_register] + jmp nomem_instruction_ready + xop_shift_reg_reg_mem: + or [rex_prefix],8 + lods byte [esi] + call get_size_operator + call get_address + jmp instruction_ready + xop_shift_reg_reg_imm: + xor bl,bl + xchg bl,[vex_register] + cmp [base_code],94h + jae invalid_operand + add [base_code],30h + mov [xop_opcode_map],8 + dec esi + jmp mmx_nomem_imm8 + xop_shift_reg_mem: + call get_address + lods byte [esi] + cmp al,',' + jne invalid_operand + push esi + xor cl,cl + xchg cl,[operand_size] + lods byte [esi] + call get_size_operator + pop esi + xchg cl,[operand_size] + cmp al,10h + jne xop_shift_reg_mem_imm + call take_avx_register + mov [vex_register],al + jmp instruction_ready + xop_shift_reg_mem_imm: + cmp [base_code],94h + jae invalid_operand + add [base_code],30h + mov [xop_opcode_map],8 + dec esi + jmp mmx_imm8 + +vpermil_2pd_instruction: + mov [immediate_size],-2 + mov byte [value],al + mov al,49h + jmp vpermil2_instruction_setup +vpermil_2ps_instruction: + mov [immediate_size],-2 + mov byte [value],al + mov al,48h + jmp vpermil2_instruction_setup +vpermil2_instruction: + mov [immediate_size],-3 + mov byte [value],0 + vpermil2_instruction_setup: + mov [base_code],0Fh + mov [supplemental_code],al + mov al,3Ah + mov [mmx_size],0 + jmp avx_instruction + +tbm_instruction: + mov [xop_opcode_map],9 + mov ah,al + shr ah,4 + and al,111b + mov [base_code],ah + mov [postbyte_register],al + jmp bmi_reg + +llwpcb_instruction: + or [vex_required],1 + mov [xop_opcode_map],9 + mov [base_code],12h + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov bl,al + call operand_32or64 + jmp nomem_instruction_ready +lwpins_instruction: + or [vex_required],1 + mov [xop_opcode_map],0Ah + mov [base_code],12h + mov [vex_register],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + xor cl,cl + xchg cl,[operand_size] + lods byte [esi] + call get_size_operator + cmp al,10h + je lwpins_reg_reg + cmp al,'[' + jne invalid_argument + push ecx + call get_address + pop eax + xchg al,[operand_size] + test al,al + jz lwpins_reg_mem_size_ok + cmp al,4 + jne invalid_operand_size + lwpins_reg_mem_size_ok: + call prepare_lwpins + jmp store_instruction_with_imm32 + lwpins_reg_reg: + lods byte [esi] + call convert_register + cmp ah,4 + jne invalid_operand_size + mov [operand_size],cl + mov bl,al + call prepare_lwpins + jmp store_nomem_instruction_with_imm32 + prepare_lwpins: + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_imm32 + call operand_32or64 + mov al,[vex_register] + xchg al,[postbyte_register] + mov [vex_register],al + ret + +gather_instruction_pd: + or [rex_prefix],8 +gather_instruction_ps: + call setup_66_0f_38 + or [vex_required],4 + call take_avx_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + xor cl,cl + xchg cl,[operand_size] + push ecx + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_argument + call get_address + pop eax + xchg al,[operand_size] + test al,al + jz gather_elements_size_ok + test [rex_prefix],8 + jnz gather_elements_64bit + cmp al,4 + jne invalid_operand_size + jmp gather_elements_size_ok + gather_elements_64bit: + cmp al,8 + jne invalid_operand_size + gather_elements_size_ok: + lods byte [esi] + cmp al,',' + jne invalid_operand + call take_avx_register + mov [vex_register],al + cmp al,[postbyte_register] + je disallowed_combination_of_registers + mov al,bl + and al,1111b + cmp al,[postbyte_register] + je disallowed_combination_of_registers + cmp al,[vex_register] + je disallowed_combination_of_registers + mov al,bl + shr al,4 + cmp al,0Ch + je gather_vr_128bit + mov al,[rex_prefix] + shr al,3 + xor al,[supplemental_code] + test al,1 + jz gather_256bit + test [supplemental_code],1 + jz invalid_operand_size + mov al,32 + xchg al,[operand_size] + cmp al,16 + jne invalid_operand_size + jmp instruction_ready + gather_256bit: + cmp ah,32 + jne invalid_operand_size + jmp instruction_ready + gather_vr_128bit: + cmp ah,16 + je instruction_ready + test [supplemental_code],1 + jnz invalid_operand_size + test [rex_prefix],8 + jz invalid_operand_size + jmp instruction_ready + +take_avx_register: + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] +convert_avx_register: + mov ah,al + and al,0Fh + and ah,0F0h + sub ah,0B0h + jbe invalid_operand + cmp ah,32 + ja invalid_operand + cmp al,8 + jb match_register_size + cmp [code_type],64 + jne invalid_operand + jmp match_register_size +store_vex_instruction_code: + mov al,[base_code] + cmp al,0Fh + jne store_xop_instruction_code + mov ah,[extended_code] + cmp ah,38h + je store_vex_0f38_instruction_code + cmp ah,3Ah + je store_vex_0f3a_instruction_code + test [rex_prefix],1011b + jnz store_vex_0f_instruction_code + mov [edi+2],ah + mov byte [edi],0C5h + mov al,[vex_register] + not al + shl al,3 + mov ah,[rex_prefix] + shl ah,5 + and ah,80h + xor al,ah + call get_vex_lpp_bits + mov [edi+1],al + call check_vex + add edi,3 + ret + get_vex_lpp_bits: + cmp [operand_size],32 + jne vex_l_bit_ok + or al,100b + vex_l_bit_ok: + mov ah,[opcode_prefix] + cmp ah,66h + je vex_66 + cmp ah,0F3h + je vex_f3 + cmp ah,0F2h + je vex_f2 + test ah,ah + jnz disallowed_combination_of_registers + ret + vex_f2: + or al,11b + ret + vex_f3: + or al,10b + ret + vex_66: + or al,1 + ret + store_vex_0f38_instruction_code: + mov al,11100010b + mov ah,[supplemental_code] + jmp make_c4_vex + store_vex_0f3a_instruction_code: + mov al,11100011b + mov ah,[supplemental_code] + jmp make_c4_vex + store_vex_0f_instruction_code: + mov al,11100001b + make_c4_vex: + mov [edi+3],ah + mov byte [edi],0C4h + mov ah,[rex_prefix] + shl ah,5 + xor al,ah + mov [edi+1],al + call check_vex + mov al,[vex_register] + xor al,1111b + shl al,3 + mov ah,[rex_prefix] + shl ah,4 + and ah,80h + or al,ah + call get_vex_lpp_bits + mov [edi+2],al + add edi,4 + ret + check_vex: + cmp [code_type],64 + je vex_ok + not al + test al,11000000b + jnz invalid_operand + test [rex_prefix],40h + jnz invalid_operand + vex_ok: + ret +store_xop_instruction_code: + mov [edi+3],al + mov byte [edi],8Fh + mov al,[xop_opcode_map] + mov ah,[rex_prefix] + test ah,40h + jz xop_ok + cmp [code_type],64 + jne invalid_operand + xop_ok: + not ah + shl ah,5 + xor al,ah + mov [edi+1],al + mov al,[vex_register] + xor al,1111b + shl al,3 + mov ah,[rex_prefix] + shl ah,4 + and ah,80h + or al,ah + call get_vex_lpp_bits + mov [edi+2],al + add edi,4 + ret diff --git a/programs/develop/fasm/trunk/errors.inc b/programs/develop/fasm/trunk/errors.inc index a1f547c84..3dce8d7a5 100644 --- a/programs/develop/fasm/trunk/errors.inc +++ b/programs/develop/fasm/trunk/errors.inc @@ -1,6 +1,6 @@ ; flat assembler core -; Copyright (c) 1999-2012, Tomasz Grysztar. +; Copyright (c) 1999-2013, Tomasz Grysztar. ; All rights reserved. out_of_memory: diff --git a/programs/develop/fasm/trunk/exprcalc.inc b/programs/develop/fasm/trunk/exprcalc.inc index 7c2ae32fa..0cabcd976 100644 --- a/programs/develop/fasm/trunk/exprcalc.inc +++ b/programs/develop/fasm/trunk/exprcalc.inc @@ -1,2289 +1,2347 @@ - -; flat assembler core -; Copyright (c) 1999-2012, Tomasz Grysztar. -; All rights reserved. - -calculate_expression: - mov [current_offset],edi - mov [value_undefined],0 - cmp byte [esi],0 - je get_string_value - cmp byte [esi],'.' - je convert_fp - calculation_loop: - lods byte [esi] - cmp al,1 - je get_byte_number - cmp al,2 - je get_word_number - cmp al,4 - je get_dword_number - cmp al,8 - je get_qword_number - cmp al,0Fh - je value_out_of_range - cmp al,10h - je get_register - cmp al,11h - je get_label - cmp al,')' - je expression_calculated - cmp al,']' - je expression_calculated - cmp al,'!' - je invalid_expression - sub edi,14h - mov ebx,edi - sub ebx,14h - cmp al,0E0h - je calculate_rva - cmp al,0E1h - je calculate_plt - cmp al,0D0h - je calculate_not - cmp al,083h - je calculate_neg - mov dx,[ebx+8] - or dx,[edi+8] - cmp al,80h - je calculate_add - cmp al,81h - je calculate_sub - mov ah,[ebx+12] - or ah,[edi+12] - jz absolute_values_calculation - call recoverable_misuse - absolute_values_calculation: - cmp al,90h - je calculate_mul - cmp al,91h - je calculate_div - or dx,dx - jnz invalid_expression - cmp al,0A0h - je calculate_mod - cmp al,0B0h - je calculate_and - cmp al,0B1h - je calculate_or - cmp al,0B2h - je calculate_xor - cmp al,0C0h - je calculate_shl - cmp al,0C1h - je calculate_shr - jmp invalid_expression - expression_calculated: - sub edi,14h - cmp [value_undefined],0 - je expression_value_ok - xor eax,eax - mov [edi],eax - mov [edi+4],eax - mov [edi+12],eax - expression_value_ok: - ret - get_byte_number: - xor eax,eax - lods byte [esi] - stos dword [edi] - xor al,al - stos dword [edi] - got_number: - and word [edi-8+8],0 - and word [edi-8+12],0 - and dword [edi-8+16],0 - add edi,0Ch - jmp calculation_loop - get_word_number: - xor eax,eax - lods word [esi] - stos dword [edi] - xor ax,ax - stos dword [edi] - jmp got_number - get_dword_number: - movs dword [edi],[esi] - xor eax,eax - stos dword [edi] - jmp got_number - get_qword_number: - movs dword [edi],[esi] - movs dword [edi],[esi] - jmp got_number - get_register: - mov byte [edi+9],0 - and word [edi+12],0 - lods byte [esi] - mov [edi+8],al - mov byte [edi+10],1 - xor eax,eax - mov [edi+16],eax - stos dword [edi] - stos dword [edi] - add edi,0Ch - jmp calculation_loop - get_label: - xor eax,eax - mov [edi+8],eax - mov [edi+12],eax - mov [edi+20],eax - lods dword [esi] - cmp eax,0Fh - jb predefined_label - je reserved_word_used_as_symbol - mov ebx,eax - mov ax,[current_pass] - mov [ebx+18],ax - mov cl,[ebx+9] - shr cl,1 - and cl,1 - neg cl - or byte [ebx+8],8 - test byte [ebx+8],1 - jz label_undefined - cmp ax,[ebx+16] - je unadjusted_label - test byte [ebx+8],4 - jnz label_out_of_scope - test byte [ebx+9],1 - jz unadjusted_label - mov eax,[ebx] - sub eax,dword [adjustment] - stos dword [edi] - mov eax,[ebx+4] - sbb eax,dword [adjustment+4] - stos dword [edi] - sbb cl,[adjustment_sign] - mov [edi-8+13],cl - mov eax,dword [adjustment] - or al,[adjustment_sign] - or eax,dword [adjustment+4] - jz got_label - or [next_pass_needed],-1 - jmp got_label - unadjusted_label: - mov eax,[ebx] - stos dword [edi] - mov eax,[ebx+4] - stos dword [edi] - mov [edi-8+13],cl - got_label: - cmp [symbols_file],0 - je label_reference_ok - cmp [next_pass_needed],0 - jne label_reference_ok - call store_label_reference - label_reference_ok: - mov al,[ebx+11] - mov [edi-8+12],al - mov eax,[ebx+12] - mov [edi-8+8],eax - cmp al,ah - jne labeled_registers_ok - shr eax,16 - add al,ah - jo labeled_registers_ok - xor ah,ah - mov [edi-8+10],ax - mov [edi-8+9],ah - labeled_registers_ok: - mov eax,[ebx+20] - mov [edi-8+16],eax - add edi,0Ch - mov al,[ebx+10] - or al,al - jz calculation_loop - cmp [size_override],-1 - je calculation_loop - cmp [size_override],0 - je check_size - cmp [operand_size],0 - jne calculation_loop - mov [operand_size],al - jmp calculation_loop - check_size: - xchg [operand_size],al - or al,al - jz calculation_loop - cmp al,[operand_size] - jne operand_sizes_do_not_match - jmp calculation_loop - current_offset_label: - mov eax,[current_offset] - make_current_offset_label: - xor edx,edx - xor ch,ch - sub eax,dword [org_origin] - sbb edx,dword [org_origin+4] - sbb ch,[org_origin_sign] - jp current_offset_label_ok - call recoverable_overflow - current_offset_label_ok: - stos dword [edi] - mov eax,edx - stos dword [edi] - mov eax,[org_registers] - stos dword [edi] - mov cl,[labels_type] - mov [edi-12+12],cx - mov eax,[org_symbol] - mov [edi-12+16],eax - add edi,8 - jmp calculation_loop - org_origin_label: - mov eax,[org_start] - jmp make_current_offset_label - counter_label: - mov eax,[counter] - make_dword_label_value: - stos dword [edi] - xor eax,eax - stos dword [edi] - add edi,0Ch - jmp calculation_loop - timestamp_label: - call make_timestamp - make_qword_label_value: - stos dword [edi] - mov eax,edx - stos dword [edi] - add edi,0Ch - jmp calculation_loop - predefined_label: - or eax,eax - jz current_offset_label - cmp eax,1 - je counter_label - cmp eax,2 - je timestamp_label - cmp eax,3 - je org_origin_label - mov edx,invalid_value - jmp error_undefined - label_out_of_scope: - mov edx,symbol_out_of_scope - jmp error_undefined - label_undefined: - mov edx,undefined_symbol - error_undefined: - cmp [current_pass],1 - ja undefined_value - force_next_pass: - or [next_pass_needed],-1 - undefined_value: - or [value_undefined],-1 - and word [edi+12],0 - xor eax,eax - stos dword [edi] - stos dword [edi] - add edi,0Ch - cmp [error_line],0 - jne calculation_loop - mov eax,[current_line] - mov [error_line],eax - mov [error],edx - mov [error_info],ebx - jmp calculation_loop - calculate_add: - mov ecx,[ebx+16] - cmp byte [edi+12],0 - je add_values - mov ecx,[edi+16] - cmp byte [ebx+12],0 - je add_values - call recoverable_misuse - add_values: - mov al,[edi+12] - or [ebx+12],al - mov [ebx+16],ecx - mov eax,[edi] - add [ebx],eax - mov eax,[edi+4] - adc [ebx+4],eax - mov al,[edi+13] - adc [ebx+13],al - jp add_sign_ok - call recoverable_overflow - add_sign_ok: - or dx,dx - jz calculation_loop - push esi - mov esi,ebx - lea ebx,[edi+10] - mov cl,[edi+8] - call add_register - lea ebx,[edi+11] - mov cl,[edi+9] - call add_register - pop esi - jmp calculation_loop - add_register: - or cl,cl - jz add_register_done - add_register_start: - cmp [esi+8],cl - jne add_in_second_slot - mov al,[ebx] - add [esi+10],al - jo value_out_of_range - jnz add_register_done - mov byte [esi+8],0 - ret - add_in_second_slot: - cmp [esi+9],cl - jne create_in_first_slot - mov al,[ebx] - add [esi+11],al - jo value_out_of_range - jnz add_register_done - mov byte [esi+9],0 - ret - create_in_first_slot: - cmp byte [esi+8],0 - jne create_in_second_slot - mov [esi+8],cl - mov al,[ebx] - mov [esi+10],al - ret - create_in_second_slot: - cmp byte [esi+9],0 - jne invalid_expression - mov [esi+9],cl - mov al,[ebx] - mov [esi+11],al - add_register_done: - ret - out_of_range: - jmp calculation_loop - calculate_sub: - xor ah,ah - mov ah,[ebx+12] - mov al,[edi+12] - or al,al - jz sub_values - cmp al,ah - jne invalid_sub - xor ah,ah - mov ecx,[edi+16] - cmp ecx,[ebx+16] - je sub_values - invalid_sub: - call recoverable_misuse - sub_values: - mov [ebx+12],ah - mov eax,[edi] - sub [ebx],eax - mov eax,[edi+4] - sbb [ebx+4],eax - mov al,[edi+13] - sbb [ebx+13],al - jp sub_sign_ok - cmp [error_line],0 - jne sub_sign_ok - call recoverable_overflow - sub_sign_ok: - or dx,dx - jz calculation_loop - push esi - mov esi,ebx - lea ebx,[edi+10] - mov cl,[edi+8] - call sub_register - lea ebx,[edi+11] - mov cl,[edi+9] - call sub_register - pop esi - jmp calculation_loop - sub_register: - or cl,cl - jz add_register_done - neg byte [ebx] - jo value_out_of_range - jmp add_register_start - calculate_mul: - or dx,dx - jz mul_start - cmp word [ebx+8],0 - jne mul_start - xor ecx,ecx - swap_values: - mov eax,[ebx+ecx] - xchg eax,[edi+ecx] - mov [ebx+ecx],eax - add ecx,4 - cmp ecx,16 - jb swap_values - mul_start: - push esi edx - mov esi,ebx - xor bl,bl - cmp byte [esi+13],0 - je mul_first_sign_ok - mov eax,[esi] - mov edx,[esi+4] - not eax - not edx - add eax,1 - adc edx,0 - mov [esi],eax - mov [esi+4],edx - or eax,edx - jz mul_overflow - xor bl,-1 - mul_first_sign_ok: - cmp byte [edi+13],0 - je mul_second_sign_ok - mov eax,[edi] - mov edx,[edi+4] - not eax - not edx - add eax,1 - adc edx,0 - mov [edi],eax - mov [edi+4],edx - or eax,edx - jz mul_overflow - xor bl,-1 - mul_second_sign_ok: - cmp dword [esi+4],0 - jz mul_numbers - cmp dword [edi+4],0 - jz mul_numbers - jnz mul_overflow - mul_numbers: - mov eax,[esi+4] - mul dword [edi] - or edx,edx - jnz mul_overflow - mov ecx,eax - mov eax,[esi] - mul dword [edi+4] - or edx,edx - jnz mul_overflow - add ecx,eax - jc mul_overflow - mov eax,[esi] - mul dword [edi] - add edx,ecx - jc mul_overflow - mov [esi],eax - mov [esi+4],edx - or bl,bl - jz mul_ok - not eax - not edx - add eax,1 - adc edx,0 - mov [esi],eax - mov [esi+4],edx - or eax,edx - jnz mul_ok - not bl - mul_ok: - mov [esi+13],bl - pop edx - or dx,dx - jz mul_calculated - cmp word [edi+8],0 - jne invalid_value - cmp byte [esi+8],0 - je mul_first_register_ok - call get_byte_scale - imul byte [esi+10] - mov dl,ah - cbw - cmp ah,dl - jne value_out_of_range - mov [esi+10],al - or al,al - jnz mul_first_register_ok - mov [esi+8],al - mul_first_register_ok: - cmp byte [esi+9],0 - je mul_calculated - call get_byte_scale - imul byte [esi+11] - mov dl,ah - cbw - cmp ah,dl - jne value_out_of_range - mov [esi+11],al - or al,al - jnz mul_calculated - mov [esi+9],al - mul_calculated: - pop esi - jmp calculation_loop - mul_overflow: - pop edx esi - call recoverable_overflow - jmp calculation_loop - get_byte_scale: - mov al,[edi] - cbw - cwde - cdq - cmp edx,[edi+4] - jne value_out_of_range - cmp eax,[edi] - jne value_out_of_range - ret - calculate_div: - push esi edx - mov esi,ebx - call div_64 - pop edx - or dx,dx - jz div_calculated - cmp byte [esi+8],0 - je div_first_register_ok - call get_byte_scale - or al,al - jz value_out_of_range - mov al,[esi+10] - cbw - idiv byte [edi] - or ah,ah - jnz invalid_use_of_symbol - mov [esi+10],al - div_first_register_ok: - cmp byte [esi+9],0 - je div_calculated - call get_byte_scale - or al,al - jz value_out_of_range - mov al,[esi+11] - cbw - idiv byte [edi] - or ah,ah - jnz invalid_use_of_symbol - mov [esi+11],al - div_calculated: - pop esi - jmp calculation_loop - calculate_mod: - push esi - mov esi,ebx - call div_64 - mov [esi],eax - mov [esi+4],edx - mov [esi+13],bh - pop esi - jmp calculation_loop - calculate_and: - mov eax,[edi] - mov edx,[edi+4] - mov cl,[edi+13] - and [ebx],eax - and [ebx+4],edx - and [ebx+13],cl - jmp calculation_loop - calculate_or: - mov eax,[edi] - mov edx,[edi+4] - mov cl,[edi+13] - or [ebx],eax - or [ebx+4],edx - or [ebx+13],cl - jmp calculation_loop - calculate_xor: - mov eax,[edi] - mov edx,[edi+4] - mov cl,[edi+13] - xor [ebx],eax - xor [ebx+4],edx - xor [ebx+13],cl - jz calculation_loop - or cl,cl - jz xor_size_check - xor eax,[ebx] - xor edx,[ebx+4] - xor_size_check: - mov cl,[value_size] - cmp cl,1 - je xor_byte_result - cmp cl,2 - je xor_word_result - cmp cl,4 - je xor_dword_result - cmp cl,6 - je xor_pword_result - cmp cl,8 - jne calculation_loop - xor edx,[ebx+4] - js xor_result_truncated - jmp calculation_loop - xor_pword_result: - test edx,0FFFF0000h - jnz calculation_loop - cmp word [ebx+6],-1 - jne calculation_loop - xor dx,[ebx+4] - jns calculation_loop - not word [ebx+6] - jmp xor_result_truncated - xor_dword_result: - test edx,edx - jnz calculation_loop - cmp dword [ebx+4],-1 - jne calculation_loop - xor eax,[ebx] - jns calculation_loop - not dword [ebx+4] - jmp xor_result_truncated - xor_word_result: - test edx,edx - jnz calculation_loop - test eax,0FFFF0000h - jnz calculation_loop - cmp dword [ebx+4],-1 - jne calculation_loop - cmp word [ebx+2],-1 - jne calculation_loop - xor ax,[ebx] - jns calculation_loop - not dword [ebx+4] - not word [ebx+2] - jmp xor_result_truncated - xor_byte_result: - test edx,edx - jnz calculation_loop - test eax,0FFFFFF00h - jnz calculation_loop - cmp dword [ebx+4],-1 - jne calculation_loop - cmp word [ebx+2],-1 - jne calculation_loop - cmp byte [ebx+1],-1 - jne calculation_loop - xor al,[ebx] - jns calculation_loop - not dword [ebx+4] - not word [ebx+2] - not byte [ebx+1] - xor_result_truncated: - mov byte [ebx+13],0 - jmp calculation_loop - shr_negative: - mov byte [edi+13],0 - not dword [edi] - not dword [edi+4] - add dword [edi],1 - adc dword [edi+4],0 - jc shl_over - calculate_shl: - cmp byte [edi+13],0 - jne shl_negative - mov edx,[ebx+4] - mov eax,[ebx] - cmp dword [edi+4],0 - jne shl_over - movsx ecx,byte [ebx+13] - xchg ecx,[edi] - cmp ecx,64 - je shl_max - ja shl_over - cmp ecx,32 - jae shl_high - shld [edi],edx,cl - shld edx,eax,cl - shl eax,cl - mov [ebx],eax - mov [ebx+4],edx - jmp shl_done - shl_over: - cmp byte [ebx+13],0 - jne shl_overflow - shl_max: - movsx ecx,byte [ebx+13] - cmp eax,ecx - jne shl_overflow - cmp edx,ecx - jne shl_overflow - xor eax,eax - mov [ebx],eax - mov [ebx+4],eax - jmp calculation_loop - shl_high: - sub cl,32 - shld [edi],edx,cl - shld edx,eax,cl - shl eax,cl - mov [ebx+4],eax - and dword [ebx],0 - cmp edx,[edi] - jne shl_overflow - shl_done: - movsx eax,byte [ebx+13] - cmp eax,[edi] - je calculation_loop - shl_overflow: - call recoverable_overflow - jmp calculation_loop - shl_negative: - mov byte [edi+13],0 - not dword [edi] - not dword [edi+4] - add dword [edi],1 - adc dword [edi+4],0 - jnc calculate_shr - dec dword [edi+4] - calculate_shr: - cmp byte [edi+13],0 - jne shr_negative - cmp byte [ebx+13],0 - je do_shr - mov al,[value_size] - cmp al,1 - je shr_negative_byte - cmp al,2 - je shr_negative_word - cmp al,4 - je shr_negative_dword - cmp al,6 - je shr_negative_pword - cmp al,8 - jne do_shr - shr_negative_qword: - test byte [ebx+7],80h - jz do_shr - shr_truncated: - mov byte [ebx+13],0 - do_shr: - mov edx,[ebx+4] - mov eax,[ebx] - cmp dword [edi+4],0 - jne shr_over - mov ecx,[edi] - cmp ecx,64 - jae shr_over - push esi - movsx esi,byte [ebx+13] - cmp ecx,32 - jae shr_high - shrd eax,edx,cl - shrd edx,esi,cl - mov [ebx],eax - mov [ebx+4],edx - pop esi - jmp calculation_loop - shr_high: - sub cl,32 - shrd edx,esi,cl - mov [ebx],edx - mov [ebx+4],esi - pop esi - jmp calculation_loop - shr_over: - movsx eax,byte [ebx+13] - mov dword [ebx],eax - mov dword [ebx+4],eax - jmp calculation_loop - shr_negative_byte: - cmp dword [ebx+4],-1 - jne do_shr - cmp word [ebx+2],-1 - jne do_shr - cmp byte [ebx+1],-1 - jne do_shr - test byte [ebx],80h - jz do_shr - not dword [ebx+4] - not word [ebx+2] - not byte [ebx+1] - jmp shr_truncated - shr_negative_word: - cmp dword [ebx+4],-1 - jne do_shr - cmp word [ebx+2],-1 - jne do_shr - test byte [ebx+1],80h - jz do_shr - not dword [ebx+4] - not word [ebx+2] - jmp shr_truncated - shr_negative_dword: - cmp dword [ebx+4],-1 - jne do_shr - test byte [ebx+3],80h - jz do_shr - not dword [ebx+4] - jmp shr_truncated - shr_negative_pword: - cmp word [ebx+6],-1 - jne do_shr - test byte [ebx+5],80h - jz do_shr - not word [ebx+6] - jmp shr_truncated - calculate_not: - cmp word [edi+8],0 - jne invalid_expression - cmp byte [edi+12],0 - je not_ok - call recoverable_misuse - not_ok: - mov al,[value_size] - cmp al,1 - je not_byte - cmp al,2 - je not_word - cmp al,4 - je not_dword - cmp al,6 - je not_pword - cmp al,8 - je not_qword - not dword [edi] - not dword [edi+4] - not byte [edi+13] - add edi,14h - jmp calculation_loop - not_qword: - not dword [edi] - not dword [edi+4] - finish_not: - mov byte [edi+13],0 - add edi,14h - jmp calculation_loop - not_byte: - cmp dword [edi+4],0 - jne not_qword - cmp word [edi+2],0 - jne not_qword - cmp byte [edi+1],0 - jne not_qword - not byte [edi] - jmp finish_not - not_word: - cmp dword [edi+4],0 - jne not_qword - cmp word [edi+2],0 - jne not_qword - not word [edi] - jmp finish_not - not_dword: - cmp dword [edi+4],0 - jne not_qword - not dword [edi] - jmp finish_not - not_pword: - cmp word [edi+6],0 - jne not_qword - not word [edi+4] - not dword [edi] - jmp finish_not - calculate_neg: - cmp word [edi+8],0 - jne invalid_expression - cmp byte [edi+12],0 - je neg_ok - call recoverable_misuse - neg_ok: - xor eax,eax - xor edx,edx - xor cl,cl - xchg eax,[edi] - xchg edx,[edi+4] - xchg cl,[edi+13] - sub [edi],eax - sbb [edi+4],edx - sbb [edi+13],cl - jp neg_sign_ok - call recoverable_overflow - neg_sign_ok: - add edi,14h - jmp calculation_loop - calculate_rva: - cmp word [edi+8],0 - jne invalid_expression - mov al,[output_format] - cmp al,5 - je calculate_gotoff - cmp al,4 - je calculate_coff_rva - cmp al,3 - jne invalid_expression - test [format_flags],8 - jnz pe64_rva - mov al,2 - bt [resolver_flags],0 - jc rva_type_ok - xor al,al - rva_type_ok: - cmp byte [edi+12],al - je rva_ok - call recoverable_misuse - rva_ok: - mov byte [edi+12],0 - mov eax,[code_start] - mov eax,[eax+34h] - xor edx,edx - finish_rva: - sub [edi],eax - sbb [edi+4],edx - sbb byte [edi+13],0 - jp rva_finished - call recoverable_overflow - rva_finished: - add edi,14h - jmp calculation_loop - pe64_rva: - mov al,4 - bt [resolver_flags],0 - jc pe64_rva_type_ok - xor al,al - pe64_rva_type_ok: - cmp byte [edi+12],al - je pe64_rva_ok - call recoverable_misuse - pe64_rva_ok: - mov byte [edi+12],0 - mov eax,[code_start] - mov edx,[eax+34h] - mov eax,[eax+30h] - jmp finish_rva - calculate_gotoff: - test [format_flags],8+1 - jnz invalid_expression - calculate_coff_rva: - mov dl,5 - cmp byte [edi+12],2 - je change_value_type - incorrect_change_of_value_type: - call recoverable_misuse - change_value_type: - mov byte [edi+12],dl - add edi,14h - jmp calculation_loop - calculate_plt: - cmp word [edi+8],0 - jne invalid_expression - cmp [output_format],5 - jne invalid_expression - test [format_flags],1 - jnz invalid_expression - mov dl,6 - mov dh,2 - test [format_flags],8 - jz check_value_for_plt - mov dh,4 - check_value_for_plt: - mov eax,[edi] - or eax,[edi+4] - jnz incorrect_change_of_value_type - cmp byte [edi+12],dh - jne incorrect_change_of_value_type - mov eax,[edi+16] - cmp byte [eax],80h - jne incorrect_change_of_value_type - jmp change_value_type - div_64: - xor ebx,ebx - cmp dword [edi],0 - jne divider_ok - cmp dword [edi+4],0 - jne divider_ok - cmp [next_pass_needed],0 - je value_out_of_range - jmp div_done - divider_ok: - cmp byte [esi+13],0 - je div_first_sign_ok - mov eax,[esi] - mov edx,[esi+4] - not eax - not edx - add eax,1 - adc edx,0 - mov [esi],eax - mov [esi+4],edx - or eax,edx - jz value_out_of_range - xor bx,-1 - div_first_sign_ok: - cmp byte [edi+13],0 - je div_second_sign_ok - mov eax,[edi] - mov edx,[edi+4] - not eax - not edx - add eax,1 - adc edx,0 - mov [edi],eax - mov [edi+4],edx - or eax,edx - jz value_out_of_range - xor bl,-1 - div_second_sign_ok: - cmp dword [edi+4],0 - jne div_high - mov ecx,[edi] - mov eax,[esi+4] - xor edx,edx - div ecx - mov [esi+4],eax - mov eax,[esi] - div ecx - mov [esi],eax - mov eax,edx - xor edx,edx - jmp div_done - div_high: - push ebx - mov eax,[esi+4] - xor edx,edx - div dword [edi+4] - mov ebx,[esi] - mov [esi],eax - and dword [esi+4],0 - mov ecx,edx - mul dword [edi] - div_high_loop: - cmp ecx,edx - ja div_high_done - jb div_high_large_correction - cmp ebx,eax - jae div_high_done - div_high_correction: - dec dword [esi] - sub eax,[edi] - sbb edx,[edi+4] - jnc div_high_loop - div_high_done: - sub ebx,eax - sbb ecx,edx - mov edx,ecx - mov eax,ebx - pop ebx - jmp div_done - div_high_large_correction: - push eax edx - mov eax,edx - sub eax,ecx - xor edx,edx - div dword [edi+4] - shr eax,1 - jz div_high_small_correction - sub [esi],eax - push eax - mul dword [edi+4] - sub dword [esp+4],eax - pop eax - mul dword [edi] - sub dword [esp+4],eax - sbb dword [esp],edx - pop edx eax - jmp div_high_loop - div_high_small_correction: - pop edx eax - jmp div_high_correction - div_done: - or bh,bh - jz remainder_ok - not eax - not edx - add eax,1 - adc edx,0 - mov ecx,eax - or ecx,edx - jnz remainder_ok - not bh - remainder_ok: - or bl,bl - jz div_ok - not dword [esi] - not dword [esi+4] - add dword [esi],1 - adc dword [esi+4],0 - mov ecx,[esi] - or ecx,[esi+4] - jnz div_ok - not bl - div_ok: - mov [esi+13],bl - ret - store_label_reference: - mov eax,[display_buffer] - mov dword [eax-4],2 - mov dword [eax-8],4 - sub eax,8+4 - cmp eax,edi - jbe out_of_memory - mov [display_buffer],eax - mov [eax],ebx - ret - convert_fp: - inc esi - and word [edi+8],0 - and word [edi+12],0 - mov al,[value_size] - cmp al,2 - je convert_fp_word - cmp al,4 - je convert_fp_dword - test al,not 8 - jnz invalid_value - convert_fp_qword: - xor eax,eax - xor edx,edx - cmp word [esi+8],8000h - je fp_qword_store - mov bx,[esi+8] - mov eax,[esi] - mov edx,[esi+4] - add eax,eax - adc edx,edx - mov ecx,edx - shr edx,12 - shrd eax,ecx,12 - jnc fp_qword_ok - add eax,1 - adc edx,0 - bt edx,20 - jnc fp_qword_ok - and edx,1 shl 20 - 1 - inc bx - shr edx,1 - rcr eax,1 - fp_qword_ok: - add bx,3FFh - cmp bx,7FFh - jge value_out_of_range - cmp bx,0 - jg fp_qword_exp_ok - or edx,1 shl 20 - mov cx,bx - neg cx - inc cx - cmp cx,52 - ja value_out_of_range - cmp cx,32 - jbe fp_qword_small_shift - sub cx,32 - mov eax,edx - xor edx,edx - shr eax,cl - jmp fp_qword_shift_done - fp_qword_small_shift: - mov ebx,edx - shr edx,cl - shrd eax,ebx,cl - fp_qword_shift_done: - mov bx,0 - jnc fp_qword_exp_ok - add eax,1 - adc edx,0 - test edx,1 shl 20 - jz fp_qword_exp_ok - and edx,1 shl 20 - 1 - inc bx - fp_qword_exp_ok: - shl ebx,20 - or edx,ebx - fp_qword_store: - mov bl,[esi+11] - shl ebx,31 - or edx,ebx - mov [edi],eax - mov [edi+4],edx - add esi,13 - ret - convert_fp_word: - xor eax,eax - cmp word [esi+8],8000h - je fp_word_store - mov bx,[esi+8] - mov ax,[esi+6] - shl ax,1 - shr ax,6 - jnc fp_word_ok - inc ax - bt ax,10 - jnc fp_word_ok - and ax,1 shl 10 - 1 - inc bx - shr ax,1 - fp_word_ok: - add bx,0Fh - cmp bx,01Fh - jge value_out_of_range - cmp bx,0 - jg fp_word_exp_ok - or ax,1 shl 10 - mov cx,bx - neg cx - inc cx - cmp cx,10 - ja value_out_of_range - xor bx,bx - shr ax,cl - jnc fp_word_exp_ok - inc ax - test ax,1 shl 10 - jz fp_word_exp_ok - and ax,1 shl 10 - 1 - inc bx - fp_word_exp_ok: - shl bx,10 - or ax,bx - fp_word_store: - mov bl,[esi+11] - shl bx,15 - or ax,bx - mov [edi],eax - xor eax,eax - mov [edi+4],eax - add esi,13 - ret - convert_fp_dword: - xor eax,eax - cmp word [esi+8],8000h - je fp_dword_store - mov bx,[esi+8] - mov eax,[esi+4] - shl eax,1 - shr eax,9 - jnc fp_dword_ok - inc eax - bt eax,23 - jnc fp_dword_ok - and eax,1 shl 23 - 1 - inc bx - shr eax,1 - fp_dword_ok: - add bx,7Fh - cmp bx,0FFh - jge value_out_of_range - cmp bx,0 - jg fp_dword_exp_ok - or eax,1 shl 23 - mov cx,bx - neg cx - inc cx - cmp cx,23 - ja value_out_of_range - xor bx,bx - shr eax,cl - jnc fp_dword_exp_ok - inc eax - test eax,1 shl 23 - jz fp_dword_exp_ok - and eax,1 shl 23 - 1 - inc bx - fp_dword_exp_ok: - shl ebx,23 - or eax,ebx - fp_dword_store: - mov bl,[esi+11] - shl ebx,31 - or eax,ebx - mov [edi],eax - xor eax,eax - mov [edi+4],eax - add esi,13 - ret - get_string_value: - inc esi - lods dword [esi] - mov ecx,eax - cmp ecx,8 - ja value_out_of_range - mov edx,edi - xor eax,eax - stos dword [edi] - stos dword [edi] - mov edi,edx - rep movs byte [edi],[esi] - mov edi,edx - inc esi - and word [edi+8],0 - and word [edi+12],0 - ret - -get_byte_value: - mov [value_size],1 - mov [size_override],-1 - call calculate_value - or al,al - jz check_byte_value - call recoverable_misuse - check_byte_value: - mov eax,[edi] - mov edx,[edi+4] - cmp byte [edi+13],0 - je byte_positive - cmp edx,-1 - jne range_exceeded - cmp eax,-80h - jb range_exceeded - ret - byte_positive: - test edx,edx - jnz range_exceeded - cmp eax,100h - jae range_exceeded - return_byte_value: - ret - range_exceeded: - xor eax,eax - xor edx,edx - recoverable_overflow: - cmp [error_line],0 - jne ignore_overflow - push [current_line] - pop [error_line] - mov [error],value_out_of_range - or [value_undefined],-1 - ignore_overflow: - ret - recoverable_misuse: - cmp [error_line],0 - jne ignore_misuse - push [current_line] - pop [error_line] - mov [error],invalid_use_of_symbol - ignore_misuse: - ret -get_word_value: - mov [value_size],2 - mov [size_override],-1 - call calculate_value - cmp al,2 - jb check_word_value - call recoverable_misuse - check_word_value: - mov eax,[edi] - mov edx,[edi+4] - cmp byte [edi+13],0 - je word_positive - cmp edx,-1 - jne range_exceeded - cmp eax,-8000h - jb range_exceeded - ret - word_positive: - test edx,edx - jnz range_exceeded - cmp eax,10000h - jae range_exceeded - ret -get_dword_value: - mov [value_size],4 - mov [size_override],-1 - call calculate_value - cmp al,4 - jne check_dword_value - mov [value_type],2 - mov eax,[edi] - cdq - cmp edx,[edi+4] - jne range_exceeded - mov ecx,edx - shr ecx,31 - cmp cl,[value_sign] - jne range_exceeded - ret - check_dword_value: - mov eax,[edi] - mov edx,[edi+4] - cmp byte [edi+13],0 - je dword_positive - cmp edx,-1 - jne range_exceeded - bt eax,31 - jnc range_exceeded - ret - dword_positive: - test edx,edx - jne range_exceeded - ret -get_pword_value: - mov [value_size],6 - mov [size_override],-1 - call calculate_value - cmp al,4 - jne check_pword_value - call recoverable_misuse - check_pword_value: - mov eax,[edi] - mov edx,[edi+4] - cmp byte [edi+13],0 - je pword_positive - cmp edx,-8000h - jb range_exceeded - ret - pword_positive: - cmp edx,10000h - jae range_exceeded - ret -get_qword_value: - mov [value_size],8 - mov [size_override],-1 - call calculate_value - check_qword_value: - mov eax,[edi] - mov edx,[edi+4] - cmp byte [edi+13],0 - je qword_positive - cmp edx,-80000000h - jb range_exceeded - qword_positive: - ret -get_count_value: - mov [value_size],8 - mov [size_override],-1 - call calculate_expression - cmp word [edi+8],0 - jne invalid_value - mov [value_sign],0 - mov al,[edi+12] - or al,al - jz check_count_value - call recoverable_misuse - check_count_value: - cmp byte [edi+13],0 - jne invalid_count_value - mov eax,[edi] - mov edx,[edi+4] - or edx,edx - jnz invalid_count_value - ret - invalid_count_value: - cmp [error_line],0 - jne zero_count - mov eax,[current_line] - mov [error_line],eax - mov [error],invalid_value - zero_count: - xor eax,eax - ret -get_value: - mov [operand_size],0 - lods byte [esi] - call get_size_operator - cmp al,'(' - jne invalid_value - mov al,[operand_size] - cmp al,1 - je value_byte - cmp al,2 - je value_word - cmp al,4 - je value_dword - cmp al,6 - je value_pword - cmp al,8 - je value_qword - or al,al - jnz invalid_value - mov [value_size],al - call calculate_value - mov eax,[edi] - mov edx,[edi+4] - ret - calculate_value: - call calculate_expression - cmp word [edi+8],0 - jne invalid_value - mov eax,[edi+16] - mov [symbol_identifier],eax - mov al,[edi+13] - mov [value_sign],al - mov al,[edi+12] - mov [value_type],al - ret - value_qword: - call get_qword_value - truncated_value: - mov [value_sign],0 - ret - value_pword: - call get_pword_value - movzx edx,dx - jmp truncated_value - value_dword: - call get_dword_value - xor edx,edx - jmp truncated_value - value_word: - call get_word_value - xor edx,edx - movzx eax,ax - jmp truncated_value - value_byte: - call get_byte_value - xor edx,edx - movzx eax,al - jmp truncated_value -get_address_word_value: - mov [address_size],2 - mov [value_size],2 - jmp calculate_address -get_address_dword_value: - mov [address_size],4 - mov [value_size],4 - jmp calculate_address -get_address_qword_value: - mov [address_size],8 - mov [value_size],8 - jmp calculate_address -get_address_value: - mov [address_size],0 - mov [value_size],8 - calculate_address: - cmp byte [esi],'.' - je invalid_address - call calculate_expression - mov eax,[edi+16] - mov [address_symbol],eax - mov al,[edi+13] - mov [address_sign],al - mov al,[edi+12] - mov [value_type],al - cmp al,6 - je special_address_type_32bit - cmp al,5 - je special_address_type_32bit - ja invalid_use_of_symbol - test al,1 - jnz invalid_use_of_symbol - or al,al - jz address_size_ok - shl al,5 - jmp address_symbol_ok - special_address_type_32bit: - mov al,40h - address_symbol_ok: - mov ah,[address_size] - or [address_size],al - shr al,4 - or ah,ah - jz address_size_ok - cmp al,ah - je address_size_ok - cmp ax,0408h - je address_sizes_mixed - cmp ax,0804h - jne address_sizes_do_not_agree - address_sizes_mixed: - mov [value_type],2 - mov eax,[edi] - cdq - cmp edx,[edi+4] - je address_size_ok - cmp [error_line],0 - jne address_size_ok - call recoverable_overflow - address_size_ok: - xor ebx,ebx - xor ecx,ecx - mov cl,[value_type] - shl ecx,16 - mov ch,[address_size] - cmp word [edi+8],0 - je check_immediate_address - mov al,[edi+8] - mov dl,[edi+10] - call get_address_register - mov al,[edi+9] - mov dl,[edi+11] - call get_address_register - mov ax,bx - shr ah,4 - shr al,4 - cmp ah,0Ch - je check_vsib_address - cmp ah,0Dh - je check_vsib_address - cmp al,0Ch - je check_vsib_address - cmp al,0Dh - je check_vsib_address - or bh,bh - jz check_address_registers - or bl,bl - jz check_address_registers - cmp al,ah - jne invalid_address - check_address_registers: - or al,ah - mov ah,[address_size] - and ah,0Fh - jz address_registers_sizes_ok - cmp al,ah - jne address_sizes_do_not_match - address_registers_sizes_ok: - cmp al,4 - je sib_allowed - cmp al,8 - je sib_allowed - cmp al,0Fh - je check_ip_relative_address - or cl,cl - jz check_word_value - cmp cl,1 - je check_word_value - jmp invalid_address - address_sizes_do_not_match: - cmp al,0Fh - jne invalid_address - mov al,bh - and al,0Fh - cmp al,ah - jne invalid_address - check_ip_relative_address: - or bl,bl - jnz invalid_address - cmp bh,0F4h - je check_dword_value - cmp bh,0F8h - jne invalid_address - mov eax,[edi] - cdq - cmp edx,[edi+4] - jne range_exceeded - cmp dl,[edi+13] - jne range_exceeded - ret - get_address_register: - or al,al - jz address_register_ok - cmp dl,1 - jne scaled_register - or bh,bh - jnz scaled_register - mov bh,al - address_register_ok: - ret - scaled_register: - or bl,bl - jnz invalid_address - mov bl,al - mov cl,dl - jmp address_register_ok - sib_allowed: - or bh,bh - jnz check_index_with_base - cmp cl,3 - je special_index_scale - cmp cl,5 - je special_index_scale - cmp cl,9 - je special_index_scale - cmp cl,2 - jne check_index_scale - cmp bl,45h - jne special_index_scale - cmp [code_type],64 - je special_index_scale - cmp [segment_register],4 - jne special_index_scale - cmp [value_type],0 - jne check_index_scale - mov al,[edi] - cbw - cwde - cmp eax,[edi] - jne check_index_scale - cdq - cmp edx,[edi+4] - jne check_immediate_address - special_index_scale: - mov bh,bl - dec cl - check_immediate_address: - mov al,[address_size] - and al,0Fh - cmp al,2 - je check_word_value - cmp al,4 - je check_dword_value - cmp al,8 - je check_qword_value - or al,al - jnz invalid_value - cmp [code_type],64 - jne check_dword_value - jmp check_qword_value - check_index_with_base: - cmp cl,1 - jne check_index_scale - cmp bl,44h - je swap_base_with_index - cmp bl,84h - je swap_base_with_index - cmp [code_type],64 - je check_for_rbp_base - cmp bl,45h - jne check_for_ebp_base - cmp [segment_register],3 - je swap_base_with_index - jmp check_immediate_address - check_for_ebp_base: - cmp bh,45h - jne check_immediate_address - cmp [segment_register],4 - jne check_immediate_address - swap_base_with_index: - xchg bl,bh - jmp check_immediate_address - check_for_rbp_base: - cmp bh,45h - je swap_base_with_index - cmp bh,85h - je swap_base_with_index - jmp check_immediate_address - check_index_scale: - test cl,not 1111b - jnz invalid_address - mov al,cl - dec al - and al,cl - jz check_immediate_address - jmp invalid_address - check_vsib_address: - cmp ah,0Ch - je swap_vsib_registers - cmp ah,0Dh - jne check_vsib_base - swap_vsib_registers: - cmp cl,1 - ja invalid_address - xchg bl,bh - mov cl,1 - check_vsib_base: - test bh,bh - jz vsib_base_ok - mov al,bh - shr al,4 - cmp al,4 - je vsib_base_ok - cmp [code_type],64 - jne invalid_address - cmp al,8 - jne invalid_address - vsib_base_ok: - mov al,bl - shr al,4 - cmp al,0Ch - je check_index_scale - cmp al,0Dh - je check_index_scale - jmp invalid_address - -calculate_relative_offset: - cmp [value_undefined],0 - jne relative_offset_ok - test bh,bh - setne ch - cmp bx,word [org_registers] - je origin_registers_ok - xchg bh,bl - xchg ch,cl - cmp bx,word [org_registers] - jne invalid_value - origin_registers_ok: - cmp cx,word [org_registers+2] - jne invalid_value - mov bl,[address_sign] - add eax,dword [org_origin] - adc edx,dword [org_origin+4] - adc bl,[org_origin_sign] - sub eax,edi - sbb edx,0 - sbb bl,0 - mov [value_sign],bl - mov bl,[value_type] - mov ecx,[address_symbol] - mov [symbol_identifier],ecx - test bl,1 - jnz relative_offset_unallowed - cmp bl,6 - je plt_relative_offset - mov bh,[labels_type] - cmp bl,bh - je set_relative_offset_type - cmp bx,0402h - je set_relative_offset_type - relative_offset_unallowed: - call recoverable_misuse - set_relative_offset_type: - cmp [value_type],0 - je relative_offset_ok - mov [value_type],0 - cmp ecx,[org_symbol] - je relative_offset_ok - mov [value_type],3 - relative_offset_ok: - ret - plt_relative_offset: - mov [value_type],7 - cmp [labels_type],2 - je relative_offset_ok - cmp [labels_type],4 - jne recoverable_misuse - ret - -calculate_logical_expression: - xor al,al - calculate_embedded_logical_expression: - mov [logical_value_wrapping],al - call get_logical_value - logical_loop: - cmp byte [esi],'|' - je logical_or - cmp byte [esi],'&' - je logical_and - ret - logical_or: - inc esi - or al,al - jnz logical_value_already_determined - push eax - call get_logical_value - pop ebx - or al,bl - jmp logical_loop - logical_and: - inc esi - or al,al - jz logical_value_already_determined - push eax - call get_logical_value - pop ebx - and al,bl - jmp logical_loop - logical_value_already_determined: - push eax - call skip_logical_value - jc invalid_expression - pop eax - jmp logical_loop - get_value_for_comparison: - mov [value_size],8 - mov [size_override],-1 - lods byte [esi] - call calculate_expression - cmp byte [edi+8],0 - jne first_register_size_ok - mov byte [edi+10],0 - first_register_size_ok: - cmp byte [edi+9],0 - jne second_register_size_ok - mov byte [edi+11],0 - second_register_size_ok: - mov eax,[edi+16] - mov [symbol_identifier],eax - mov al,[edi+13] - mov [value_sign],al - mov bl,[edi+12] - mov eax,[edi] - mov edx,[edi+4] - mov ecx,[edi+8] - ret - get_logical_value: - xor al,al - check_for_negation: - cmp byte [esi],'~' - jne negation_ok - inc esi - xor al,-1 - jmp check_for_negation - negation_ok: - push eax - mov al,[esi] - cmp al,'{' - je logical_expression - cmp al,0FFh - je invalid_expression - cmp al,88h - je check_for_defined - cmp al,89h - je check_for_used - cmp al,'0' - je given_false - cmp al,'1' - je given_true - call get_value_for_comparison - mov bh,[value_sign] - push eax edx [symbol_identifier] ebx ecx - mov al,[esi] - or al,al - jz logical_number - cmp al,0Fh - je logical_number - cmp al,'}' - je logical_number - cmp al,'&' - je logical_number - cmp al,'|' - je logical_number - inc esi - mov [compare_type],al - call get_value_for_comparison - cmp bl,[esp+4] - jne values_not_relative - or bl,bl - jz check_values_registers - mov ebx,[symbol_identifier] - cmp ebx,[esp+8] - jne values_not_relative - check_values_registers: - cmp ecx,[esp] - je values_relative - ror ecx,16 - xchg ch,cl - ror ecx,16 - xchg ch,cl - cmp ecx,[esp] - je values_relative - values_not_relative: - cmp [compare_type],0F8h - jne invalid_comparison - add esp,12+8 - jmp return_false - invalid_comparison: - call recoverable_misuse - values_relative: - pop ebx - shl ebx,16 - mov bx,[esp] - add esp,8 - pop ecx ebp - cmp [compare_type],'=' - je check_equal - cmp [compare_type],0F1h - je check_not_equal - cmp [compare_type],0F8h - je return_true - test ebx,0FFFF0000h - jz check_less_or_greater - call recoverable_misuse - check_less_or_greater: - cmp [compare_type],'>' - je check_greater - cmp [compare_type],'<' - je check_less - cmp [compare_type],0F2h - je check_not_less - cmp [compare_type],0F3h - je check_not_greater - jmp invalid_expression - check_equal: - cmp bh,[value_sign] - jne return_false - cmp eax,ebp - jne return_false - cmp edx,ecx - jne return_false - jmp return_true - check_greater: - cmp bh,[value_sign] - jg return_true - jl return_false - cmp edx,ecx - jb return_true - ja return_false - cmp eax,ebp - jb return_true - jae return_false - check_less: - cmp bh,[value_sign] - jg return_false - jl return_true - cmp edx,ecx - jb return_false - ja return_true - cmp eax,ebp - jbe return_false - ja return_true - check_not_less: - cmp bh,[value_sign] - jg return_true - jl return_false - cmp edx,ecx - jb return_true - ja return_false - cmp eax,ebp - jbe return_true - ja return_false - check_not_greater: - cmp bh,[value_sign] - jg return_false - jl return_true - cmp edx,ecx - jb return_false - ja return_true - cmp eax,ebp - jb return_false - jae return_true - check_not_equal: - cmp bh,[value_sign] - jne return_true - cmp eax,ebp - jne return_true - cmp edx,ecx - jne return_true - jmp return_false - logical_number: - pop ecx ebx eax edx eax - or bl,bl - jnz invalid_logical_number - or cx,cx - jz logical_number_ok - invalid_logical_number: - call recoverable_misuse - logical_number_ok: - test bh,bh - jnz return_true - or eax,edx - jnz return_true - jmp return_false - check_for_defined: - or bl,-1 - lods word [esi] - cmp ah,'(' - jne invalid_expression - check_expression: - lods byte [esi] - or al,al - jz defined_string - cmp al,'.' - je defined_fp_value - cmp al,')' - je expression_checked - cmp al,'!' - je invalid_expression - cmp al,0Fh - je check_expression - cmp al,10h - je defined_register - cmp al,11h - je check_if_symbol_defined - cmp al,80h - jae check_expression - movzx eax,al - add esi,eax - jmp check_expression - defined_register: - inc esi - jmp check_expression - defined_fp_value: - add esi,12 - jmp expression_checked - defined_string: - lods dword [esi] - add esi,eax - inc esi - jmp expression_checked - check_if_symbol_defined: - lods dword [esi] - cmp eax,-1 - je invalid_expression - cmp eax,0Fh - jb check_expression - je reserved_word_used_as_symbol - test byte [eax+8],4 - jnz no_prediction - test byte [eax+8],1 - jz symbol_predicted_undefined - mov cx,[current_pass] - sub cx,[eax+16] - jz check_expression - cmp cx,1 - ja symbol_predicted_undefined - or byte [eax+8],40h+80h - jmp check_expression - no_prediction: - test byte [eax+8],1 - jz symbol_undefined - mov cx,[current_pass] - sub cx,[eax+16] - jz check_expression - jmp symbol_undefined - symbol_predicted_undefined: - or byte [eax+8],40h - and byte [eax+8],not 80h - symbol_undefined: - xor bl,bl - jmp check_expression - expression_checked: - mov al,bl - jmp logical_value_ok - check_for_used: - lods word [esi] - cmp ah,2 - jne invalid_expression - lods dword [esi] - cmp eax,0Fh - jb invalid_use_of_symbol - je reserved_word_used_as_symbol - inc esi - test byte [eax+8],8 - jz not_used - mov cx,[current_pass] - sub cx,[eax+18] - jz return_true - cmp cx,1 - ja not_used - or byte [eax+8],10h+20h - jmp return_true - not_used: - or byte [eax+8],10h - and byte [eax+8],not 20h - jmp return_false - given_false: - inc esi - return_false: - xor al,al - jmp logical_value_ok - given_true: - inc esi - return_true: - or al,-1 - jmp logical_value_ok - logical_expression: - lods byte [esi] - mov dl,[logical_value_wrapping] - push edx - call calculate_embedded_logical_expression - pop edx - mov [logical_value_wrapping],dl - push eax - lods byte [esi] - cmp al,'}' - jne invalid_expression - pop eax - logical_value_ok: - pop ebx - xor al,bl - ret - -skip_symbol: - lods byte [esi] - or al,al - jz nothing_to_skip - cmp al,0Fh - je nothing_to_skip - cmp al,1 - je skip_instruction - cmp al,2 - je skip_label - cmp al,3 - je skip_label - cmp al,20h - jb skip_assembler_symbol - cmp al,'(' - je skip_expression - cmp al,'[' - je skip_address - skip_done: - clc - ret - skip_label: - add esi,2 - skip_instruction: - add esi,2 - skip_assembler_symbol: - inc esi - jmp skip_done - skip_address: - mov al,[esi] - and al,11110000b - cmp al,60h - jb skip_expression - cmp al,70h - ja skip_expression - inc esi - jmp skip_address - skip_expression: - lods byte [esi] - or al,al - jz skip_string - cmp al,'.' - je skip_fp_value - cmp al,')' - je skip_done - cmp al,']' - je skip_done - cmp al,'!' - je skip_expression - cmp al,0Fh - je skip_expression - cmp al,10h - je skip_register - cmp al,11h - je skip_label_value - cmp al,80h - jae skip_expression - movzx eax,al - add esi,eax - jmp skip_expression - skip_label_value: - add esi,3 - skip_register: - inc esi - jmp skip_expression - skip_fp_value: - add esi,12 - jmp skip_done - skip_string: - lods dword [esi] - add esi,eax - inc esi - jmp skip_done - nothing_to_skip: - dec esi - stc - ret - -expand_path: - lods byte [esi] - cmp al,'%' - je environment_variable - stos byte [edi] - or al,al - jnz expand_path - cmp edi,[memory_end] - ja out_of_memory - ret - environment_variable: - mov ebx,esi - find_variable_end: - lods byte [esi] - or al,al - jz not_environment_variable - cmp al,'%' - jne find_variable_end - mov byte [esi-1],0 - push esi - mov esi,ebx - call get_environment_variable - pop esi - mov byte [esi-1],'%' - jmp expand_path - not_environment_variable: - mov al,'%' - stos byte [edi] - mov esi,ebx - jmp expand_path -get_include_directory: - lods byte [esi] - cmp al,';' - je include_directory_ok - stos byte [edi] - or al,al - jnz get_include_directory - dec esi - dec edi - include_directory_ok: - cmp byte [edi-1],'/' - je path_separator_ok - cmp byte [edi-1],'\' - je path_separator_ok - mov al,'/' - stos byte [edi] - path_separator_ok: - ret + + +; flat assembler core +; Copyright (c) 1999-2013, Tomasz Grysztar. +; All rights reserved. + +calculate_expression: + mov [current_offset],edi + mov [value_undefined],0 + cmp byte [esi],0 + je get_string_value + cmp byte [esi],'.' + je convert_fp + calculation_loop: + lods byte [esi] + cmp al,1 + je get_byte_number + cmp al,2 + je get_word_number + cmp al,4 + je get_dword_number + cmp al,8 + je get_qword_number + cmp al,0Fh + je value_out_of_range + cmp al,10h + je get_register + cmp al,11h + je get_label + cmp al,')' + je expression_calculated + cmp al,']' + je expression_calculated + cmp al,'!' + je invalid_expression + sub edi,14h + mov ebx,edi + sub ebx,14h + cmp al,0E0h + je calculate_rva + cmp al,0E1h + je calculate_plt + cmp al,0D0h + je calculate_not + cmp al,083h + je calculate_neg + mov dx,[ebx+8] + or dx,[edi+8] + cmp al,80h + je calculate_add + cmp al,81h + je calculate_sub + mov ah,[ebx+12] + or ah,[edi+12] + jz absolute_values_calculation + call recoverable_misuse + absolute_values_calculation: + cmp al,90h + je calculate_mul + cmp al,91h + je calculate_div + or dx,dx + jnz invalid_expression + cmp al,0A0h + je calculate_mod + cmp al,0B0h + je calculate_and + cmp al,0B1h + je calculate_or + cmp al,0B2h + je calculate_xor + cmp al,0C0h + je calculate_shl + cmp al,0C1h + je calculate_shr + jmp invalid_expression + expression_calculated: + sub edi,14h + cmp [value_undefined],0 + je expression_value_ok + xor eax,eax + mov [edi],eax + mov [edi+4],eax + mov [edi+12],eax + expression_value_ok: + ret + get_byte_number: + xor eax,eax + lods byte [esi] + stos dword [edi] + xor al,al + stos dword [edi] + got_number: + and word [edi-8+8],0 + and word [edi-8+12],0 + and dword [edi-8+16],0 + add edi,0Ch + jmp calculation_loop + get_word_number: + xor eax,eax + lods word [esi] + stos dword [edi] + xor ax,ax + stos dword [edi] + jmp got_number + get_dword_number: + movs dword [edi],[esi] + xor eax,eax + stos dword [edi] + jmp got_number + get_qword_number: + movs dword [edi],[esi] + movs dword [edi],[esi] + jmp got_number + get_register: + mov byte [edi+9],0 + and word [edi+12],0 + lods byte [esi] + mov [edi+8],al + mov byte [edi+10],1 + xor eax,eax + mov [edi+16],eax + stos dword [edi] + stos dword [edi] + add edi,0Ch + jmp calculation_loop + get_label: + xor eax,eax + mov [edi+8],eax + mov [edi+12],eax + mov [edi+20],eax + lods dword [esi] + cmp eax,0Fh + jb predefined_label + je reserved_word_used_as_symbol + mov ebx,eax + mov ax,[current_pass] + mov [ebx+18],ax + mov cl,[ebx+9] + shr cl,1 + and cl,1 + neg cl + or byte [ebx+8],8 + test byte [ebx+8],1 + jz label_undefined + cmp ax,[ebx+16] + je unadjusted_label + test byte [ebx+8],4 + jnz label_out_of_scope + test byte [ebx+9],1 + jz unadjusted_label + mov eax,[ebx] + sub eax,dword [adjustment] + stos dword [edi] + mov eax,[ebx+4] + sbb eax,dword [adjustment+4] + stos dword [edi] + sbb cl,[adjustment_sign] + mov [edi-8+13],cl + mov eax,dword [adjustment] + or al,[adjustment_sign] + or eax,dword [adjustment+4] + jz got_label + or [next_pass_needed],-1 + jmp got_label + unadjusted_label: + mov eax,[ebx] + stos dword [edi] + mov eax,[ebx+4] + stos dword [edi] + mov [edi-8+13],cl + got_label: + test byte [ebx+9],4 + jnz invalid_use_of_symbol + cmp [symbols_file],0 + je label_reference_ok + cmp [next_pass_needed],0 + jne label_reference_ok + call store_label_reference + label_reference_ok: + mov al,[ebx+11] + mov [edi-8+12],al + mov eax,[ebx+12] + mov [edi-8+8],eax + cmp al,ah + jne labeled_registers_ok + shr eax,16 + add al,ah + jo labeled_registers_ok + xor ah,ah + mov [edi-8+10],ax + mov [edi-8+9],ah + labeled_registers_ok: + mov eax,[ebx+20] + mov [edi-8+16],eax + add edi,0Ch + mov al,[ebx+10] + or al,al + jz calculation_loop + cmp [size_override],-1 + je calculation_loop + cmp [size_override],0 + je check_size + cmp [operand_size],0 + jne calculation_loop + mov [operand_size],al + jmp calculation_loop + check_size: + xchg [operand_size],al + or al,al + jz calculation_loop + cmp al,[operand_size] + jne operand_sizes_do_not_match + jmp calculation_loop + current_offset_label: + mov eax,[current_offset] + make_current_offset_label: + xor edx,edx + xor ch,ch + mov ebp,[addressing_space] + sub eax,[ds:ebp] + sbb edx,[ds:ebp+4] + sbb ch,[ds:ebp+8] + jp current_offset_label_ok + call recoverable_overflow + current_offset_label_ok: + stos dword [edi] + mov eax,edx + stos dword [edi] + mov eax,[ds:ebp+10h] + stos dword [edi] + mov cl,[ds:ebp+9] + mov [edi-12+12],cx + mov eax,[ds:ebp+14h] + mov [edi-12+16],eax + add edi,8 + jmp calculation_loop + org_origin_label: + mov eax,[addressing_space] + mov eax,[eax+18h] + jmp make_current_offset_label + counter_label: + mov eax,[counter] + make_dword_label_value: + stos dword [edi] + xor eax,eax + stos dword [edi] + add edi,0Ch + jmp calculation_loop + timestamp_label: + call make_timestamp + make_qword_label_value: + stos dword [edi] + mov eax,edx + stos dword [edi] + add edi,0Ch + jmp calculation_loop + predefined_label: + or eax,eax + jz current_offset_label + cmp eax,1 + je counter_label + cmp eax,2 + je timestamp_label + cmp eax,3 + je org_origin_label + mov edx,invalid_value + jmp error_undefined + label_out_of_scope: + mov edx,symbol_out_of_scope + jmp error_undefined + label_undefined: + mov edx,undefined_symbol + error_undefined: + cmp [current_pass],1 + ja undefined_value + force_next_pass: + or [next_pass_needed],-1 + undefined_value: + or [value_undefined],-1 + and word [edi+12],0 + xor eax,eax + stos dword [edi] + stos dword [edi] + add edi,0Ch + cmp [error_line],0 + jne calculation_loop + mov eax,[current_line] + mov [error_line],eax + mov [error],edx + mov [error_info],ebx + jmp calculation_loop + calculate_add: + xor ah,ah + mov ah,[ebx+12] + mov al,[edi+12] + or al,al + jz add_values + or ah,ah + jz add_relocatable + add ah,al + jnz invalid_add + mov ecx,[edi+16] + cmp ecx,[ebx+16] + je add_values + invalid_add: + call recoverable_misuse + jmp add_values + add_relocatable: + mov ah,al + mov ecx,[edi+16] + mov [ebx+16],ecx + add_values: + mov [ebx+12],ah + mov eax,[edi] + add [ebx],eax + mov eax,[edi+4] + adc [ebx+4],eax + mov al,[edi+13] + adc [ebx+13],al + jp add_sign_ok + call recoverable_overflow + add_sign_ok: + or dx,dx + jz calculation_loop + push esi + mov esi,ebx + mov cl,[edi+10] + mov al,[edi+8] + call add_register + mov cl,[edi+11] + mov al,[edi+9] + call add_register + pop esi + jmp calculation_loop + add_register: + or al,al + jz add_register_done + add_register_start: + cmp [esi+8],al + jne add_in_second_slot + add [esi+10],cl + jo value_out_of_range + jnz add_register_done + mov byte [esi+8],0 + ret + add_in_second_slot: + cmp [esi+9],al + jne create_in_first_slot + add [esi+11],cl + jo value_out_of_range + jnz add_register_done + mov byte [esi+9],0 + ret + create_in_first_slot: + cmp byte [esi+8],0 + jne create_in_second_slot + mov [esi+8],al + mov [esi+10],cl + ret + create_in_second_slot: + cmp byte [esi+9],0 + jne invalid_expression + mov [esi+9],al + mov [esi+11],cl + add_register_done: + ret + out_of_range: + jmp calculation_loop + calculate_sub: + xor ah,ah + mov ah,[ebx+12] + mov al,[edi+12] + or al,al + jz sub_values + or ah,ah + jz negate_relocatable + cmp al,ah + jne invalid_sub + xor ah,ah + mov ecx,[edi+16] + cmp ecx,[ebx+16] + je sub_values + invalid_sub: + call recoverable_misuse + jmp sub_values + negate_relocatable: + neg al + mov ah,al + mov ecx,[edi+16] + mov [ebx+16],ecx + sub_values: + mov [ebx+12],ah + mov eax,[edi] + sub [ebx],eax + mov eax,[edi+4] + sbb [ebx+4],eax + mov al,[edi+13] + sbb [ebx+13],al + jp sub_sign_ok + cmp [error_line],0 + jne sub_sign_ok + call recoverable_overflow + sub_sign_ok: + or dx,dx + jz calculation_loop + push esi + mov esi,ebx + mov cl,[edi+10] + mov al,[edi+8] + call sub_register + mov cl,[edi+11] + mov al,[edi+9] + call sub_register + pop esi + jmp calculation_loop + sub_register: + or al,al + jz add_register_done + neg cl + jo value_out_of_range + jmp add_register_start + calculate_mul: + or dx,dx + jz mul_start + cmp word [ebx+8],0 + jne mul_start + xor ecx,ecx + swap_values: + mov eax,[ebx+ecx] + xchg eax,[edi+ecx] + mov [ebx+ecx],eax + add ecx,4 + cmp ecx,16 + jb swap_values + mul_start: + push esi edx + mov esi,ebx + xor bl,bl + cmp byte [esi+13],0 + je mul_first_sign_ok + xor bl,-1 + mov eax,[esi] + mov edx,[esi+4] + not eax + not edx + add eax,1 + adc edx,0 + mov [esi],eax + mov [esi+4],edx + or eax,edx + jz mul_overflow + mul_first_sign_ok: + cmp byte [edi+13],0 + je mul_second_sign_ok + xor bl,-1 + cmp byte [esi+8],0 + je mul_first_register_sign_ok + neg byte [esi+10] + jo invalid_expression + mul_first_register_sign_ok: + cmp byte [esi+9],0 + je mul_second_register_sign_ok + neg byte [esi+11] + jo invalid_expression + mul_second_register_sign_ok: + mov eax,[edi] + mov edx,[edi+4] + not eax + not edx + add eax,1 + adc edx,0 + mov [edi],eax + mov [edi+4],edx + or eax,edx + jz mul_overflow + mul_second_sign_ok: + cmp dword [esi+4],0 + jz mul_numbers + cmp dword [edi+4],0 + jz mul_numbers + jnz mul_overflow + mul_numbers: + mov eax,[esi+4] + mul dword [edi] + or edx,edx + jnz mul_overflow + mov ecx,eax + mov eax,[esi] + mul dword [edi+4] + or edx,edx + jnz mul_overflow + add ecx,eax + jc mul_overflow + mov eax,[esi] + mul dword [edi] + add edx,ecx + jc mul_overflow + mov [esi],eax + mov [esi+4],edx + or bl,bl + jz mul_ok + not eax + not edx + add eax,1 + adc edx,0 + mov [esi],eax + mov [esi+4],edx + or eax,edx + jnz mul_ok + not bl + mul_ok: + mov [esi+13],bl + pop edx + or dx,dx + jz mul_calculated + cmp word [edi+8],0 + jne invalid_value + cmp byte [esi+8],0 + je mul_first_register_ok + call get_byte_scale + imul byte [esi+10] + mov dl,ah + cbw + cmp ah,dl + jne value_out_of_range + mov [esi+10],al + or al,al + jnz mul_first_register_ok + mov [esi+8],al + mul_first_register_ok: + cmp byte [esi+9],0 + je mul_calculated + call get_byte_scale + imul byte [esi+11] + mov dl,ah + cbw + cmp ah,dl + jne value_out_of_range + mov [esi+11],al + or al,al + jnz mul_calculated + mov [esi+9],al + mul_calculated: + pop esi + jmp calculation_loop + mul_overflow: + pop edx esi + call recoverable_overflow + jmp calculation_loop + get_byte_scale: + mov al,[edi] + cbw + cwde + cdq + cmp edx,[edi+4] + jne value_out_of_range + cmp eax,[edi] + jne value_out_of_range + ret + calculate_div: + push esi edx + mov esi,ebx + call div_64 + pop edx + or dx,dx + jz div_calculated + cmp byte [esi+8],0 + je div_first_register_ok + call get_byte_scale + or al,al + jz value_out_of_range + mov al,[esi+10] + cbw + idiv byte [edi] + or ah,ah + jnz invalid_use_of_symbol + mov [esi+10],al + div_first_register_ok: + cmp byte [esi+9],0 + je div_calculated + call get_byte_scale + or al,al + jz value_out_of_range + mov al,[esi+11] + cbw + idiv byte [edi] + or ah,ah + jnz invalid_use_of_symbol + mov [esi+11],al + div_calculated: + pop esi + jmp calculation_loop + calculate_mod: + push esi + mov esi,ebx + call div_64 + mov [esi],eax + mov [esi+4],edx + mov [esi+13],bh + pop esi + jmp calculation_loop + calculate_and: + mov eax,[edi] + mov edx,[edi+4] + mov cl,[edi+13] + and [ebx],eax + and [ebx+4],edx + and [ebx+13],cl + jmp calculation_loop + calculate_or: + mov eax,[edi] + mov edx,[edi+4] + mov cl,[edi+13] + or [ebx],eax + or [ebx+4],edx + or [ebx+13],cl + jmp calculation_loop + calculate_xor: + mov eax,[edi] + mov edx,[edi+4] + mov cl,[edi+13] + xor [ebx],eax + xor [ebx+4],edx + xor [ebx+13],cl + jz calculation_loop + or cl,cl + jz xor_size_check + xor eax,[ebx] + xor edx,[ebx+4] + xor_size_check: + mov cl,[value_size] + cmp cl,1 + je xor_byte_result + cmp cl,2 + je xor_word_result + cmp cl,4 + je xor_dword_result + cmp cl,6 + je xor_pword_result + cmp cl,8 + jne calculation_loop + xor edx,[ebx+4] + js xor_result_truncated + jmp calculation_loop + xor_pword_result: + test edx,0FFFF0000h + jnz calculation_loop + cmp word [ebx+6],-1 + jne calculation_loop + xor dx,[ebx+4] + jns calculation_loop + not word [ebx+6] + jmp xor_result_truncated + xor_dword_result: + test edx,edx + jnz calculation_loop + cmp dword [ebx+4],-1 + jne calculation_loop + xor eax,[ebx] + jns calculation_loop + not dword [ebx+4] + jmp xor_result_truncated + xor_word_result: + test edx,edx + jnz calculation_loop + test eax,0FFFF0000h + jnz calculation_loop + cmp dword [ebx+4],-1 + jne calculation_loop + cmp word [ebx+2],-1 + jne calculation_loop + xor ax,[ebx] + jns calculation_loop + not dword [ebx+4] + not word [ebx+2] + jmp xor_result_truncated + xor_byte_result: + test edx,edx + jnz calculation_loop + test eax,0FFFFFF00h + jnz calculation_loop + cmp dword [ebx+4],-1 + jne calculation_loop + cmp word [ebx+2],-1 + jne calculation_loop + cmp byte [ebx+1],-1 + jne calculation_loop + xor al,[ebx] + jns calculation_loop + not dword [ebx+4] + not word [ebx+2] + not byte [ebx+1] + xor_result_truncated: + mov byte [ebx+13],0 + jmp calculation_loop + shr_negative: + mov byte [edi+13],0 + not dword [edi] + not dword [edi+4] + add dword [edi],1 + adc dword [edi+4],0 + jc shl_over + calculate_shl: + cmp byte [edi+13],0 + jne shl_negative + mov edx,[ebx+4] + mov eax,[ebx] + cmp dword [edi+4],0 + jne shl_over + movsx ecx,byte [ebx+13] + xchg ecx,[edi] + cmp ecx,64 + je shl_max + ja shl_over + cmp ecx,32 + jae shl_high + shld [edi],edx,cl + shld edx,eax,cl + shl eax,cl + mov [ebx],eax + mov [ebx+4],edx + jmp shl_done + shl_over: + cmp byte [ebx+13],0 + jne shl_overflow + shl_max: + movsx ecx,byte [ebx+13] + cmp eax,ecx + jne shl_overflow + cmp edx,ecx + jne shl_overflow + xor eax,eax + mov [ebx],eax + mov [ebx+4],eax + jmp calculation_loop + shl_high: + sub cl,32 + shld [edi],edx,cl + shld edx,eax,cl + shl eax,cl + mov [ebx+4],eax + and dword [ebx],0 + cmp edx,[edi] + jne shl_overflow + shl_done: + movsx eax,byte [ebx+13] + cmp eax,[edi] + je calculation_loop + shl_overflow: + call recoverable_overflow + jmp calculation_loop + shl_negative: + mov byte [edi+13],0 + not dword [edi] + not dword [edi+4] + add dword [edi],1 + adc dword [edi+4],0 + jnc calculate_shr + dec dword [edi+4] + calculate_shr: + cmp byte [edi+13],0 + jne shr_negative + cmp byte [ebx+13],0 + je do_shr + mov al,[value_size] + cmp al,1 + je shr_negative_byte + cmp al,2 + je shr_negative_word + cmp al,4 + je shr_negative_dword + cmp al,6 + je shr_negative_pword + cmp al,8 + jne do_shr + shr_negative_qword: + test byte [ebx+7],80h + jz do_shr + shr_truncated: + mov byte [ebx+13],0 + do_shr: + mov edx,[ebx+4] + mov eax,[ebx] + cmp dword [edi+4],0 + jne shr_over + mov ecx,[edi] + cmp ecx,64 + jae shr_over + push esi + movsx esi,byte [ebx+13] + cmp ecx,32 + jae shr_high + shrd eax,edx,cl + shrd edx,esi,cl + mov [ebx],eax + mov [ebx+4],edx + pop esi + jmp calculation_loop + shr_high: + sub cl,32 + shrd edx,esi,cl + mov [ebx],edx + mov [ebx+4],esi + pop esi + jmp calculation_loop + shr_over: + movsx eax,byte [ebx+13] + mov dword [ebx],eax + mov dword [ebx+4],eax + jmp calculation_loop + shr_negative_byte: + cmp dword [ebx+4],-1 + jne do_shr + cmp word [ebx+2],-1 + jne do_shr + cmp byte [ebx+1],-1 + jne do_shr + test byte [ebx],80h + jz do_shr + not dword [ebx+4] + not word [ebx+2] + not byte [ebx+1] + jmp shr_truncated + shr_negative_word: + cmp dword [ebx+4],-1 + jne do_shr + cmp word [ebx+2],-1 + jne do_shr + test byte [ebx+1],80h + jz do_shr + not dword [ebx+4] + not word [ebx+2] + jmp shr_truncated + shr_negative_dword: + cmp dword [ebx+4],-1 + jne do_shr + test byte [ebx+3],80h + jz do_shr + not dword [ebx+4] + jmp shr_truncated + shr_negative_pword: + cmp word [ebx+6],-1 + jne do_shr + test byte [ebx+5],80h + jz do_shr + not word [ebx+6] + jmp shr_truncated + calculate_not: + cmp word [edi+8],0 + jne invalid_expression + cmp byte [edi+12],0 + je not_ok + call recoverable_misuse + not_ok: + mov al,[value_size] + cmp al,1 + je not_byte + cmp al,2 + je not_word + cmp al,4 + je not_dword + cmp al,6 + je not_pword + cmp al,8 + je not_qword + not dword [edi] + not dword [edi+4] + not byte [edi+13] + add edi,14h + jmp calculation_loop + not_qword: + not dword [edi] + not dword [edi+4] + finish_not: + mov byte [edi+13],0 + add edi,14h + jmp calculation_loop + not_byte: + cmp dword [edi+4],0 + jne not_qword + cmp word [edi+2],0 + jne not_qword + cmp byte [edi+1],0 + jne not_qword + not byte [edi] + jmp finish_not + not_word: + cmp dword [edi+4],0 + jne not_qword + cmp word [edi+2],0 + jne not_qword + not word [edi] + jmp finish_not + not_dword: + cmp dword [edi+4],0 + jne not_qword + not dword [edi] + jmp finish_not + not_pword: + cmp word [edi+6],0 + jne not_qword + not word [edi+4] + not dword [edi] + jmp finish_not + calculate_neg: + cmp byte [edi+8],0 + je neg_first_register_ok + neg byte [edi+10] + jo invalid_expression + neg_first_register_ok: + cmp byte [edi+9],0 + je neg_second_register_ok + neg byte [edi+11] + jo invalid_expression + neg_second_register_ok: + neg byte [edi+12] + xor eax,eax + xor edx,edx + xor cl,cl + xchg eax,[edi] + xchg edx,[edi+4] + xchg cl,[edi+13] + sub [edi],eax + sbb [edi+4],edx + sbb [edi+13],cl + jp neg_sign_ok + call recoverable_overflow + neg_sign_ok: + add edi,14h + jmp calculation_loop + calculate_rva: + cmp word [edi+8],0 + jne invalid_expression + mov al,[output_format] + cmp al,5 + je calculate_gotoff + cmp al,4 + je calculate_coff_rva + cmp al,3 + jne invalid_expression + test [format_flags],8 + jnz pe64_rva + mov al,2 + bt [resolver_flags],0 + jc rva_type_ok + xor al,al + rva_type_ok: + cmp byte [edi+12],al + je rva_ok + call recoverable_misuse + rva_ok: + mov byte [edi+12],0 + mov eax,[code_start] + mov eax,[eax+34h] + xor edx,edx + finish_rva: + sub [edi],eax + sbb [edi+4],edx + sbb byte [edi+13],0 + jp rva_finished + call recoverable_overflow + rva_finished: + add edi,14h + jmp calculation_loop + pe64_rva: + mov al,4 + bt [resolver_flags],0 + jc pe64_rva_type_ok + xor al,al + pe64_rva_type_ok: + cmp byte [edi+12],al + je pe64_rva_ok + call recoverable_misuse + pe64_rva_ok: + mov byte [edi+12],0 + mov eax,[code_start] + mov edx,[eax+34h] + mov eax,[eax+30h] + jmp finish_rva + calculate_gotoff: + test [format_flags],8+1 + jnz invalid_expression + calculate_coff_rva: + mov dl,5 + cmp byte [edi+12],2 + je change_value_type + incorrect_change_of_value_type: + call recoverable_misuse + change_value_type: + mov byte [edi+12],dl + add edi,14h + jmp calculation_loop + calculate_plt: + cmp word [edi+8],0 + jne invalid_expression + cmp [output_format],5 + jne invalid_expression + test [format_flags],1 + jnz invalid_expression + mov dl,6 + mov dh,2 + test [format_flags],8 + jz check_value_for_plt + mov dh,4 + check_value_for_plt: + mov eax,[edi] + or eax,[edi+4] + jnz incorrect_change_of_value_type + cmp byte [edi+12],dh + jne incorrect_change_of_value_type + mov eax,[edi+16] + cmp byte [eax],80h + jne incorrect_change_of_value_type + jmp change_value_type + div_64: + xor ebx,ebx + cmp dword [edi],0 + jne divider_ok + cmp dword [edi+4],0 + jne divider_ok + cmp [next_pass_needed],0 + je value_out_of_range + jmp div_done + divider_ok: + cmp byte [esi+13],0 + je div_first_sign_ok + mov eax,[esi] + mov edx,[esi+4] + not eax + not edx + add eax,1 + adc edx,0 + mov [esi],eax + mov [esi+4],edx + or eax,edx + jz value_out_of_range + xor bx,-1 + div_first_sign_ok: + cmp byte [edi+13],0 + je div_second_sign_ok + mov eax,[edi] + mov edx,[edi+4] + not eax + not edx + add eax,1 + adc edx,0 + mov [edi],eax + mov [edi+4],edx + or eax,edx + jz value_out_of_range + xor bl,-1 + div_second_sign_ok: + cmp dword [edi+4],0 + jne div_high + mov ecx,[edi] + mov eax,[esi+4] + xor edx,edx + div ecx + mov [esi+4],eax + mov eax,[esi] + div ecx + mov [esi],eax + mov eax,edx + xor edx,edx + jmp div_done + div_high: + push ebx + mov eax,[esi+4] + xor edx,edx + div dword [edi+4] + mov ebx,[esi] + mov [esi],eax + and dword [esi+4],0 + mov ecx,edx + mul dword [edi] + div_high_loop: + cmp ecx,edx + ja div_high_done + jb div_high_large_correction + cmp ebx,eax + jae div_high_done + div_high_correction: + dec dword [esi] + sub eax,[edi] + sbb edx,[edi+4] + jnc div_high_loop + div_high_done: + sub ebx,eax + sbb ecx,edx + mov edx,ecx + mov eax,ebx + pop ebx + jmp div_done + div_high_large_correction: + push eax edx + mov eax,edx + sub eax,ecx + xor edx,edx + div dword [edi+4] + shr eax,1 + jz div_high_small_correction + sub [esi],eax + push eax + mul dword [edi+4] + sub dword [esp+4],eax + pop eax + mul dword [edi] + sub dword [esp+4],eax + sbb dword [esp],edx + pop edx eax + jmp div_high_loop + div_high_small_correction: + pop edx eax + jmp div_high_correction + div_done: + or bh,bh + jz remainder_ok + not eax + not edx + add eax,1 + adc edx,0 + mov ecx,eax + or ecx,edx + jnz remainder_ok + not bh + remainder_ok: + or bl,bl + jz div_ok + not dword [esi] + not dword [esi+4] + add dword [esi],1 + adc dword [esi+4],0 + mov ecx,[esi] + or ecx,[esi+4] + jnz div_ok + not bl + div_ok: + mov [esi+13],bl + ret + store_label_reference: + mov eax,[tagged_blocks] + mov dword [eax-4],2 + mov dword [eax-8],4 + sub eax,8+4 + cmp eax,edi + jbe out_of_memory + mov [tagged_blocks],eax + mov [eax],ebx + ret + convert_fp: + inc esi + and word [edi+8],0 + and word [edi+12],0 + mov al,[value_size] + cmp al,2 + je convert_fp_word + cmp al,4 + je convert_fp_dword + test al,not 8 + jnz invalid_value + convert_fp_qword: + xor eax,eax + xor edx,edx + cmp word [esi+8],8000h + je fp_qword_store + mov bx,[esi+8] + mov eax,[esi] + mov edx,[esi+4] + add eax,eax + adc edx,edx + mov ecx,edx + shr edx,12 + shrd eax,ecx,12 + jnc fp_qword_ok + add eax,1 + adc edx,0 + bt edx,20 + jnc fp_qword_ok + and edx,1 shl 20 - 1 + inc bx + shr edx,1 + rcr eax,1 + fp_qword_ok: + add bx,3FFh + cmp bx,7FFh + jge value_out_of_range + cmp bx,0 + jg fp_qword_exp_ok + or edx,1 shl 20 + mov cx,bx + neg cx + inc cx + cmp cx,52 + ja value_out_of_range + cmp cx,32 + jbe fp_qword_small_shift + sub cx,32 + mov eax,edx + xor edx,edx + shr eax,cl + jmp fp_qword_shift_done + fp_qword_small_shift: + mov ebx,edx + shr edx,cl + shrd eax,ebx,cl + fp_qword_shift_done: + mov bx,0 + jnc fp_qword_exp_ok + add eax,1 + adc edx,0 + test edx,1 shl 20 + jz fp_qword_exp_ok + and edx,1 shl 20 - 1 + inc bx + fp_qword_exp_ok: + shl ebx,20 + or edx,ebx + fp_qword_store: + mov bl,[esi+11] + shl ebx,31 + or edx,ebx + mov [edi],eax + mov [edi+4],edx + add esi,13 + ret + convert_fp_word: + xor eax,eax + cmp word [esi+8],8000h + je fp_word_store + mov bx,[esi+8] + mov ax,[esi+6] + shl ax,1 + shr ax,6 + jnc fp_word_ok + inc ax + bt ax,10 + jnc fp_word_ok + and ax,1 shl 10 - 1 + inc bx + shr ax,1 + fp_word_ok: + add bx,0Fh + cmp bx,01Fh + jge value_out_of_range + cmp bx,0 + jg fp_word_exp_ok + or ax,1 shl 10 + mov cx,bx + neg cx + inc cx + cmp cx,10 + ja value_out_of_range + xor bx,bx + shr ax,cl + jnc fp_word_exp_ok + inc ax + test ax,1 shl 10 + jz fp_word_exp_ok + and ax,1 shl 10 - 1 + inc bx + fp_word_exp_ok: + shl bx,10 + or ax,bx + fp_word_store: + mov bl,[esi+11] + shl bx,15 + or ax,bx + mov [edi],eax + xor eax,eax + mov [edi+4],eax + add esi,13 + ret + convert_fp_dword: + xor eax,eax + cmp word [esi+8],8000h + je fp_dword_store + mov bx,[esi+8] + mov eax,[esi+4] + shl eax,1 + shr eax,9 + jnc fp_dword_ok + inc eax + bt eax,23 + jnc fp_dword_ok + and eax,1 shl 23 - 1 + inc bx + shr eax,1 + fp_dword_ok: + add bx,7Fh + cmp bx,0FFh + jge value_out_of_range + cmp bx,0 + jg fp_dword_exp_ok + or eax,1 shl 23 + mov cx,bx + neg cx + inc cx + cmp cx,23 + ja value_out_of_range + xor bx,bx + shr eax,cl + jnc fp_dword_exp_ok + inc eax + test eax,1 shl 23 + jz fp_dword_exp_ok + and eax,1 shl 23 - 1 + inc bx + fp_dword_exp_ok: + shl ebx,23 + or eax,ebx + fp_dword_store: + mov bl,[esi+11] + shl ebx,31 + or eax,ebx + mov [edi],eax + xor eax,eax + mov [edi+4],eax + add esi,13 + ret + get_string_value: + inc esi + lods dword [esi] + mov ecx,eax + cmp ecx,8 + ja value_out_of_range + mov edx,edi + xor eax,eax + stos dword [edi] + stos dword [edi] + mov edi,edx + rep movs byte [edi],[esi] + mov edi,edx + inc esi + and word [edi+8],0 + and word [edi+12],0 + ret + +get_byte_value: + mov [value_size],1 + mov [size_override],-1 + call calculate_value + or al,al + jz check_byte_value + call recoverable_misuse + check_byte_value: + mov eax,[edi] + mov edx,[edi+4] + cmp byte [edi+13],0 + je byte_positive + cmp edx,-1 + jne range_exceeded + cmp eax,-80h + jb range_exceeded + ret + byte_positive: + test edx,edx + jnz range_exceeded + cmp eax,100h + jae range_exceeded + return_byte_value: + ret + range_exceeded: + xor eax,eax + xor edx,edx + recoverable_overflow: + cmp [error_line],0 + jne ignore_overflow + push [current_line] + pop [error_line] + mov [error],value_out_of_range + or [value_undefined],-1 + ignore_overflow: + ret + recoverable_misuse: + cmp [error_line],0 + jne ignore_misuse + push [current_line] + pop [error_line] + mov [error],invalid_use_of_symbol + ignore_misuse: + ret +get_word_value: + mov [value_size],2 + mov [size_override],-1 + call calculate_value + cmp al,2 + jb check_word_value + call recoverable_misuse + check_word_value: + mov eax,[edi] + mov edx,[edi+4] + cmp byte [edi+13],0 + je word_positive + cmp edx,-1 + jne range_exceeded + cmp eax,-8000h + jb range_exceeded + ret + word_positive: + test edx,edx + jnz range_exceeded + cmp eax,10000h + jae range_exceeded + ret +get_dword_value: + mov [value_size],4 + mov [size_override],-1 + call calculate_value + cmp al,4 + jne check_dword_value + mov [value_type],2 + mov eax,[edi] + cdq + cmp edx,[edi+4] + jne range_exceeded + mov ecx,edx + shr ecx,31 + cmp cl,[value_sign] + jne range_exceeded + ret + check_dword_value: + mov eax,[edi] + mov edx,[edi+4] + cmp byte [edi+13],0 + je dword_positive + cmp edx,-1 + jne range_exceeded + bt eax,31 + jnc range_exceeded + ret + dword_positive: + test edx,edx + jne range_exceeded + ret +get_pword_value: + mov [value_size],6 + mov [size_override],-1 + call calculate_value + cmp al,4 + jne check_pword_value + call recoverable_misuse + check_pword_value: + mov eax,[edi] + mov edx,[edi+4] + cmp byte [edi+13],0 + je pword_positive + cmp edx,-8000h + jb range_exceeded + ret + pword_positive: + cmp edx,10000h + jae range_exceeded + ret +get_qword_value: + mov [value_size],8 + mov [size_override],-1 + call calculate_value + check_qword_value: + mov eax,[edi] + mov edx,[edi+4] + cmp byte [edi+13],0 + je qword_positive + cmp edx,-80000000h + jb range_exceeded + qword_positive: + ret +get_count_value: + mov [value_size],8 + mov [size_override],-1 + call calculate_expression + cmp word [edi+8],0 + jne invalid_value + mov [value_sign],0 + mov al,[edi+12] + or al,al + jz check_count_value + call recoverable_misuse + check_count_value: + cmp byte [edi+13],0 + jne invalid_count_value + mov eax,[edi] + mov edx,[edi+4] + or edx,edx + jnz invalid_count_value + ret + invalid_count_value: + cmp [error_line],0 + jne zero_count + mov eax,[current_line] + mov [error_line],eax + mov [error],invalid_value + zero_count: + xor eax,eax + ret +get_value: + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,'(' + jne invalid_value + mov al,[operand_size] + cmp al,1 + je value_byte + cmp al,2 + je value_word + cmp al,4 + je value_dword + cmp al,6 + je value_pword + cmp al,8 + je value_qword + or al,al + jnz invalid_value + mov [value_size],al + call calculate_value + mov eax,[edi] + mov edx,[edi+4] + ret + calculate_value: + call calculate_expression + cmp word [edi+8],0 + jne invalid_value + mov eax,[edi+16] + mov [symbol_identifier],eax + mov al,[edi+13] + mov [value_sign],al + mov al,[edi+12] + mov [value_type],al + ret + value_qword: + call get_qword_value + truncated_value: + mov [value_sign],0 + ret + value_pword: + call get_pword_value + movzx edx,dx + jmp truncated_value + value_dword: + call get_dword_value + xor edx,edx + jmp truncated_value + value_word: + call get_word_value + xor edx,edx + movzx eax,ax + jmp truncated_value + value_byte: + call get_byte_value + xor edx,edx + movzx eax,al + jmp truncated_value +get_address_word_value: + mov [address_size],2 + mov [value_size],2 + mov [free_address_range],0 + jmp calculate_address +get_address_dword_value: + mov [address_size],4 + mov [value_size],4 + mov [free_address_range],0 + jmp calculate_address +get_address_qword_value: + mov [address_size],8 + mov [value_size],8 + mov [free_address_range],0 + jmp calculate_address +get_address_value: + mov [address_size],0 + mov [value_size],8 + or [free_address_range],-1 + calculate_address: + cmp byte [esi],'.' + je invalid_address + call calculate_expression + mov eax,[edi+16] + mov [address_symbol],eax + mov al,[edi+13] + mov [address_sign],al + mov al,[edi+12] + mov [value_type],al + cmp al,0 + je address_size_ok + jg get_address_symbol_size + neg al + get_address_symbol_size: + cmp al,6 + je special_address_type_32bit + cmp al,5 + je special_address_type_32bit + ja invalid_address_type + test al,1 + jnz invalid_address_type + shl al,5 + jmp address_symbol_ok + invalid_address_type: + call recoverable_misuse + special_address_type_32bit: + mov al,40h + address_symbol_ok: + mov ah,[address_size] + or [address_size],al + shr al,4 + or ah,ah + jz address_size_ok + cmp al,ah + je address_size_ok + cmp ax,0408h + je address_sizes_mixed + cmp ax,0804h + jne address_sizes_do_not_agree + address_sizes_mixed: + mov [value_type],2 + mov eax,[edi] + cdq + cmp edx,[edi+4] + je address_size_ok + cmp [error_line],0 + jne address_size_ok + call recoverable_overflow + address_size_ok: + xor ebx,ebx + xor ecx,ecx + mov cl,[value_type] + shl ecx,16 + mov ch,[address_size] + cmp word [edi+8],0 + je check_immediate_address + mov al,[edi+8] + mov dl,[edi+10] + call get_address_register + mov al,[edi+9] + mov dl,[edi+11] + call get_address_register + mov ax,bx + shr ah,4 + shr al,4 + cmp ah,0Ch + je check_vsib_address + cmp ah,0Dh + je check_vsib_address + cmp al,0Ch + je check_vsib_address + cmp al,0Dh + je check_vsib_address + or bh,bh + jz check_address_registers + or bl,bl + jz check_address_registers + cmp al,ah + jne invalid_address + check_address_registers: + or al,ah + mov ah,[address_size] + and ah,0Fh + jz address_registers_sizes_ok + cmp al,ah + jne address_sizes_do_not_match + address_registers_sizes_ok: + cmp al,4 + je sib_allowed + cmp al,8 + je sib_allowed + cmp al,0Fh + je check_ip_relative_address + cmp cl,1 + ja invalid_address + cmp [free_address_range],0 + jne check_qword_value + jmp check_word_value + address_sizes_do_not_match: + cmp al,0Fh + jne invalid_address + mov al,bh + and al,0Fh + cmp al,ah + jne invalid_address + check_ip_relative_address: + or bl,bl + jnz invalid_address + cmp bh,0F8h + je check_rip_relative_address + cmp bh,0F4h + jne invalid_address + cmp [free_address_range],0 + jne check_qword_value + jmp check_dword_value + check_rip_relative_address: + mov eax,[edi] + cdq + cmp edx,[edi+4] + jne range_exceeded + cmp dl,[edi+13] + jne range_exceeded + ret + get_address_register: + or al,al + jz address_register_ok + cmp dl,1 + jne scaled_register + or bh,bh + jnz scaled_register + mov bh,al + address_register_ok: + ret + scaled_register: + or bl,bl + jnz invalid_address + mov bl,al + mov cl,dl + jmp address_register_ok + sib_allowed: + or bh,bh + jnz check_index_with_base + cmp cl,3 + je special_index_scale + cmp cl,5 + je special_index_scale + cmp cl,9 + je special_index_scale + cmp cl,2 + jne check_index_scale + cmp bl,45h + jne special_index_scale + cmp [code_type],64 + je special_index_scale + cmp [segment_register],4 + jne special_index_scale + cmp [value_type],0 + jne check_index_scale + mov al,[edi] + cbw + cwde + cmp eax,[edi] + jne check_index_scale + cdq + cmp edx,[edi+4] + jne check_immediate_address + special_index_scale: + mov bh,bl + dec cl + check_immediate_address: + cmp [free_address_range],0 + jne check_qword_value + mov al,[address_size] + and al,0Fh + cmp al,2 + je check_word_value + cmp al,4 + je check_dword_value + cmp al,8 + je check_qword_value + or al,al + jnz invalid_value + cmp [code_type],64 + jne check_dword_value + jmp check_qword_value + check_index_with_base: + cmp cl,1 + jne check_index_scale + cmp bl,44h + je swap_base_with_index + cmp bl,84h + je swap_base_with_index + cmp [code_type],64 + je check_for_rbp_base + cmp bl,45h + jne check_for_ebp_base + cmp [segment_register],3 + je swap_base_with_index + jmp check_immediate_address + check_for_ebp_base: + cmp bh,45h + jne check_immediate_address + cmp [segment_register],4 + jne check_immediate_address + swap_base_with_index: + xchg bl,bh + jmp check_immediate_address + check_for_rbp_base: + cmp bh,45h + je swap_base_with_index + cmp bh,85h + je swap_base_with_index + jmp check_immediate_address + check_index_scale: + test cl,not 1111b + jnz invalid_address + mov al,cl + dec al + and al,cl + jz check_immediate_address + jmp invalid_address + check_vsib_address: + cmp ah,0Ch + je swap_vsib_registers + cmp ah,0Dh + jne check_vsib_base + swap_vsib_registers: + cmp cl,1 + ja invalid_address + xchg bl,bh + mov cl,1 + check_vsib_base: + test bh,bh + jz vsib_base_ok + mov al,bh + shr al,4 + cmp al,4 + je vsib_base_ok + cmp [code_type],64 + jne invalid_address + cmp al,8 + jne invalid_address + vsib_base_ok: + mov al,bl + shr al,4 + cmp al,0Ch + je check_index_scale + cmp al,0Dh + je check_index_scale + jmp invalid_address + +calculate_relative_offset: + cmp [value_undefined],0 + jne relative_offset_ok + test bh,bh + setne ch + cmp bx,[ds:ebp+10h] + je origin_registers_ok + xchg bh,bl + xchg ch,cl + cmp bx,[ds:ebp+10h] + jne invalid_value + origin_registers_ok: + cmp cx,[ds:ebp+10h+2] + jne invalid_value + mov bl,[address_sign] + add eax,[ds:ebp] + adc edx,[ds:ebp+4] + adc bl,[ds:ebp+8] + sub eax,edi + sbb edx,0 + sbb bl,0 + mov [value_sign],bl + mov bl,[value_type] + mov ecx,[address_symbol] + mov [symbol_identifier],ecx + test bl,1 + jnz relative_offset_unallowed + cmp bl,6 + je plt_relative_offset + mov bh,[ds:ebp+9] + cmp bl,bh + je set_relative_offset_type + cmp bx,0402h + je set_relative_offset_type + relative_offset_unallowed: + call recoverable_misuse + set_relative_offset_type: + cmp [value_type],0 + je relative_offset_ok + mov [value_type],0 + cmp ecx,[ds:ebp+14h] + je relative_offset_ok + mov [value_type],3 + relative_offset_ok: + ret + plt_relative_offset: + mov [value_type],7 + cmp byte [ds:ebp+9],2 + je relative_offset_ok + cmp byte [ds:ebp+9],4 + jne recoverable_misuse + ret + +calculate_logical_expression: + xor al,al + calculate_embedded_logical_expression: + mov [logical_value_wrapping],al + call get_logical_value + logical_loop: + cmp byte [esi],'|' + je logical_or + cmp byte [esi],'&' + je logical_and + ret + logical_or: + inc esi + or al,al + jnz logical_value_already_determined + push eax + call get_logical_value + pop ebx + or al,bl + jmp logical_loop + logical_and: + inc esi + or al,al + jz logical_value_already_determined + push eax + call get_logical_value + pop ebx + and al,bl + jmp logical_loop + logical_value_already_determined: + push eax + call skip_logical_value + jc invalid_expression + pop eax + jmp logical_loop + get_value_for_comparison: + mov [value_size],8 + mov [size_override],-1 + lods byte [esi] + call calculate_expression + cmp byte [edi+8],0 + jne first_register_size_ok + mov byte [edi+10],0 + first_register_size_ok: + cmp byte [edi+9],0 + jne second_register_size_ok + mov byte [edi+11],0 + second_register_size_ok: + mov eax,[edi+16] + mov [symbol_identifier],eax + mov al,[edi+13] + mov [value_sign],al + mov bl,[edi+12] + mov eax,[edi] + mov edx,[edi+4] + mov ecx,[edi+8] + ret + get_logical_value: + xor al,al + check_for_negation: + cmp byte [esi],'~' + jne negation_ok + inc esi + xor al,-1 + jmp check_for_negation + negation_ok: + push eax + mov al,[esi] + cmp al,'{' + je logical_expression + cmp al,0FFh + je invalid_expression + cmp al,88h + je check_for_defined + cmp al,89h + je check_for_used + cmp al,'0' + je given_false + cmp al,'1' + je given_true + cmp al,'(' + jne invalid_value + call get_value_for_comparison + mov bh,[value_sign] + push eax edx [symbol_identifier] ebx ecx + mov al,[esi] + or al,al + jz logical_number + cmp al,0Fh + je logical_number + cmp al,'}' + je logical_number + cmp al,'&' + je logical_number + cmp al,'|' + je logical_number + inc esi + mov [compare_type],al + cmp byte [esi],'(' + jne invalid_value + call get_value_for_comparison + cmp bl,[esp+4] + jne values_not_relative + or bl,bl + jz check_values_registers + mov ebx,[symbol_identifier] + cmp ebx,[esp+8] + jne values_not_relative + check_values_registers: + cmp ecx,[esp] + je values_relative + ror ecx,16 + xchg ch,cl + ror ecx,16 + xchg ch,cl + cmp ecx,[esp] + je values_relative + values_not_relative: + cmp [compare_type],0F8h + jne invalid_comparison + add esp,12+8 + jmp return_false + invalid_comparison: + call recoverable_misuse + values_relative: + pop ebx + shl ebx,16 + mov bx,[esp] + add esp,8 + pop ecx ebp + cmp [compare_type],'=' + je check_equal + cmp [compare_type],0F1h + je check_not_equal + cmp [compare_type],0F8h + je return_true + test ebx,0FFFF0000h + jz check_less_or_greater + call recoverable_misuse + check_less_or_greater: + cmp [compare_type],'>' + je check_greater + cmp [compare_type],'<' + je check_less + cmp [compare_type],0F2h + je check_not_less + cmp [compare_type],0F3h + je check_not_greater + jmp invalid_expression + check_equal: + cmp bh,[value_sign] + jne return_false + cmp eax,ebp + jne return_false + cmp edx,ecx + jne return_false + jmp return_true + check_greater: + cmp bh,[value_sign] + jg return_true + jl return_false + cmp edx,ecx + jb return_true + ja return_false + cmp eax,ebp + jb return_true + jae return_false + check_less: + cmp bh,[value_sign] + jg return_false + jl return_true + cmp edx,ecx + jb return_false + ja return_true + cmp eax,ebp + jbe return_false + ja return_true + check_not_less: + cmp bh,[value_sign] + jg return_true + jl return_false + cmp edx,ecx + jb return_true + ja return_false + cmp eax,ebp + jbe return_true + ja return_false + check_not_greater: + cmp bh,[value_sign] + jg return_false + jl return_true + cmp edx,ecx + jb return_false + ja return_true + cmp eax,ebp + jb return_false + jae return_true + check_not_equal: + cmp bh,[value_sign] + jne return_true + cmp eax,ebp + jne return_true + cmp edx,ecx + jne return_true + jmp return_false + logical_number: + pop ecx ebx eax edx eax + or bl,bl + jnz invalid_logical_number + or cx,cx + jz logical_number_ok + invalid_logical_number: + call recoverable_misuse + logical_number_ok: + test bh,bh + jnz return_true + or eax,edx + jnz return_true + jmp return_false + check_for_defined: + or bl,-1 + lods word [esi] + cmp ah,'(' + jne invalid_expression + check_expression: + lods byte [esi] + or al,al + jz defined_string + cmp al,'.' + je defined_fp_value + cmp al,')' + je expression_checked + cmp al,'!' + je invalid_expression + cmp al,0Fh + je check_expression + cmp al,10h + je defined_register + cmp al,11h + je check_if_symbol_defined + cmp al,80h + jae check_expression + movzx eax,al + add esi,eax + jmp check_expression + defined_register: + inc esi + jmp check_expression + defined_fp_value: + add esi,12 + jmp expression_checked + defined_string: + lods dword [esi] + add esi,eax + inc esi + jmp expression_checked + check_if_symbol_defined: + lods dword [esi] + cmp eax,-1 + je invalid_expression + cmp eax,0Fh + jb check_expression + je reserved_word_used_as_symbol + test byte [eax+8],4 + jnz no_prediction + test byte [eax+8],1 + jz symbol_predicted_undefined + mov cx,[current_pass] + sub cx,[eax+16] + jz check_expression + cmp cx,1 + ja symbol_predicted_undefined + or byte [eax+8],40h+80h + jmp check_expression + no_prediction: + test byte [eax+8],1 + jz symbol_undefined + mov cx,[current_pass] + sub cx,[eax+16] + jz check_expression + jmp symbol_undefined + symbol_predicted_undefined: + or byte [eax+8],40h + and byte [eax+8],not 80h + symbol_undefined: + xor bl,bl + jmp check_expression + expression_checked: + mov al,bl + jmp logical_value_ok + check_for_used: + lods word [esi] + cmp ah,2 + jne invalid_expression + lods dword [esi] + cmp eax,0Fh + jb invalid_use_of_symbol + je reserved_word_used_as_symbol + inc esi + test byte [eax+8],8 + jz not_used + mov cx,[current_pass] + sub cx,[eax+18] + jz return_true + cmp cx,1 + ja not_used + or byte [eax+8],10h+20h + jmp return_true + not_used: + or byte [eax+8],10h + and byte [eax+8],not 20h + jmp return_false + given_false: + inc esi + return_false: + xor al,al + jmp logical_value_ok + given_true: + inc esi + return_true: + or al,-1 + jmp logical_value_ok + logical_expression: + lods byte [esi] + mov dl,[logical_value_wrapping] + push edx + call calculate_embedded_logical_expression + pop edx + mov [logical_value_wrapping],dl + push eax + lods byte [esi] + cmp al,'}' + jne invalid_expression + pop eax + logical_value_ok: + pop ebx + xor al,bl + ret + +skip_symbol: + lods byte [esi] + or al,al + jz nothing_to_skip + cmp al,0Fh + je nothing_to_skip + cmp al,1 + je skip_instruction + cmp al,2 + je skip_label + cmp al,3 + je skip_label + cmp al,4 + je skip_special_label + cmp al,20h + jb skip_assembler_symbol + cmp al,'(' + je skip_expression + cmp al,'[' + je skip_address + skip_done: + clc + ret + skip_label: + add esi,2 + skip_instruction: + add esi,2 + skip_assembler_symbol: + inc esi + jmp skip_done + skip_special_label: + add esi,4 + jmp skip_done + skip_address: + mov al,[esi] + and al,11110000b + cmp al,60h + jb skip_expression + cmp al,70h + ja skip_expression + inc esi + jmp skip_address + skip_expression: + lods byte [esi] + or al,al + jz skip_string + cmp al,'.' + je skip_fp_value + cmp al,')' + je skip_done + cmp al,']' + je skip_done + cmp al,'!' + je skip_expression + cmp al,0Fh + je skip_expression + cmp al,10h + je skip_register + cmp al,11h + je skip_label_value + cmp al,80h + jae skip_expression + movzx eax,al + add esi,eax + jmp skip_expression + skip_label_value: + add esi,3 + skip_register: + inc esi + jmp skip_expression + skip_fp_value: + add esi,12 + jmp skip_done + skip_string: + lods dword [esi] + add esi,eax + inc esi + jmp skip_done + nothing_to_skip: + dec esi + stc + ret + +expand_path: + lods byte [esi] + cmp al,'%' + je environment_variable + stos byte [edi] + or al,al + jnz expand_path + cmp edi,[memory_end] + ja out_of_memory + ret + environment_variable: + mov ebx,esi + find_variable_end: + lods byte [esi] + or al,al + jz not_environment_variable + cmp al,'%' + jne find_variable_end + mov byte [esi-1],0 + push esi + mov esi,ebx + call get_environment_variable + pop esi + mov byte [esi-1],'%' + jmp expand_path + not_environment_variable: + mov al,'%' + stos byte [edi] + mov esi,ebx + jmp expand_path +get_include_directory: + lods byte [esi] + cmp al,';' + je include_directory_ok + stos byte [edi] + or al,al + jnz get_include_directory + dec esi + dec edi + include_directory_ok: + cmp byte [edi-1],'/' + je path_separator_ok + cmp byte [edi-1],'\' + je path_separator_ok + mov al,'/' + stos byte [edi] + path_separator_ok: + ret diff --git a/programs/develop/fasm/trunk/exprpars.inc b/programs/develop/fasm/trunk/exprpars.inc index 1c45a1f26..892e8e043 100644 --- a/programs/develop/fasm/trunk/exprpars.inc +++ b/programs/develop/fasm/trunk/exprpars.inc @@ -1,1266 +1,1266 @@ - -; flat assembler core -; Copyright (c) 1999-2012, Tomasz Grysztar. -; All rights reserved. - -convert_expression: - push ebp - call get_fp_value - jnc fp_expression - mov [current_offset],esp - expression_loop: - push edi - mov edi,single_operand_operators - call get_operator - pop edi - or al,al - jz expression_element - cmp al,82h - je expression_loop - push eax - jmp expression_loop - expression_element: - mov al,[esi] - cmp al,1Ah - je expression_number - cmp al,22h - je expression_number - cmp al,'(' - je expression_number - mov al,'!' - stos byte [edi] - jmp expression_operator - expression_number: - call convert_number - expression_operator: - push edi - mov edi,operators - call get_operator - pop edi - or al,al - jz expression_end - operators_loop: - cmp esp,[current_offset] - je push_operator - mov bl,al - and bl,0F0h - mov bh,byte [esp] - and bh,0F0h - cmp bl,bh - ja push_operator - pop ebx - mov byte [edi],bl - inc edi - jmp operators_loop - push_operator: - push eax - jmp expression_loop - expression_end: - cmp esp,[current_offset] - je expression_converted - pop eax - stos byte [edi] - jmp expression_end - expression_converted: - pop ebp - ret - fp_expression: - mov al,'.' - stos byte [edi] - mov eax,[fp_value] - stos dword [edi] - mov eax,[fp_value+4] - stos dword [edi] - mov eax,[fp_value+8] - stos dword [edi] - pop ebp - ret - -convert_number: - lea eax,[edi-10h] - mov edx,[memory_end] - cmp [source_start],0 - je check_memory_for_number - mov edx,[labels_list] - check_memory_for_number: - cmp eax,edx - jae out_of_memory - mov eax,esp - sub eax,100h - jc stack_overflow - cmp eax,[stack_limit] - jb stack_overflow - cmp byte [esi],'(' - je expression_value - inc edi - call get_number - jc symbol_value - or ebp,ebp - jz valid_number - mov byte [edi-1],0Fh - ret - valid_number: - cmp dword [edi+4],0 - jne qword_number - cmp word [edi+2],0 - jne dword_number - cmp byte [edi+1],0 - jne word_number - byte_number: - mov byte [edi-1],1 - inc edi - ret - qword_number: - mov byte [edi-1],8 - add edi,8 - ret - dword_number: - mov byte [edi-1],4 - scas dword [edi] - ret - word_number: - mov byte [edi-1],2 - scas word [edi] - ret - expression_value: - inc esi - push [current_offset] - call convert_expression - pop [current_offset] - lods byte [esi] - cmp al,')' - jne invalid_expression - ret - symbol_value: - cmp [source_start],0 - je preprocessor_value - push edi esi - lods word [esi] - cmp al,1Ah - jne no_address_register - movzx ecx,ah - call get_symbol - jc no_address_register - cmp al,10h - jne no_address_register - mov al,ah - shr ah,4 - cmp ah,4 - je register_value - cmp ah,8 - je register_value - cmp ah,0Ch - je register_value - cmp ah,0Dh - je register_value - cmp ah,0Fh - je register_value - cmp ah,2 - jne no_address_register - cmp al,23h - je register_value - cmp al,25h - je register_value - cmp al,26h - je register_value - cmp al,27h - je register_value - no_address_register: - pop esi - mov edi,directive_operators - call get_operator - pop edi - or al,al - jnz broken_value - lods byte [esi] - cmp al,1Ah - jne invalid_value - lods byte [esi] - movzx ecx,al - call get_label_id - store_label_value: - mov byte [edi-1],11h - stos dword [edi] - ret - broken_value: - mov eax,0Fh - jmp store_label_value - register_value: - pop edx edi - mov byte [edi-1],10h - stos byte [edi] - ret - preprocessor_value: - dec edi - cmp [hash_tree],0 - je invalid_value - lods byte [esi] - cmp al,1Ah - jne invalid_value - lods byte [esi] - mov cl,al - mov ch,10b - call get_preprocessor_symbol - jc invalid_value - push esi - mov esi,[edx+8] - push [current_offset] - call convert_expression - pop [current_offset] - pop esi - ret - -get_number: - xor ebp,ebp - lods byte [esi] - cmp al,22h - je get_text_number - cmp al,1Ah - jne not_number - lods byte [esi] - movzx ecx,al - mov [number_start],esi - mov al,[esi] - cmp al,'$' - je number_begin - sub al,30h - cmp al,9 - ja invalid_number - number_begin: - mov ebx,esi - add esi,ecx - push esi - dec esi - mov dword [edi],0 - mov dword [edi+4],0 - cmp byte [ebx],'$' - je pascal_hex_number - cmp word [ebx],'0x' - je get_hex_number - mov al,[esi] - dec esi - cmp al,'h' - je get_hex_number - cmp al,'b' - je get_bin_number - cmp al,'d' - je get_dec_number - cmp al,'o' - je get_oct_number - cmp al,'H' - je get_hex_number - cmp al,'B' - je get_bin_number - cmp al,'D' - je get_dec_number - cmp al,'O' - je get_oct_number - inc esi - get_dec_number: - mov ebx,esi - mov esi,[number_start] - get_dec_digit: - cmp esi,ebx - ja number_ok - cmp byte [esi],27h - je next_dec_digit - xor edx,edx - mov eax,[edi] - shld edx,eax,2 - shl eax,2 - add eax,[edi] - adc edx,0 - add eax,eax - adc edx,edx - mov [edi],eax - mov eax,[edi+4] - add eax,eax - jc dec_out_of_range - add eax,eax - jc dec_out_of_range - add eax,[edi+4] - jc dec_out_of_range - add eax,eax - jc dec_out_of_range - add eax,edx - jc dec_out_of_range - mov [edi+4],eax - movzx eax,byte [esi] - sub al,30h - jc bad_number - cmp al,9 - ja bad_number - add [edi],eax - adc dword [edi+4],0 - jc dec_out_of_range - next_dec_digit: - inc esi - jmp get_dec_digit - dec_out_of_range: - cmp esi,ebx - ja dec_out_of_range_finished - lods byte [esi] - cmp al,27h - je bad_number - sub al,30h - jc bad_number - cmp al,9 - ja bad_number - jmp dec_out_of_range - dec_out_of_range_finished: - or ebp,-1 - jmp number_ok - bad_number: - pop eax - invalid_number: - mov esi,[number_start] - dec esi - not_number: - dec esi - stc - ret - get_bin_number: - xor bl,bl - get_bin_digit: - cmp esi,[number_start] - jb number_ok - movzx eax,byte [esi] - cmp al,27h - je bin_digit_skip - sub al,30h - cmp al,1 - ja bad_number - xor edx,edx - mov cl,bl - dec esi - cmp bl,64 - je bin_out_of_range - inc bl - cmp cl,32 - jae bin_digit_high - shl eax,cl - or dword [edi],eax - jmp get_bin_digit - bin_digit_high: - sub cl,32 - shl eax,cl - or dword [edi+4],eax - jmp get_bin_digit - bin_out_of_range: - or al,al - jz get_bin_digit - or ebp,-1 - jmp get_bin_digit - bin_digit_skip: - dec esi - jmp get_bin_digit - pascal_hex_number: - cmp cl,1 - je bad_number - get_hex_number: - xor bl,bl - get_hex_digit: - cmp esi,[number_start] - jb number_ok - movzx eax,byte [esi] - cmp al,27h - je hex_digit_skip - cmp al,'x' - je hex_number_ok - cmp al,'$' - je pascal_hex_ok - sub al,30h - cmp al,9 - jbe hex_digit_ok - sub al,7 - cmp al,15 - jbe hex_letter_digit_ok - sub al,20h - cmp al,15 - ja bad_number - hex_letter_digit_ok: - cmp al,10 - jb bad_number - hex_digit_ok: - xor edx,edx - mov cl,bl - dec esi - cmp bl,64 - je hex_out_of_range - add bl,4 - cmp cl,32 - jae hex_digit_high - shl eax,cl - or dword [edi],eax - jmp get_hex_digit - hex_digit_high: - sub cl,32 - shl eax,cl - or dword [edi+4],eax - jmp get_hex_digit - hex_out_of_range: - or al,al - jz get_hex_digit - or ebp,-1 - jmp get_hex_digit - hex_digit_skip: - dec esi - jmp get_hex_digit - get_oct_number: - xor bl,bl - get_oct_digit: - cmp esi,[number_start] - jb number_ok - movzx eax,byte [esi] - cmp al,27h - je oct_digit_skip - sub al,30h - cmp al,7 - ja bad_number - oct_digit_ok: - xor edx,edx - mov cl,bl - dec esi - cmp bl,63 - ja oct_out_of_range - jne oct_range_ok - cmp al,1 - ja oct_out_of_range - oct_range_ok: - add bl,3 - cmp cl,30 - je oct_digit_wrap - ja oct_digit_high - shl eax,cl - or dword [edi],eax - jmp get_oct_digit - oct_digit_wrap: - shl eax,cl - adc dword [edi+4],0 - or dword [edi],eax - jmp get_oct_digit - oct_digit_high: - sub cl,32 - shl eax,cl - or dword [edi+4],eax - jmp get_oct_digit - oct_digit_skip: - dec esi - jmp get_oct_digit - oct_out_of_range: - or al,al - jz get_oct_digit - or ebp,-1 - jmp get_oct_digit - hex_number_ok: - dec esi - pascal_hex_ok: - cmp esi,[number_start] - jne bad_number - number_ok: - pop esi - number_done: - clc - ret - get_text_number: - lods dword [esi] - mov edx,eax - xor bl,bl - mov dword [edi],0 - mov dword [edi+4],0 - get_text_character: - sub edx,1 - jc number_done - movzx eax,byte [esi] - inc esi - mov cl,bl - cmp bl,64 - je text_out_of_range - add bl,8 - cmp cl,32 - jae text_character_high - shl eax,cl - or dword [edi],eax - jmp get_text_character - text_character_high: - sub cl,32 - shl eax,cl - or dword [edi+4],eax - jmp get_text_character - text_out_of_range: - or ebp,-1 - jmp get_text_character - -get_fp_value: - push edi esi - lods byte [esi] - cmp al,1Ah - je fp_value_start - cmp al,'-' - je fp_sign_ok - cmp al,'+' - jne not_fp_value - fp_sign_ok: - lods byte [esi] - cmp al,1Ah - jne not_fp_value - fp_value_start: - lods byte [esi] - movzx ecx,al - cmp cl,1 - jbe not_fp_value - lea edx,[esi+1] - xor ah,ah - check_fp_value: - lods byte [esi] - cmp al,'.' - je fp_character_dot - cmp al,'E' - je fp_character_exp - cmp al,'e' - je fp_character_exp - cmp al,'F' - je fp_last_character - cmp al,'f' - je fp_last_character - digit_expected: - cmp al,'0' - jb not_fp_value - cmp al,'9' - ja not_fp_value - jmp fp_character_ok - fp_character_dot: - cmp esi,edx - je not_fp_value - or ah,ah - jnz not_fp_value - or ah,1 - lods byte [esi] - loop digit_expected - not_fp_value: - pop esi edi - stc - ret - fp_last_character: - cmp cl,1 - jne not_fp_value - or ah,4 - jmp fp_character_ok - fp_character_exp: - cmp esi,edx - je not_fp_value - cmp ah,1 - ja not_fp_value - or ah,2 - cmp ecx,1 - jne fp_character_ok - cmp byte [esi],'+' - je fp_exp_sign - cmp byte [esi],'-' - jne fp_character_ok - fp_exp_sign: - inc esi - cmp byte [esi],1Ah - jne not_fp_value - inc esi - lods byte [esi] - movzx ecx,al - inc ecx - fp_character_ok: - dec ecx - jnz check_fp_value - or ah,ah - jz not_fp_value - pop esi - lods byte [esi] - mov [fp_sign],0 - cmp al,1Ah - je fp_get - inc esi - cmp al,'+' - je fp_get - mov [fp_sign],1 - fp_get: - lods byte [esi] - movzx ecx,al - xor edx,edx - mov edi,fp_value - mov [edi],edx - mov [edi+4],edx - mov [edi+12],edx - call fp_optimize - mov [fp_format],0 - mov al,[esi] - fp_before_dot: - lods byte [esi] - cmp al,'.' - je fp_dot - cmp al,'E' - je fp_exponent - cmp al,'e' - je fp_exponent - cmp al,'F' - je fp_done - cmp al,'f' - je fp_done - sub al,30h - mov edi,fp_value+16 - xor edx,edx - mov dword [edi+12],edx - mov dword [edi],edx - mov dword [edi+4],edx - mov [edi+7],al - mov dl,7 - mov dword [edi+8],edx - call fp_optimize - mov edi,fp_value - push ecx - mov ecx,10 - call fp_mul - pop ecx - mov ebx,fp_value+16 - call fp_add - loop fp_before_dot - fp_dot: - mov edi,fp_value+16 - xor edx,edx - mov [edi],edx - mov [edi+4],edx - mov byte [edi+7],80h - mov [edi+8],edx - mov dword [edi+12],edx - dec ecx - jz fp_done - fp_after_dot: - lods byte [esi] - cmp al,'E' - je fp_exponent - cmp al,'e' - je fp_exponent - cmp al,'F' - je fp_done - cmp al,'f' - je fp_done - inc [fp_format] - cmp [fp_format],80h - jne fp_counter_ok - mov [fp_format],7Fh - fp_counter_ok: - dec esi - mov edi,fp_value+16 - push ecx - mov ecx,10 - call fp_div - push dword [edi] - push dword [edi+4] - push dword [edi+8] - push dword [edi+12] - lods byte [esi] - sub al,30h - movzx ecx,al - call fp_mul - mov ebx,edi - mov edi,fp_value - call fp_add - mov edi,fp_value+16 - pop dword [edi+12] - pop dword [edi+8] - pop dword [edi+4] - pop dword [edi] - pop ecx - dec ecx - jnz fp_after_dot - jmp fp_done - fp_exponent: - or [fp_format],80h - xor edx,edx - xor ebp,ebp - dec ecx - jnz get_exponent - cmp byte [esi],'+' - je fp_exponent_sign - cmp byte [esi],'-' - jne fp_done - not ebp - fp_exponent_sign: - add esi,2 - lods byte [esi] - movzx ecx,al - get_exponent: - movzx eax,byte [esi] - inc esi - sub al,30h - cmp al,10 - jae exponent_ok - imul edx,10 - cmp edx,8000h - jae value_out_of_range - add edx,eax - loop get_exponent - exponent_ok: - mov edi,fp_value - or edx,edx - jz fp_done - mov ecx,edx - or ebp,ebp - jnz fp_negative_power - fp_power: - push ecx - mov ecx,10 - call fp_mul - pop ecx - loop fp_power - jmp fp_done - fp_negative_power: - push ecx - mov ecx,10 - call fp_div - pop ecx - loop fp_negative_power - fp_done: - mov edi,fp_value - mov al,[fp_format] - mov [edi+10],al - mov al,[fp_sign] - mov [edi+11],al - test byte [edi+15],80h - jz fp_ok - add dword [edi],1 - adc dword [edi+4],0 - jnc fp_ok - mov eax,[edi+4] - shrd [edi],eax,1 - shr eax,1 - or eax,80000000h - mov [edi+4],eax - inc word [edi+8] - fp_ok: - pop edi - clc - ret - fp_mul: - or ecx,ecx - jz fp_zero - mov eax,[edi+12] - mul ecx - mov [edi+12],eax - mov ebx,edx - mov eax,[edi] - mul ecx - add eax,ebx - adc edx,0 - mov [edi],eax - mov ebx,edx - mov eax,[edi+4] - mul ecx - add eax,ebx - adc edx,0 - mov [edi+4],eax - .loop: - or edx,edx - jz .done - mov eax,[edi] - shrd [edi+12],eax,1 - mov eax,[edi+4] - shrd [edi],eax,1 - shrd eax,edx,1 - mov [edi+4],eax - shr edx,1 - inc dword [edi+8] - cmp dword [edi+8],8000h - jge value_out_of_range - jmp .loop - .done: - ret - fp_div: - mov eax,[edi+4] - xor edx,edx - div ecx - mov [edi+4],eax - mov eax,[edi] - div ecx - mov [edi],eax - mov eax,[edi+12] - div ecx - mov [edi+12],eax - mov ebx,eax - or ebx,[edi] - or ebx,[edi+4] - jz fp_zero - .loop: - test byte [edi+7],80h - jnz .exp_ok - mov eax,[edi] - shld [edi+4],eax,1 - mov eax,[edi+12] - shld [edi],eax,1 - add eax,eax - mov [edi+12],eax - dec dword [edi+8] - add edx,edx - jmp .loop - .exp_ok: - mov eax,edx - xor edx,edx - div ecx - add [edi+12],eax - adc dword [edi],0 - adc dword [edi+4],0 - jnc .done - mov eax,[edi+4] - mov ebx,[edi] - shrd [edi],eax,1 - shrd [edi+12],ebx,1 - shr eax,1 - or eax,80000000h - mov [edi+4],eax - inc dword [edi+8] - .done: - ret - fp_add: - cmp dword [ebx+8],8000h - je .done - cmp dword [edi+8],8000h - je .copy - mov eax,[ebx+8] - cmp eax,[edi+8] - jge .exp_ok - mov eax,[edi+8] - .exp_ok: - call .change_exp - xchg ebx,edi - call .change_exp - xchg ebx,edi - mov edx,[ebx+12] - mov eax,[ebx] - mov ebx,[ebx+4] - add [edi+12],edx - adc [edi],eax - adc [edi+4],ebx - jnc .done - mov eax,[edi] - shrd [edi+12],eax,1 - mov eax,[edi+4] - shrd [edi],eax,1 - shr eax,1 - or eax,80000000h - mov [edi+4],eax - inc dword [edi+8] - .done: - ret - .copy: - mov eax,[ebx] - mov [edi],eax - mov eax,[ebx+4] - mov [edi+4],eax - mov eax,[ebx+8] - mov [edi+8],eax - mov eax,[ebx+12] - mov [edi+12],eax - ret - .change_exp: - push ecx - mov ecx,eax - sub ecx,[ebx+8] - mov edx,[ebx+4] - jecxz .exp_done - .exp_loop: - mov ebp,[ebx] - shrd [ebx+12],ebp,1 - shrd [ebx],edx,1 - shr edx,1 - inc dword [ebx+8] - loop .exp_loop - .exp_done: - mov [ebx+4],edx - pop ecx - ret - fp_optimize: - mov eax,[edi] - mov ebp,[edi+4] - or ebp,[edi] - or ebp,[edi+12] - jz fp_zero - .loop: - test byte [edi+7],80h - jnz .done - shld [edi+4],eax,1 - mov ebp,[edi+12] - shld eax,ebp,1 - mov [edi],eax - shl dword [edi+12],1 - dec dword [edi+8] - jmp .loop - .done: - ret - fp_zero: - mov dword [edi+8],8000h - ret - -preevaluate_logical_expression: - xor al,al - preevaluate_embedded_logical_expression: - mov [logical_value_wrapping],al - push edi - call preevaluate_logical_value - preevaluation_loop: - cmp al,0FFh - je invalid_logical_expression - mov dl,[esi] - inc esi - cmp dl,'|' - je preevaluate_or - cmp dl,'&' - je preevaluate_and - cmp dl,'}' - je preevaluation_done - or dl,dl - jnz invalid_logical_expression - preevaluation_done: - pop edx - dec esi - ret - preevaluate_or: - cmp al,'1' - je quick_true - cmp al,'0' - je leave_only_following - push edi - mov al,dl - stos byte [edi] - call preevaluate_logical_value - pop ebx - cmp al,'0' - je leave_only_preceding - cmp al,'1' - jne preevaluation_loop - stos byte [edi] - xor al,al - jmp preevaluation_loop - preevaluate_and: - cmp al,'0' - je quick_false - cmp al,'1' - je leave_only_following - push edi - mov al,dl - stos byte [edi] - call preevaluate_logical_value - pop ebx - cmp al,'1' - je leave_only_preceding - cmp al,'0' - jne preevaluation_loop - stos byte [edi] - xor al,al - jmp preevaluation_loop - leave_only_following: - mov edi,[esp] - call preevaluate_logical_value - jmp preevaluation_loop - leave_only_preceding: - mov edi,ebx - xor al,al - jmp preevaluation_loop - quick_true: - call skip_logical_value - jc invalid_logical_expression - mov edi,[esp] - mov al,'1' - jmp preevaluation_loop - quick_false: - call skip_logical_value - jc invalid_logical_expression - mov edi,[esp] - mov al,'0' - jmp preevaluation_loop - invalid_logical_expression: - pop edi - mov esi,edi - mov al,0FFh - stos byte [edi] - ret - skip_logical_value: - cmp byte [esi],'~' - jne negation_skipped - inc esi - jmp skip_logical_value - negation_skipped: - mov al,[esi] - cmp al,'{' - jne skip_simple_logical_value - inc esi - xchg al,[logical_value_wrapping] - push eax - skip_logical_expression: - call skip_logical_value - lods byte [esi] - or al,al - jz wrongly_structured_logical_expression - cmp al,0Fh - je wrongly_structured_logical_expression - cmp al,'|' - je skip_logical_expression - cmp al,'&' - je skip_logical_expression - cmp al,'}' - jne wrongly_structured_logical_expression - pop eax - mov [logical_value_wrapping],al - logical_value_skipped: - clc - ret - wrongly_structured_logical_expression: - pop eax - stc - ret - skip_simple_logical_value: - mov [logical_value_parentheses],0 - find_simple_logical_value_end: - mov al,[esi] - or al,al - jz logical_value_skipped - cmp al,0Fh - je logical_value_skipped - cmp al,'|' - je logical_value_skipped - cmp al,'&' - je logical_value_skipped - cmp al,'{' - je skip_logical_value_internal_parenthesis - cmp al,'}' - jne skip_logical_value_symbol - sub [logical_value_parentheses],1 - jnc skip_logical_value_symbol - cmp [logical_value_wrapping],'{' - jne skip_logical_value_symbol - jmp logical_value_skipped - skip_logical_value_internal_parenthesis: - inc [logical_value_parentheses] - skip_logical_value_symbol: - call skip_symbol - jmp find_simple_logical_value_end - preevaluate_logical_value: - mov ebp,edi - preevaluate_negation: - cmp byte [esi],'~' - jne preevaluate_negation_ok - movs byte [edi],[esi] - jmp preevaluate_negation - preevaluate_negation_ok: - mov ebx,esi - cmp byte [esi],'{' - jne preevaluate_simple_logical_value - lods byte [esi] - stos byte [edi] - push ebp - mov dl,[logical_value_wrapping] - push edx - call preevaluate_embedded_logical_expression - pop edx - mov [logical_value_wrapping],dl - pop ebp - cmp al,0FFh - je invalid_logical_value - cmp byte [esi],'}' - jne invalid_logical_value - or al,al - jnz preevaluated_expression_value - movs byte [edi],[esi] - ret - preevaluated_expression_value: - inc esi - lea edx,[edi-1] - sub edx,ebp - test edx,1 - jz expression_negation_ok - xor al,1 - expression_negation_ok: - mov edi,ebp - ret - invalid_logical_value: - mov edi,ebp - mov al,0FFh - ret - preevaluate_simple_logical_value: - xor edx,edx - mov [logical_value_parentheses],edx - find_logical_value_boundaries: - mov al,[esi] - or al,al - jz logical_value_boundaries_found - cmp al,'{' - je logical_value_internal_parentheses - cmp al,'}' - je logical_value_boundaries_parenthesis_close - cmp al,'|' - je logical_value_boundaries_found - cmp al,'&' - je logical_value_boundaries_found - or edx,edx - jnz next_symbol_in_logical_value - cmp al,0F0h - je preevaluable_logical_operator - cmp al,0F7h - je preevaluable_logical_operator - cmp al,0F6h - jne next_symbol_in_logical_value - preevaluable_logical_operator: - mov edx,esi - next_symbol_in_logical_value: - call skip_symbol - jmp find_logical_value_boundaries - logical_value_internal_parentheses: - inc [logical_value_parentheses] - jmp next_symbol_in_logical_value - logical_value_boundaries_parenthesis_close: - sub [logical_value_parentheses],1 - jnc next_symbol_in_logical_value - cmp [logical_value_wrapping],'{' - jne next_symbol_in_logical_value - logical_value_boundaries_found: - or edx,edx - jz non_preevaluable_logical_value - mov al,[edx] - cmp al,0F0h - je compare_symbols - cmp al,0F7h - je compare_symbol_types - cmp al,0F6h - je scan_symbols_list - non_preevaluable_logical_value: - mov ecx,esi - mov esi,ebx - sub ecx,esi - jz invalid_logical_value - cmp esi,edi - je leave_logical_value_intact - rep movs byte [edi],[esi] - xor al,al - ret - leave_logical_value_intact: - add edi,ecx - add esi,ecx - xor al,al - ret - compare_symbols: - lea ecx,[esi-1] - sub ecx,edx - mov eax,edx - sub eax,ebx - cmp ecx,eax - jne preevaluated_false - push esi edi - mov esi,ebx - lea edi,[edx+1] - repe cmps byte [esi],[edi] - pop edi esi - je preevaluated_true - preevaluated_false: - mov eax,edi - sub eax,ebp - test eax,1 - jnz store_true - store_false: - mov edi,ebp - mov al,'0' - ret - preevaluated_true: - mov eax,edi - sub eax,ebp - test eax,1 - jnz store_false - store_true: - mov edi,ebp - mov al,'1' - ret - compare_symbol_types: - push esi - lea esi,[edx+1] - type_comparison: - cmp esi,[esp] - je types_compared - mov al,[esi] - cmp al,[ebx] - jne different_type - cmp al,'(' - jne equal_type - mov al,[esi+1] - mov ah,[ebx+1] - cmp al,ah - je equal_type - or al,al - jz different_type - or ah,ah - jz different_type - cmp al,'.' - je different_type - cmp ah,'.' - je different_type - equal_type: - call skip_symbol - xchg esi,ebx - call skip_symbol - xchg esi,ebx - jmp type_comparison - types_compared: - pop esi - cmp byte [ebx],0F7h - jne preevaluated_false - jmp preevaluated_true - different_type: - pop esi - jmp preevaluated_false - scan_symbols_list: - push edi esi - lea esi,[edx+1] - sub edx,ebx - lods byte [esi] - cmp al,'<' - jne invalid_symbols_list - get_next_from_list: - mov edi,esi - get_from_list: - cmp byte [esi],',' - je compare_in_list - cmp byte [esi],'>' - je compare_in_list - cmp esi,[esp] - jae invalid_symbols_list - call skip_symbol - jmp get_from_list - compare_in_list: - mov ecx,esi - sub ecx,edi - cmp ecx,edx - jne not_equal_length_in_list - mov esi,ebx - repe cmps byte [esi],[edi] - mov esi,edi - jne not_equal_in_list - skip_rest_of_list: - cmp byte [esi],'>' - je check_list_end - cmp esi,[esp] - jae invalid_symbols_list - call skip_symbol - jmp skip_rest_of_list - check_list_end: - inc esi - cmp esi,[esp] - jne invalid_symbols_list - pop esi edi - jmp preevaluated_true - not_equal_in_list: - add esi,ecx - not_equal_length_in_list: - lods byte [esi] - cmp al,',' - je get_next_from_list - cmp esi,[esp] - jne invalid_symbols_list - pop esi edi - jmp preevaluated_false - invalid_symbols_list: - pop esi edi - jmp invalid_logical_value + +; flat assembler core +; Copyright (c) 1999-2013, Tomasz Grysztar. +; All rights reserved. + +convert_expression: + push ebp + call get_fp_value + jnc fp_expression + mov [current_offset],esp + expression_loop: + push edi + mov edi,single_operand_operators + call get_operator + pop edi + or al,al + jz expression_element + cmp al,82h + je expression_loop + push eax + jmp expression_loop + expression_element: + mov al,[esi] + cmp al,1Ah + je expression_number + cmp al,22h + je expression_number + cmp al,'(' + je expression_number + mov al,'!' + stos byte [edi] + jmp expression_operator + expression_number: + call convert_number + expression_operator: + push edi + mov edi,operators + call get_operator + pop edi + or al,al + jz expression_end + operators_loop: + cmp esp,[current_offset] + je push_operator + mov bl,al + and bl,0F0h + mov bh,byte [esp] + and bh,0F0h + cmp bl,bh + ja push_operator + pop ebx + mov byte [edi],bl + inc edi + jmp operators_loop + push_operator: + push eax + jmp expression_loop + expression_end: + cmp esp,[current_offset] + je expression_converted + pop eax + stos byte [edi] + jmp expression_end + expression_converted: + pop ebp + ret + fp_expression: + mov al,'.' + stos byte [edi] + mov eax,[fp_value] + stos dword [edi] + mov eax,[fp_value+4] + stos dword [edi] + mov eax,[fp_value+8] + stos dword [edi] + pop ebp + ret + +convert_number: + lea eax,[edi-10h] + mov edx,[memory_end] + cmp [source_start],0 + je check_memory_for_number + mov edx,[labels_list] + check_memory_for_number: + cmp eax,edx + jae out_of_memory + mov eax,esp + sub eax,100h + jc stack_overflow + cmp eax,[stack_limit] + jb stack_overflow + cmp byte [esi],'(' + je expression_value + inc edi + call get_number + jc symbol_value + or ebp,ebp + jz valid_number + mov byte [edi-1],0Fh + ret + valid_number: + cmp dword [edi+4],0 + jne qword_number + cmp word [edi+2],0 + jne dword_number + cmp byte [edi+1],0 + jne word_number + byte_number: + mov byte [edi-1],1 + inc edi + ret + qword_number: + mov byte [edi-1],8 + add edi,8 + ret + dword_number: + mov byte [edi-1],4 + scas dword [edi] + ret + word_number: + mov byte [edi-1],2 + scas word [edi] + ret + expression_value: + inc esi + push [current_offset] + call convert_expression + pop [current_offset] + lods byte [esi] + cmp al,')' + jne invalid_expression + ret + symbol_value: + cmp [source_start],0 + je preprocessor_value + push edi esi + lods word [esi] + cmp al,1Ah + jne no_address_register + movzx ecx,ah + call get_symbol + jc no_address_register + cmp al,10h + jne no_address_register + mov al,ah + shr ah,4 + cmp ah,4 + je register_value + cmp ah,8 + je register_value + cmp ah,0Ch + je register_value + cmp ah,0Dh + je register_value + cmp ah,0Fh + je register_value + cmp ah,2 + jne no_address_register + cmp al,23h + je register_value + cmp al,25h + je register_value + cmp al,26h + je register_value + cmp al,27h + je register_value + no_address_register: + pop esi + mov edi,directive_operators + call get_operator + pop edi + or al,al + jnz broken_value + lods byte [esi] + cmp al,1Ah + jne invalid_value + lods byte [esi] + movzx ecx,al + call get_label_id + store_label_value: + mov byte [edi-1],11h + stos dword [edi] + ret + broken_value: + mov eax,0Fh + jmp store_label_value + register_value: + pop edx edi + mov byte [edi-1],10h + stos byte [edi] + ret + preprocessor_value: + dec edi + cmp [hash_tree],0 + je invalid_value + lods byte [esi] + cmp al,1Ah + jne invalid_value + lods byte [esi] + mov cl,al + mov ch,10b + call get_preprocessor_symbol + jc invalid_value + push esi + mov esi,[edx+8] + push [current_offset] + call convert_expression + pop [current_offset] + pop esi + ret + +get_number: + xor ebp,ebp + lods byte [esi] + cmp al,22h + je get_text_number + cmp al,1Ah + jne not_number + lods byte [esi] + movzx ecx,al + mov [number_start],esi + mov al,[esi] + cmp al,'$' + je number_begin + sub al,30h + cmp al,9 + ja invalid_number + number_begin: + mov ebx,esi + add esi,ecx + push esi + dec esi + mov dword [edi],0 + mov dword [edi+4],0 + cmp byte [ebx],'$' + je pascal_hex_number + cmp word [ebx],'0x' + je get_hex_number + mov al,[esi] + dec esi + cmp al,'h' + je get_hex_number + cmp al,'b' + je get_bin_number + cmp al,'d' + je get_dec_number + cmp al,'o' + je get_oct_number + cmp al,'H' + je get_hex_number + cmp al,'B' + je get_bin_number + cmp al,'D' + je get_dec_number + cmp al,'O' + je get_oct_number + inc esi + get_dec_number: + mov ebx,esi + mov esi,[number_start] + get_dec_digit: + cmp esi,ebx + ja number_ok + cmp byte [esi],27h + je next_dec_digit + xor edx,edx + mov eax,[edi] + shld edx,eax,2 + shl eax,2 + add eax,[edi] + adc edx,0 + add eax,eax + adc edx,edx + mov [edi],eax + mov eax,[edi+4] + add eax,eax + jc dec_out_of_range + add eax,eax + jc dec_out_of_range + add eax,[edi+4] + jc dec_out_of_range + add eax,eax + jc dec_out_of_range + add eax,edx + jc dec_out_of_range + mov [edi+4],eax + movzx eax,byte [esi] + sub al,30h + jc bad_number + cmp al,9 + ja bad_number + add [edi],eax + adc dword [edi+4],0 + jc dec_out_of_range + next_dec_digit: + inc esi + jmp get_dec_digit + dec_out_of_range: + cmp esi,ebx + ja dec_out_of_range_finished + lods byte [esi] + cmp al,27h + je bad_number + sub al,30h + jc bad_number + cmp al,9 + ja bad_number + jmp dec_out_of_range + dec_out_of_range_finished: + or ebp,-1 + jmp number_ok + bad_number: + pop eax + invalid_number: + mov esi,[number_start] + dec esi + not_number: + dec esi + stc + ret + get_bin_number: + xor bl,bl + get_bin_digit: + cmp esi,[number_start] + jb number_ok + movzx eax,byte [esi] + cmp al,27h + je bin_digit_skip + sub al,30h + cmp al,1 + ja bad_number + xor edx,edx + mov cl,bl + dec esi + cmp bl,64 + je bin_out_of_range + inc bl + cmp cl,32 + jae bin_digit_high + shl eax,cl + or dword [edi],eax + jmp get_bin_digit + bin_digit_high: + sub cl,32 + shl eax,cl + or dword [edi+4],eax + jmp get_bin_digit + bin_out_of_range: + or al,al + jz get_bin_digit + or ebp,-1 + jmp get_bin_digit + bin_digit_skip: + dec esi + jmp get_bin_digit + pascal_hex_number: + cmp cl,1 + je bad_number + get_hex_number: + xor bl,bl + get_hex_digit: + cmp esi,[number_start] + jb number_ok + movzx eax,byte [esi] + cmp al,27h + je hex_digit_skip + cmp al,'x' + je hex_number_ok + cmp al,'$' + je pascal_hex_ok + sub al,30h + cmp al,9 + jbe hex_digit_ok + sub al,7 + cmp al,15 + jbe hex_letter_digit_ok + sub al,20h + cmp al,15 + ja bad_number + hex_letter_digit_ok: + cmp al,10 + jb bad_number + hex_digit_ok: + xor edx,edx + mov cl,bl + dec esi + cmp bl,64 + je hex_out_of_range + add bl,4 + cmp cl,32 + jae hex_digit_high + shl eax,cl + or dword [edi],eax + jmp get_hex_digit + hex_digit_high: + sub cl,32 + shl eax,cl + or dword [edi+4],eax + jmp get_hex_digit + hex_out_of_range: + or al,al + jz get_hex_digit + or ebp,-1 + jmp get_hex_digit + hex_digit_skip: + dec esi + jmp get_hex_digit + get_oct_number: + xor bl,bl + get_oct_digit: + cmp esi,[number_start] + jb number_ok + movzx eax,byte [esi] + cmp al,27h + je oct_digit_skip + sub al,30h + cmp al,7 + ja bad_number + oct_digit_ok: + xor edx,edx + mov cl,bl + dec esi + cmp bl,63 + ja oct_out_of_range + jne oct_range_ok + cmp al,1 + ja oct_out_of_range + oct_range_ok: + add bl,3 + cmp cl,30 + je oct_digit_wrap + ja oct_digit_high + shl eax,cl + or dword [edi],eax + jmp get_oct_digit + oct_digit_wrap: + shl eax,cl + adc dword [edi+4],0 + or dword [edi],eax + jmp get_oct_digit + oct_digit_high: + sub cl,32 + shl eax,cl + or dword [edi+4],eax + jmp get_oct_digit + oct_digit_skip: + dec esi + jmp get_oct_digit + oct_out_of_range: + or al,al + jz get_oct_digit + or ebp,-1 + jmp get_oct_digit + hex_number_ok: + dec esi + pascal_hex_ok: + cmp esi,[number_start] + jne bad_number + number_ok: + pop esi + number_done: + clc + ret + get_text_number: + lods dword [esi] + mov edx,eax + xor bl,bl + mov dword [edi],0 + mov dword [edi+4],0 + get_text_character: + sub edx,1 + jc number_done + movzx eax,byte [esi] + inc esi + mov cl,bl + cmp bl,64 + je text_out_of_range + add bl,8 + cmp cl,32 + jae text_character_high + shl eax,cl + or dword [edi],eax + jmp get_text_character + text_character_high: + sub cl,32 + shl eax,cl + or dword [edi+4],eax + jmp get_text_character + text_out_of_range: + or ebp,-1 + jmp get_text_character + +get_fp_value: + push edi esi + lods byte [esi] + cmp al,1Ah + je fp_value_start + cmp al,'-' + je fp_sign_ok + cmp al,'+' + jne not_fp_value + fp_sign_ok: + lods byte [esi] + cmp al,1Ah + jne not_fp_value + fp_value_start: + lods byte [esi] + movzx ecx,al + cmp cl,1 + jbe not_fp_value + lea edx,[esi+1] + xor ah,ah + check_fp_value: + lods byte [esi] + cmp al,'.' + je fp_character_dot + cmp al,'E' + je fp_character_exp + cmp al,'e' + je fp_character_exp + cmp al,'F' + je fp_last_character + cmp al,'f' + je fp_last_character + digit_expected: + cmp al,'0' + jb not_fp_value + cmp al,'9' + ja not_fp_value + jmp fp_character_ok + fp_character_dot: + cmp esi,edx + je not_fp_value + or ah,ah + jnz not_fp_value + or ah,1 + lods byte [esi] + loop digit_expected + not_fp_value: + pop esi edi + stc + ret + fp_last_character: + cmp cl,1 + jne not_fp_value + or ah,4 + jmp fp_character_ok + fp_character_exp: + cmp esi,edx + je not_fp_value + cmp ah,1 + ja not_fp_value + or ah,2 + cmp ecx,1 + jne fp_character_ok + cmp byte [esi],'+' + je fp_exp_sign + cmp byte [esi],'-' + jne fp_character_ok + fp_exp_sign: + inc esi + cmp byte [esi],1Ah + jne not_fp_value + inc esi + lods byte [esi] + movzx ecx,al + inc ecx + fp_character_ok: + dec ecx + jnz check_fp_value + or ah,ah + jz not_fp_value + pop esi + lods byte [esi] + mov [fp_sign],0 + cmp al,1Ah + je fp_get + inc esi + cmp al,'+' + je fp_get + mov [fp_sign],1 + fp_get: + lods byte [esi] + movzx ecx,al + xor edx,edx + mov edi,fp_value + mov [edi],edx + mov [edi+4],edx + mov [edi+12],edx + call fp_optimize + mov [fp_format],0 + mov al,[esi] + fp_before_dot: + lods byte [esi] + cmp al,'.' + je fp_dot + cmp al,'E' + je fp_exponent + cmp al,'e' + je fp_exponent + cmp al,'F' + je fp_done + cmp al,'f' + je fp_done + sub al,30h + mov edi,fp_value+16 + xor edx,edx + mov dword [edi+12],edx + mov dword [edi],edx + mov dword [edi+4],edx + mov [edi+7],al + mov dl,7 + mov dword [edi+8],edx + call fp_optimize + mov edi,fp_value + push ecx + mov ecx,10 + call fp_mul + pop ecx + mov ebx,fp_value+16 + call fp_add + loop fp_before_dot + fp_dot: + mov edi,fp_value+16 + xor edx,edx + mov [edi],edx + mov [edi+4],edx + mov byte [edi+7],80h + mov [edi+8],edx + mov dword [edi+12],edx + dec ecx + jz fp_done + fp_after_dot: + lods byte [esi] + cmp al,'E' + je fp_exponent + cmp al,'e' + je fp_exponent + cmp al,'F' + je fp_done + cmp al,'f' + je fp_done + inc [fp_format] + cmp [fp_format],80h + jne fp_counter_ok + mov [fp_format],7Fh + fp_counter_ok: + dec esi + mov edi,fp_value+16 + push ecx + mov ecx,10 + call fp_div + push dword [edi] + push dword [edi+4] + push dword [edi+8] + push dword [edi+12] + lods byte [esi] + sub al,30h + movzx ecx,al + call fp_mul + mov ebx,edi + mov edi,fp_value + call fp_add + mov edi,fp_value+16 + pop dword [edi+12] + pop dword [edi+8] + pop dword [edi+4] + pop dword [edi] + pop ecx + dec ecx + jnz fp_after_dot + jmp fp_done + fp_exponent: + or [fp_format],80h + xor edx,edx + xor ebp,ebp + dec ecx + jnz get_exponent + cmp byte [esi],'+' + je fp_exponent_sign + cmp byte [esi],'-' + jne fp_done + not ebp + fp_exponent_sign: + add esi,2 + lods byte [esi] + movzx ecx,al + get_exponent: + movzx eax,byte [esi] + inc esi + sub al,30h + cmp al,10 + jae exponent_ok + imul edx,10 + cmp edx,8000h + jae value_out_of_range + add edx,eax + loop get_exponent + exponent_ok: + mov edi,fp_value + or edx,edx + jz fp_done + mov ecx,edx + or ebp,ebp + jnz fp_negative_power + fp_power: + push ecx + mov ecx,10 + call fp_mul + pop ecx + loop fp_power + jmp fp_done + fp_negative_power: + push ecx + mov ecx,10 + call fp_div + pop ecx + loop fp_negative_power + fp_done: + mov edi,fp_value + mov al,[fp_format] + mov [edi+10],al + mov al,[fp_sign] + mov [edi+11],al + test byte [edi+15],80h + jz fp_ok + add dword [edi],1 + adc dword [edi+4],0 + jnc fp_ok + mov eax,[edi+4] + shrd [edi],eax,1 + shr eax,1 + or eax,80000000h + mov [edi+4],eax + inc word [edi+8] + fp_ok: + pop edi + clc + ret + fp_mul: + or ecx,ecx + jz fp_zero + mov eax,[edi+12] + mul ecx + mov [edi+12],eax + mov ebx,edx + mov eax,[edi] + mul ecx + add eax,ebx + adc edx,0 + mov [edi],eax + mov ebx,edx + mov eax,[edi+4] + mul ecx + add eax,ebx + adc edx,0 + mov [edi+4],eax + .loop: + or edx,edx + jz .done + mov eax,[edi] + shrd [edi+12],eax,1 + mov eax,[edi+4] + shrd [edi],eax,1 + shrd eax,edx,1 + mov [edi+4],eax + shr edx,1 + inc dword [edi+8] + cmp dword [edi+8],8000h + jge value_out_of_range + jmp .loop + .done: + ret + fp_div: + mov eax,[edi+4] + xor edx,edx + div ecx + mov [edi+4],eax + mov eax,[edi] + div ecx + mov [edi],eax + mov eax,[edi+12] + div ecx + mov [edi+12],eax + mov ebx,eax + or ebx,[edi] + or ebx,[edi+4] + jz fp_zero + .loop: + test byte [edi+7],80h + jnz .exp_ok + mov eax,[edi] + shld [edi+4],eax,1 + mov eax,[edi+12] + shld [edi],eax,1 + add eax,eax + mov [edi+12],eax + dec dword [edi+8] + add edx,edx + jmp .loop + .exp_ok: + mov eax,edx + xor edx,edx + div ecx + add [edi+12],eax + adc dword [edi],0 + adc dword [edi+4],0 + jnc .done + mov eax,[edi+4] + mov ebx,[edi] + shrd [edi],eax,1 + shrd [edi+12],ebx,1 + shr eax,1 + or eax,80000000h + mov [edi+4],eax + inc dword [edi+8] + .done: + ret + fp_add: + cmp dword [ebx+8],8000h + je .done + cmp dword [edi+8],8000h + je .copy + mov eax,[ebx+8] + cmp eax,[edi+8] + jge .exp_ok + mov eax,[edi+8] + .exp_ok: + call .change_exp + xchg ebx,edi + call .change_exp + xchg ebx,edi + mov edx,[ebx+12] + mov eax,[ebx] + mov ebx,[ebx+4] + add [edi+12],edx + adc [edi],eax + adc [edi+4],ebx + jnc .done + mov eax,[edi] + shrd [edi+12],eax,1 + mov eax,[edi+4] + shrd [edi],eax,1 + shr eax,1 + or eax,80000000h + mov [edi+4],eax + inc dword [edi+8] + .done: + ret + .copy: + mov eax,[ebx] + mov [edi],eax + mov eax,[ebx+4] + mov [edi+4],eax + mov eax,[ebx+8] + mov [edi+8],eax + mov eax,[ebx+12] + mov [edi+12],eax + ret + .change_exp: + push ecx + mov ecx,eax + sub ecx,[ebx+8] + mov edx,[ebx+4] + jecxz .exp_done + .exp_loop: + mov ebp,[ebx] + shrd [ebx+12],ebp,1 + shrd [ebx],edx,1 + shr edx,1 + inc dword [ebx+8] + loop .exp_loop + .exp_done: + mov [ebx+4],edx + pop ecx + ret + fp_optimize: + mov eax,[edi] + mov ebp,[edi+4] + or ebp,[edi] + or ebp,[edi+12] + jz fp_zero + .loop: + test byte [edi+7],80h + jnz .done + shld [edi+4],eax,1 + mov ebp,[edi+12] + shld eax,ebp,1 + mov [edi],eax + shl dword [edi+12],1 + dec dword [edi+8] + jmp .loop + .done: + ret + fp_zero: + mov dword [edi+8],8000h + ret + +preevaluate_logical_expression: + xor al,al + preevaluate_embedded_logical_expression: + mov [logical_value_wrapping],al + push edi + call preevaluate_logical_value + preevaluation_loop: + cmp al,0FFh + je invalid_logical_expression + mov dl,[esi] + inc esi + cmp dl,'|' + je preevaluate_or + cmp dl,'&' + je preevaluate_and + cmp dl,'}' + je preevaluation_done + or dl,dl + jnz invalid_logical_expression + preevaluation_done: + pop edx + dec esi + ret + preevaluate_or: + cmp al,'1' + je quick_true + cmp al,'0' + je leave_only_following + push edi + mov al,dl + stos byte [edi] + call preevaluate_logical_value + pop ebx + cmp al,'0' + je leave_only_preceding + cmp al,'1' + jne preevaluation_loop + stos byte [edi] + xor al,al + jmp preevaluation_loop + preevaluate_and: + cmp al,'0' + je quick_false + cmp al,'1' + je leave_only_following + push edi + mov al,dl + stos byte [edi] + call preevaluate_logical_value + pop ebx + cmp al,'1' + je leave_only_preceding + cmp al,'0' + jne preevaluation_loop + stos byte [edi] + xor al,al + jmp preevaluation_loop + leave_only_following: + mov edi,[esp] + call preevaluate_logical_value + jmp preevaluation_loop + leave_only_preceding: + mov edi,ebx + xor al,al + jmp preevaluation_loop + quick_true: + call skip_logical_value + jc invalid_logical_expression + mov edi,[esp] + mov al,'1' + jmp preevaluation_loop + quick_false: + call skip_logical_value + jc invalid_logical_expression + mov edi,[esp] + mov al,'0' + jmp preevaluation_loop + invalid_logical_expression: + pop edi + mov esi,edi + mov al,0FFh + stos byte [edi] + ret + skip_logical_value: + cmp byte [esi],'~' + jne negation_skipped + inc esi + jmp skip_logical_value + negation_skipped: + mov al,[esi] + cmp al,'{' + jne skip_simple_logical_value + inc esi + xchg al,[logical_value_wrapping] + push eax + skip_logical_expression: + call skip_logical_value + lods byte [esi] + or al,al + jz wrongly_structured_logical_expression + cmp al,0Fh + je wrongly_structured_logical_expression + cmp al,'|' + je skip_logical_expression + cmp al,'&' + je skip_logical_expression + cmp al,'}' + jne wrongly_structured_logical_expression + pop eax + mov [logical_value_wrapping],al + logical_value_skipped: + clc + ret + wrongly_structured_logical_expression: + pop eax + stc + ret + skip_simple_logical_value: + mov [logical_value_parentheses],0 + find_simple_logical_value_end: + mov al,[esi] + or al,al + jz logical_value_skipped + cmp al,0Fh + je logical_value_skipped + cmp al,'|' + je logical_value_skipped + cmp al,'&' + je logical_value_skipped + cmp al,'{' + je skip_logical_value_internal_parenthesis + cmp al,'}' + jne skip_logical_value_symbol + sub [logical_value_parentheses],1 + jnc skip_logical_value_symbol + cmp [logical_value_wrapping],'{' + jne skip_logical_value_symbol + jmp logical_value_skipped + skip_logical_value_internal_parenthesis: + inc [logical_value_parentheses] + skip_logical_value_symbol: + call skip_symbol + jmp find_simple_logical_value_end + preevaluate_logical_value: + mov ebp,edi + preevaluate_negation: + cmp byte [esi],'~' + jne preevaluate_negation_ok + movs byte [edi],[esi] + jmp preevaluate_negation + preevaluate_negation_ok: + mov ebx,esi + cmp byte [esi],'{' + jne preevaluate_simple_logical_value + lods byte [esi] + stos byte [edi] + push ebp + mov dl,[logical_value_wrapping] + push edx + call preevaluate_embedded_logical_expression + pop edx + mov [logical_value_wrapping],dl + pop ebp + cmp al,0FFh + je invalid_logical_value + cmp byte [esi],'}' + jne invalid_logical_value + or al,al + jnz preevaluated_expression_value + movs byte [edi],[esi] + ret + preevaluated_expression_value: + inc esi + lea edx,[edi-1] + sub edx,ebp + test edx,1 + jz expression_negation_ok + xor al,1 + expression_negation_ok: + mov edi,ebp + ret + invalid_logical_value: + mov edi,ebp + mov al,0FFh + ret + preevaluate_simple_logical_value: + xor edx,edx + mov [logical_value_parentheses],edx + find_logical_value_boundaries: + mov al,[esi] + or al,al + jz logical_value_boundaries_found + cmp al,'{' + je logical_value_internal_parentheses + cmp al,'}' + je logical_value_boundaries_parenthesis_close + cmp al,'|' + je logical_value_boundaries_found + cmp al,'&' + je logical_value_boundaries_found + or edx,edx + jnz next_symbol_in_logical_value + cmp al,0F0h + je preevaluable_logical_operator + cmp al,0F7h + je preevaluable_logical_operator + cmp al,0F6h + jne next_symbol_in_logical_value + preevaluable_logical_operator: + mov edx,esi + next_symbol_in_logical_value: + call skip_symbol + jmp find_logical_value_boundaries + logical_value_internal_parentheses: + inc [logical_value_parentheses] + jmp next_symbol_in_logical_value + logical_value_boundaries_parenthesis_close: + sub [logical_value_parentheses],1 + jnc next_symbol_in_logical_value + cmp [logical_value_wrapping],'{' + jne next_symbol_in_logical_value + logical_value_boundaries_found: + or edx,edx + jz non_preevaluable_logical_value + mov al,[edx] + cmp al,0F0h + je compare_symbols + cmp al,0F7h + je compare_symbol_types + cmp al,0F6h + je scan_symbols_list + non_preevaluable_logical_value: + mov ecx,esi + mov esi,ebx + sub ecx,esi + jz invalid_logical_value + cmp esi,edi + je leave_logical_value_intact + rep movs byte [edi],[esi] + xor al,al + ret + leave_logical_value_intact: + add edi,ecx + add esi,ecx + xor al,al + ret + compare_symbols: + lea ecx,[esi-1] + sub ecx,edx + mov eax,edx + sub eax,ebx + cmp ecx,eax + jne preevaluated_false + push esi edi + mov esi,ebx + lea edi,[edx+1] + repe cmps byte [esi],[edi] + pop edi esi + je preevaluated_true + preevaluated_false: + mov eax,edi + sub eax,ebp + test eax,1 + jnz store_true + store_false: + mov edi,ebp + mov al,'0' + ret + preevaluated_true: + mov eax,edi + sub eax,ebp + test eax,1 + jnz store_false + store_true: + mov edi,ebp + mov al,'1' + ret + compare_symbol_types: + push esi + lea esi,[edx+1] + type_comparison: + cmp esi,[esp] + je types_compared + mov al,[esi] + cmp al,[ebx] + jne different_type + cmp al,'(' + jne equal_type + mov al,[esi+1] + mov ah,[ebx+1] + cmp al,ah + je equal_type + or al,al + jz different_type + or ah,ah + jz different_type + cmp al,'.' + je different_type + cmp ah,'.' + je different_type + equal_type: + call skip_symbol + xchg esi,ebx + call skip_symbol + xchg esi,ebx + jmp type_comparison + types_compared: + pop esi + cmp byte [ebx],0F7h + jne preevaluated_false + jmp preevaluated_true + different_type: + pop esi + jmp preevaluated_false + scan_symbols_list: + push edi esi + lea esi,[edx+1] + sub edx,ebx + lods byte [esi] + cmp al,'<' + jne invalid_symbols_list + get_next_from_list: + mov edi,esi + get_from_list: + cmp byte [esi],',' + je compare_in_list + cmp byte [esi],'>' + je compare_in_list + cmp esi,[esp] + jae invalid_symbols_list + call skip_symbol + jmp get_from_list + compare_in_list: + mov ecx,esi + sub ecx,edi + cmp ecx,edx + jne not_equal_length_in_list + mov esi,ebx + repe cmps byte [esi],[edi] + mov esi,edi + jne not_equal_in_list + skip_rest_of_list: + cmp byte [esi],'>' + je check_list_end + cmp esi,[esp] + jae invalid_symbols_list + call skip_symbol + jmp skip_rest_of_list + check_list_end: + inc esi + cmp esi,[esp] + jne invalid_symbols_list + pop esi edi + jmp preevaluated_true + not_equal_in_list: + add esi,ecx + not_equal_length_in_list: + lods byte [esi] + cmp al,',' + je get_next_from_list + cmp esi,[esp] + jne invalid_symbols_list + pop esi edi + jmp preevaluated_false + invalid_symbols_list: + pop esi edi + jmp invalid_logical_value diff --git a/programs/develop/fasm/trunk/formats.inc b/programs/develop/fasm/trunk/formats.inc index e4561d99c..a6ab910fb 100644 --- a/programs/develop/fasm/trunk/formats.inc +++ b/programs/develop/fasm/trunk/formats.inc @@ -1,6 +1,6 @@ ; flat assembler core -; Copyright (c) 1999-2012, Tomasz Grysztar. +; Copyright (c) 1999-2013, Tomasz Grysztar. ; All rights reserved. formatter: @@ -129,14 +129,14 @@ formatter: je labels_table_ok mov ecx,[memory_end] sub ecx,[labels_list] - mov edi,[display_buffer] + mov edi,[tagged_blocks] sub edi,8 mov [edi],ecx or dword [edi+4],-1 sub edi,ecx cmp edi,[current_offset] jbe out_of_memory - mov [display_buffer],edi + mov [tagged_blocks],edi mov esi,[memory_end] copy_labels: sub esi,32 @@ -200,8 +200,9 @@ formatter: format_directive: cmp edi,[code_start] jne unexpected_instruction - cmp [virtual_data],0 - jne unexpected_instruction + mov ebp,[addressing_space] + test byte [ds:ebp+0Ah],1 + jnz unexpected_instruction cmp [output_format],0 jne unexpected_instruction lods byte [esi] @@ -280,8 +281,6 @@ heap_directive: je pe_heap jmp illegal_instruction segment_directive: - cmp [virtual_data],0 - jne illegal_instruction mov al,[output_format] cmp al,2 je mz_segment @@ -289,8 +288,6 @@ segment_directive: je elf_segment jmp illegal_instruction section_directive: - cmp [virtual_data],0 - jne illegal_instruction mov al,[output_format] cmp al,3 je pe_section @@ -410,6 +407,7 @@ extrn_directive: xor eax,eax xor edx,edx xor ebp,ebp + mov [address_sign],0 mov ch,2 test [format_flags],8 jz make_free_label @@ -418,8 +416,9 @@ extrn_directive: mark_relocation: cmp [value_type],0 je relocation_ok - cmp [virtual_data],0 - jne relocation_ok + mov ebp,[addressing_space] + test byte [ds:ebp+0Ah],1 + jnz relocation_ok cmp [output_format],2 je mark_mz_relocation cmp [output_format],3 @@ -493,13 +492,11 @@ mz_segment: mov edx,edi xor eax,eax rep stos byte [edi] - mov dword [org_origin],edi - mov dword [org_origin+4],eax - mov [org_origin_sign],al - mov [org_registers],eax - mov [org_start],edi mov eax,edx call undefined_data + push ebx + call create_addressing_space + pop ebx mov eax,edi sub eax,[code_start] shr eax,4 @@ -515,9 +512,10 @@ mz_segment: mov [code_type],al mov eax,edx mov ch,1 - mov [label_size],0 + mov [address_sign],0 xor edx,edx xor ebp,ebp + mov [label_size],0 mov [address_symbol],edx jmp make_free_label mz_entry: @@ -724,7 +722,7 @@ make_stub: and ecx,not 11b add ecx,(40h-1Ch) shr 2 lea eax,[edi+ecx*4] - cmp edi,[display_buffer] + cmp edi,[tagged_blocks] jae out_of_memory xor eax,eax rep stos dword [edi] @@ -762,7 +760,7 @@ make_stub: inc ecx shl ecx,1 lea eax,[edi+ecx*4] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory xor eax,eax rep stos dword [edi] @@ -826,7 +824,7 @@ make_stub: mov [esi+16h],ax mov word [esi+14h],100h mov byte [esi+18h],40h - mov eax,[display_buffer] + mov eax,[tagged_blocks] sub eax,ecx cmp edi,eax jae out_of_memory @@ -1053,7 +1051,7 @@ format_pe: shl ebx,cl sub ebx,ebp mov ecx,ebx - mov eax,[display_buffer] + mov eax,[tagged_blocks] sub eax,ecx cmp edi,eax jae out_of_memory @@ -1117,12 +1115,14 @@ format_pe: jc pe_labels_type_ok xor bh,bh pe_labels_type_ok: - mov [labels_type],bh - mov dword [org_origin],eax - mov dword [org_origin+4],ecx - mov [org_origin_sign],bl - and [org_registers],0 - mov [org_start],edi + push eax ebx + call init_addressing_space + mov ebp,ebx + pop ebx eax + mov [ds:ebp],eax + mov [ds:ebp+4],ecx + mov [ds:ebp+8],bx + mov [ds:ebp+18h],edi bt [format_flags],8 jnc dll_flag_ok or byte [edx+16h+1],20h @@ -1142,6 +1142,10 @@ format_pe: jmp format_defined pe_section: call close_pe_section + push eax ebx + call create_addressing_space + mov ebp,ebx + pop ebx eax bts [format_flags],5 lea ecx,[ebx+28h] add edx,[edx+54h] @@ -1179,38 +1183,36 @@ pe_section: mov edx,[code_start] mov eax,edi xor ecx,ecx - mov [org_origin_sign],0 sub eax,[ebx+0Ch] sbb ecx,0 - sbb [org_origin_sign],0 - mov [labels_type],2 + sbb byte [ds:ebp+8],0 + mov byte [ds:ebp+9],2 mov [code_type],32 test [format_flags],8 jz pe_section_code_type_ok - mov [labels_type],4 + mov byte [ds:ebp+9],4 mov [code_type],64 pe_section_code_type_ok: test [format_flags],4 jnz peplus_section_org sub eax,[edx+34h] sbb ecx,0 - sbb [org_origin_sign],0 + sbb byte [ds:ebp+8],0 bt [resolver_flags],0 jc pe_section_org_ok - mov [labels_type],0 + mov byte [ds:ebp+9],0 jmp pe_section_org_ok peplus_section_org: sub eax,[edx+30h] sbb ecx,[edx+34h] - sbb [org_origin_sign],0 + sbb byte [ds:ebp+8],0 bt [resolver_flags],0 jc pe_section_org_ok - mov [labels_type],0 + mov byte [ds:ebp+9],0 pe_section_org_ok: - mov dword [org_origin],eax - mov dword [org_origin+4],ecx - and [org_registers],0 - mov [org_start],edi + mov [ds:ebp],eax + mov [ds:ebp+4],ecx + mov [ds:ebp+18h],edi get_section_flags: lods byte [esi] cmp al,1Ah @@ -1541,7 +1543,7 @@ pe_heap: cmp edx,[ecx+74h] ja value_out_of_range jb instruction_assembled - cmp eax,[edx+70h] + cmp eax,[ecx+70h] ja value_out_of_range jmp instruction_assembled mark_pe_relocation: @@ -1664,7 +1666,7 @@ make_pe_resource: and [resource_size],0 reserve_space_for_resource: add edi,[resource_size] - cmp edi,[display_buffer] + cmp edi,[tagged_blocks] ja out_of_memory jmp resource_done resource_from_file: @@ -1750,7 +1752,7 @@ make_pe_resource: mov [esi],eax mov [resource_data],edi lea eax,[edi+16] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory xor eax,eax stos dword [edi] @@ -1812,7 +1814,7 @@ make_pe_resource: mov eax,[resource_data] inc word [eax+12] lea eax,[edi+8] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory mov eax,ebx stos dword [edi] @@ -1849,7 +1851,7 @@ make_pe_resource: mov eax,[resource_data] inc word [eax+14] lea eax,[edi+8] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory mov eax,ebx stos dword [edi] @@ -1870,7 +1872,7 @@ make_pe_resource: bts edx,31 mov [esi+4],edx lea eax,[edi+16] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory xor eax,eax stos dword [edi] @@ -1949,7 +1951,7 @@ make_pe_resource: mov eax,[esp] inc word [eax+12] lea eax,[edi+8] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory mov eax,ebx stos dword [edi] @@ -1992,7 +1994,7 @@ make_pe_resource: mov eax,[esp] inc word [eax+14] lea eax,[edi+8] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory mov eax,ebx stos dword [edi] @@ -2031,7 +2033,7 @@ make_pe_resource: bts edx,31 mov [esi+4],edx lea eax,[edi+16] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory xor eax,eax stos dword [edi] @@ -2081,7 +2083,7 @@ make_pe_resource: mov eax,[esp] inc word [eax+14] lea eax,[edi+8] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory mov eax,ebx stos dword [edi] @@ -2122,7 +2124,7 @@ make_pe_resource: stos word [edi] copy_string_data: lea eax,[edi+2] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory mov ax,[edx] or ax,ax @@ -2160,7 +2162,7 @@ make_pe_resource: sub esi,[resource_data] xchg esi,[ebx+4] lea eax,[edi+16] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory mov eax,esi stos dword [edi] @@ -2190,7 +2192,7 @@ make_pe_resource: mov edx,edi mov ecx,[esi+4] add edi,ecx - cmp edi,[display_buffer] + cmp edi,[tagged_blocks] ja out_of_memory call read mov eax,edi @@ -2319,28 +2321,16 @@ format_coff: mov [current_section],ebx xor eax,eax mov [number_of_sections],eax - call setup_coff_section_org + mov edx,ebx + call init_addressing_space + mov [ebx+14h],edx + mov byte [ebx+9],2 mov [code_type],32 test [format_flags],8 jz format_defined + mov byte [ebx+9],4 mov [code_type],64 jmp format_defined - setup_coff_section_org: - xor eax,eax - mov dword [org_origin],edi - mov dword [org_origin+4],eax - mov [org_origin_sign],al - mov [org_registers],eax - mov [org_start],edi - mov [org_symbol],ebx - test [format_flags],8 - jnz coff_64bit_labels - mov [labels_type],2 - ret - coff_64bit_labels: - mov [labels_type],4 - ret - coff_section: call close_coff_section mov ebx,[free_additional_memory] @@ -2355,7 +2345,15 @@ coff_section: mov [ebx+8],edi mov [ebx+10h],eax mov [ebx+14h],eax - call setup_coff_section_org + mov edx,ebx + call create_addressing_space + xchg edx,ebx + mov [edx+14h],ebx + mov byte [edx+9],2 + test [format_flags],8 + jz coff_labels_type_ok + mov byte [edx+9],4 + coff_labels_type_ok: lods word [esi] cmp ax,'(' jne invalid_argument @@ -2442,8 +2440,10 @@ mark_coff_relocation: test [format_flags],8 jnz coff_64bit_relocation mov al,6 + cmp [value_type],2 + je coff_relocation cmp [value_type],5 - jne coff_relocation + jne invalid_use_of_symbol inc al jmp coff_relocation coff_64bit_relocation: @@ -2451,8 +2451,10 @@ mark_coff_relocation: cmp [value_type],4 je coff_relocation mov al,2 + cmp [value_type],2 + je coff_relocation cmp [value_type],5 - jne coff_relocation + jne invalid_use_of_symbol inc al jmp coff_relocation coff_relocation_relative: @@ -2465,16 +2467,17 @@ mark_coff_relocation: sub eax,ebx add eax,4 relative_ok: + mov ebx,[addressing_space] push eax mov al,20 test [format_flags],8 jnz relative_coff_64bit_relocation - cmp [labels_type],2 + cmp byte [ebx+9],2 jne invalid_use_of_symbol jmp coff_relocation relative_coff_64bit_relocation: mov al,4 - cmp [labels_type],4 + cmp byte [ebx+9],4 jne invalid_use_of_symbol coff_relocation: mov ebx,[free_additional_memory] @@ -2686,7 +2689,7 @@ coff_formatter: jmp find_relocations add_relocation: lea eax,[ebx+0Ah] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] ja out_of_memory mov eax,[esi+4] mov [ebx],eax @@ -2905,7 +2908,7 @@ format_elf: mov edx,edi mov ecx,34h shr 2 lea eax,[edi+ecx*4] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory xor eax,eax rep stos dword [edi] @@ -2940,16 +2943,21 @@ format_elf: mov [ebx+14h],eax mov al,4 mov [ebx+10h],eax - call setup_coff_section_org + mov edx,ebx + call init_addressing_space + xchg edx,ebx + mov [edx+14h],ebx + mov byte [edx+9],2 test [format_flags],8 jz format_defined + mov byte [edx+9],4 mov byte [ebx+10h],8 jmp format_defined format_elf64: mov edx,edi mov ecx,40h shr 2 lea eax,[edi+ecx*4] - cmp eax,[display_buffer] + cmp eax,[tagged_blocks] jae out_of_memory xor eax,eax rep stos dword [edi] @@ -2984,7 +2992,15 @@ elf_section: mov [ebx+10h],eax mov al,10b mov [ebx+14h],eax - call setup_coff_section_org + mov edx,ebx + call create_addressing_space + xchg edx,ebx + mov [edx+14h],ebx + mov byte [edx+9],2 + test [format_flags],8 + jz elf_labels_type_ok + mov byte [edx+9],4 + elf_labels_type_ok: lods word [esi] cmp ax,'(' jne invalid_argument @@ -3038,11 +3054,13 @@ elf_section: mov byte [ebx+10h],8 jmp instruction_assembled mark_elf_relocation: + push ebx + mov ebx,[addressing_space] cmp [value_type],3 je elf_relocation_relative cmp [value_type],7 je elf_relocation_relative - push ebx eax + push eax cmp [value_type],5 je elf_gotoff_relocation ja invalid_use_of_symbol @@ -3059,9 +3077,8 @@ mark_elf_relocation: mov al,9 ; R_386_GOTOFF jmp coff_relocation elf_relocation_relative: - cmp [labels_type],0 + cmp byte [ebx+9],0 je invalid_use_of_symbol - push ebx mov ebx,[current_section] mov ebx,[ebx+8] sub ebx,edi @@ -3690,11 +3707,13 @@ format_elf_exe: add eax,edi adc ebp,0 adc cl,0 - mov dword [org_origin],eax - mov dword [org_origin+4],edx - mov [org_origin_sign],cl - and [org_registers],0 - mov [org_start],edi + elf_exe_addressing_setup: + push eax + call init_addressing_space + pop eax + mov [ebx],eax + mov [ebx+4],edx + mov [ebx+8],cl mov [symbols_stream],edi jmp format_defined format_elf64_exe: @@ -3768,13 +3787,7 @@ format_elf_exe: add eax,edi adc edx,0 adc cl,0 - mov dword [org_origin],eax - mov dword [org_origin+4],edx - mov [org_origin_sign],cl - and [org_registers],0 - mov [org_start],edi - mov [symbols_stream],edi - jmp format_defined + jmp elf_exe_addressing_setup elf_entry: lods byte [esi] cmp al,'(' @@ -3804,6 +3817,8 @@ elf_segment: jnz elf64_segment call close_elf_segment push eax + call create_addressing_space + mov ebp,ebx mov ebx,[number_of_sections] shl ebx,5 add ebx,[code_start] @@ -3883,11 +3898,10 @@ elf_segment: add eax,edi adc edx,0 adc cl,0 - mov dword [org_origin],eax - mov dword [org_origin+4],edx - mov [org_origin_sign],cl - and [org_registers],0 - mov [org_start],edi + elf_segment_addressing_setup: + mov [ds:ebp],eax + mov [ds:ebp+4],edx + mov [ds:ebp+8],cl inc [number_of_sections] jmp instruction_assembled close_elf_segment: @@ -3935,6 +3949,8 @@ elf_segment: elf64_segment: call close_elf64_segment push eax edx + call create_addressing_space + mov ebp,ebx mov ebx,[number_of_sections] imul ebx,38h add ebx,[code_start] @@ -4015,13 +4031,7 @@ elf_segment: add eax,edi adc edx,0 adc cl,0 - mov dword [org_origin],eax - mov dword [org_origin+4],edx - mov [org_origin_sign],cl - and [org_registers],0 - mov [org_start],edi - inc [number_of_sections] - jmp instruction_assembled + jmp elf_segment_addressing_setup close_elf64_segment: cmp [number_of_sections],0 jne finish_elf64_segment diff --git a/programs/develop/fasm/trunk/messages.inc b/programs/develop/fasm/trunk/messages.inc index 4395d48e9..ddb0f5999 100644 --- a/programs/develop/fasm/trunk/messages.inc +++ b/programs/develop/fasm/trunk/messages.inc @@ -1,52 +1,52 @@ - -; flat assembler core -; Copyright (c) 1999-2012, Tomasz Grysztar. -; All rights reserved. - -_out_of_memory db 'out of memory',0 -_stack_overflow db 'out of stack space',0 -_main_file_not_found db 'source file not found',0 -_unexpected_end_of_file db 'unexpected end of file',0 -_code_cannot_be_generated db 'code cannot be generated',0 -_format_limitations_exceeded db 'format limitations exceeded',0 -_invalid_definition db 'invalid definition provided',0 -_write_failed db 'write failed',0 -_file_not_found db 'file not found',0 -_error_reading_file db 'error reading file',0 -_invalid_file_format db 'invalid file format',0 -_invalid_macro_arguments db 'invalid macro arguments',0 -_incomplete_macro db 'incomplete macro',0 -_unexpected_characters db 'unexpected characters',0 -_invalid_argument db 'invalid argument',0 -_illegal_instruction db 'illegal instruction',0 -_invalid_operand db 'invalid operand',0 -_invalid_operand_size db 'invalid size of operand',0 -_operand_size_not_specified db 'operand size not specified',0 -_operand_sizes_do_not_match db 'operand sizes do not match',0 -_invalid_address_size db 'invalid size of address value',0 -_address_sizes_do_not_agree db 'address sizes do not agree',0 -_disallowed_combination_of_registers db 'disallowed combination of registers',0 -_long_immediate_not_encodable db 'not encodable with long immediate',0 -_relative_jump_out_of_range db 'relative jump out of range',0 -_invalid_expression db 'invalid expression',0 -_invalid_address db 'invalid address',0 -_invalid_value db 'invalid value',0 -_value_out_of_range db 'value out of range',0 -_undefined_symbol db 'undefined symbol',0 -_symbol_out_of_scope_1 db 'symbol',0 -_symbol_out_of_scope_2 db 'out of scope',0 -_invalid_use_of_symbol db 'invalid use of symbol',0 -_name_too_long db 'name too long',0 -_invalid_name db 'invalid name',0 -_reserved_word_used_as_symbol db 'reserved word used as symbol',0 -_symbol_already_defined db 'symbol already defined',0 -_missing_end_quote db 'missing end quote',0 -_missing_end_directive db 'missing end directive',0 -_unexpected_instruction db 'unexpected instruction',0 -_extra_characters_on_line db 'extra characters on line',0 -_section_not_aligned_enough db 'section is not aligned enough',0 -_setting_already_specified db 'setting already specified',0 -_data_already_defined db 'data already defined',0 -_too_many_repeats db 'too many repeats',0 -_invoked_error db 'error directive encountered in source file',0 -_assertion_failed db 'assertion failed',0 \ No newline at end of file + +; flat assembler core +; Copyright (c) 1999-2013, Tomasz Grysztar. +; All rights reserved. + +_out_of_memory db 'out of memory',0 +_stack_overflow db 'out of stack space',0 +_main_file_not_found db 'source file not found',0 +_unexpected_end_of_file db 'unexpected end of file',0 +_code_cannot_be_generated db 'code cannot be generated',0 +_format_limitations_exceeded db 'format limitations exceeded',0 +_invalid_definition db 'invalid definition provided',0 +_write_failed db 'write failed',0 +_file_not_found db 'file not found',0 +_error_reading_file db 'error reading file',0 +_invalid_file_format db 'invalid file format',0 +_invalid_macro_arguments db 'invalid macro arguments',0 +_incomplete_macro db 'incomplete macro',0 +_unexpected_characters db 'unexpected characters',0 +_invalid_argument db 'invalid argument',0 +_illegal_instruction db 'illegal instruction',0 +_invalid_operand db 'invalid operand',0 +_invalid_operand_size db 'invalid size of operand',0 +_operand_size_not_specified db 'operand size not specified',0 +_operand_sizes_do_not_match db 'operand sizes do not match',0 +_invalid_address_size db 'invalid size of address value',0 +_address_sizes_do_not_agree db 'address sizes do not agree',0 +_disallowed_combination_of_registers db 'disallowed combination of registers',0 +_long_immediate_not_encodable db 'not encodable with long immediate',0 +_relative_jump_out_of_range db 'relative jump out of range',0 +_invalid_expression db 'invalid expression',0 +_invalid_address db 'invalid address',0 +_invalid_value db 'invalid value',0 +_value_out_of_range db 'value out of range',0 +_undefined_symbol db 'undefined symbol',0 +_symbol_out_of_scope_1 db 'symbol',0 +_symbol_out_of_scope_2 db 'out of scope',0 +_invalid_use_of_symbol db 'invalid use of symbol',0 +_name_too_long db 'name too long',0 +_invalid_name db 'invalid name',0 +_reserved_word_used_as_symbol db 'reserved word used as symbol',0 +_symbol_already_defined db 'symbol already defined',0 +_missing_end_quote db 'missing end quote',0 +_missing_end_directive db 'missing end directive',0 +_unexpected_instruction db 'unexpected instruction',0 +_extra_characters_on_line db 'extra characters on line',0 +_section_not_aligned_enough db 'section is not aligned enough',0 +_setting_already_specified db 'setting already specified',0 +_data_already_defined db 'data already defined',0 +_too_many_repeats db 'too many repeats',0 +_invoked_error db 'error directive encountered in source file',0 +_assertion_failed db 'assertion failed',0 diff --git a/programs/develop/fasm/trunk/parser.inc b/programs/develop/fasm/trunk/parser.inc index 136d6a6b3..0b6ca8f1f 100644 --- a/programs/develop/fasm/trunk/parser.inc +++ b/programs/develop/fasm/trunk/parser.inc @@ -1,6 +1,6 @@ ; flat assembler core -; Copyright (c) 1999-2012, Tomasz Grysztar. +; Copyright (c) 1999-2013, Tomasz Grysztar. ; All rights reserved. parser: @@ -64,6 +64,8 @@ parser: simple_label: pop edi call identify_label + cmp byte [esi+1],':' + je block_label mov byte [edi],2 inc edi stos dword [edi] @@ -71,6 +73,12 @@ parser: xor al,al stos byte [edi] jmp parse_line + block_label: + mov byte [edi],4 + inc edi + stos dword [edi] + add esi,2 + jmp parse_line constant_label: pop edi call get_label_id @@ -127,8 +135,6 @@ parser: cmp al,':' je invalid_name dec esi - cmp al,3Bh - je skip_rest_of_line mov [parenthesis_stack],0 call parse_argument jmp parse_next_line @@ -530,6 +536,8 @@ parse_line_contents: je unallowed_character cmp al,'`' je unallowed_character + cmp al,3Bh + je foreign_argument dec esi cmp al,1Ah jne expression_argument @@ -550,6 +558,10 @@ parse_line_contents: pop edi movs byte [edi],[esi] jmp argument_parsed + foreign_argument: + dec esi + call skip_foreign_line + jmp contents_parsed symbol_argument: pop edi stos word [edi] @@ -560,7 +572,7 @@ parse_line_contents: je ptr_argument stos byte [edi] cmp al,80h - je forced_expression + je forced_multipart_expression cmp al,8Ch je forced_expression cmp al,81h @@ -725,7 +737,7 @@ parse_line_contents: jmp argument_parsed parse_from_operator: cmp byte [esi],22h - jne forced_expression + jne forced_multipart_expression jmp argument_parsed parse_quoted_extrn: inc esi @@ -771,14 +783,10 @@ parse_line_contents: mov eax,[esi+1] lea ebx,[esi+5+eax] push ebx ecx esi edi - mov al,'(' - stos byte [edi] - call convert_expression - mov al,')' - stos byte [edi] + call parse_expression pop eax edx ecx ebx cmp esi,ebx - jne expression_parsed + jne expression_argument_parsed mov edi,eax mov esi,edx string_argument: @@ -799,7 +807,14 @@ parse_line_contents: rep movs dword [edi],[esi] xor al,al stos byte [edi] - jmp expression_parsed + jmp expression_argument_parsed + parse_expression: + mov al,'(' + stos byte [edi] + call convert_expression + mov al,')' + stos byte [edi] + ret not_string: cmp byte [esi],'(' jne expression @@ -838,24 +853,27 @@ parse_line_contents: mov al,0F1h jmp expression_comparator expression: - mov al,'(' - stos byte [edi] - call convert_expression - mov al,')' - stos byte [edi] - jmp expression_parsed + call parse_expression + jmp expression_argument_parsed forced_expression: xor al,al xchg al,[formatter_symbols_allowed] push eax - mov al,'(' - stos byte [edi] - call convert_expression - mov al,')' - stos byte [edi] + call parse_expression + forced_expression_parsed: pop eax mov [formatter_symbols_allowed],al jmp argument_parsed + forced_multipart_expression: + xor al,al + xchg al,[formatter_symbols_allowed] + push eax + call parse_expression + cmp byte [esi],':' + jne forced_expression_parsed + movs byte [edi],[esi] + call parse_expression + jmp forced_expression_parsed address_argument: call parse_address lods byte [esi] @@ -925,7 +943,7 @@ parse_line_contents: dec [parenthesis_stack] add esp,8 jmp argument_parsed - expression_parsed: + expression_argument_parsed: cmp [parenthesis_stack],0 je parse_argument cmp byte [esi],')' diff --git a/programs/develop/fasm/trunk/preproce.inc b/programs/develop/fasm/trunk/preproce.inc index eb5494d2c..f1882ebc8 100644 --- a/programs/develop/fasm/trunk/preproce.inc +++ b/programs/develop/fasm/trunk/preproce.inc @@ -1,6 +1,6 @@ ; flat assembler core -; Copyright (c) 1999-2012, Tomasz Grysztar. +; Copyright (c) 1999-2013, Tomasz Grysztar. ; All rights reserved. preprocessor: @@ -38,7 +38,7 @@ preprocessor: mov [labels_list],eax xor eax,eax mov [source_start],eax - mov [display_buffer],eax + mov [tagged_blocks],eax mov [hash_tree],eax mov [error],eax mov [macro_status],al @@ -195,13 +195,13 @@ convert_line: lods byte [esi] stos byte [edi] cmp al,0Ah - je missing_end_quote + je no_end_quote cmp al,0Dh - je missing_end_quote + je no_end_quote or al,al - jz missing_end_quote + jz no_end_quote cmp al,1Ah - je missing_end_quote + je no_end_quote cmp al,ah jne copy_string lods byte [esi] @@ -243,6 +243,9 @@ convert_line: stos byte [edi] inc byte [ecx] jmp group_backslashes + no_end_quote: + mov byte [ebx-5],0 + jmp missing_end_quote backslashed_symbol: cmp al,1Ah je unexpected_end_of_file @@ -554,6 +557,9 @@ preprocess_line: call get_preprocessor_symbol jnc symbolic_constant_in_label lea esi,[esi+ecx+1] + cmp byte [esi],':' + jne preprocess_instruction + inc esi jmp preprocess_instruction symbolic_constant_in_label: mov ebx,[edx+8] @@ -571,6 +577,9 @@ preprocess_line: cmp byte [ebx],':' jne label_broken inc ebx + cmp byte [ebx],':' + jne check_for_broken_label + inc ebx jmp check_for_broken_label label_broken: push line_preprocessed @@ -1685,6 +1694,7 @@ do_irp: or [default_argument_value],-1 call skip_macro_argument_value inc esi + jmp irp_parameters_start irps_name_ok: cmp al,',' jne invalid_macro_arguments diff --git a/programs/develop/fasm/trunk/symbdump.inc b/programs/develop/fasm/trunk/symbdump.inc index fb345a5d9..6fcf12a7a 100644 --- a/programs/develop/fasm/trunk/symbdump.inc +++ b/programs/develop/fasm/trunk/symbdump.inc @@ -1,435 +1,450 @@ - -; flat assembler core -; Copyright (c) 1999-2012, Tomasz Grysztar. -; All rights reserved. - -dump_symbols: - mov edi,[code_start] - call setup_dump_header - mov esi,[input_file] - call copy_asciiz - cmp edi,[display_buffer] - jae out_of_memory - mov eax,edi - sub eax,ebx - mov [ebx-40h+0Ch],eax - mov esi,[output_file] - call copy_asciiz - cmp edi,[display_buffer] - jae out_of_memory - mov edx,[symbols_stream] - mov ebp,[free_additional_memory] - and [number_of_sections],0 - cmp [output_format],4 - je prepare_strings_table - cmp [output_format],5 - jne strings_table_ready - bt [format_flags],0 - jc strings_table_ready - prepare_strings_table: - cmp edx,ebp - je strings_table_ready - mov al,[edx] - test al,al - jz prepare_string - cmp al,80h - je prepare_string - add edx,0Ch - cmp al,0C0h - jb prepare_strings_table - add edx,4 - jmp prepare_strings_table - prepare_string: - mov esi,edi - sub esi,ebx - xchg esi,[edx+4] - test al,al - jz prepare_section_string - or dword [edx+4],1 shl 31 - add edx,0Ch - prepare_external_string: - mov ecx,[esi] - add esi,4 - rep movs byte [edi],[esi] - mov byte [edi],0 - inc edi - cmp edi,[display_buffer] - jae out_of_memory - jmp prepare_strings_table - prepare_section_string: - mov ecx,[number_of_sections] - mov eax,ecx - inc eax - mov [number_of_sections],eax - xchg eax,[edx+4] - shl ecx,2 - add ecx,[free_additional_memory] - mov [ecx],eax - add edx,20h - test esi,esi - jz prepare_default_section_string - cmp [output_format],5 - jne prepare_external_string - bt [format_flags],0 - jc prepare_external_string - mov esi,[esi] - add esi,[resource_data] - copy_elf_section_name: - lods byte [esi] - cmp edi,[display_buffer] - jae out_of_memory - stos byte [edi] - test al,al - jnz copy_elf_section_name - jmp prepare_strings_table - prepare_default_section_string: - mov eax,'.fla' - stos dword [edi] - mov ax,'t' - stos word [edi] - cmp edi,[display_buffer] - jae out_of_memory - jmp prepare_strings_table - strings_table_ready: - mov edx,[display_buffer] - mov ebp,[memory_end] - sub ebp,[labels_list] - add ebp,edx - prepare_labels_dump: - cmp edx,ebp - je labels_dump_ok - mov eax,[edx+24] - test eax,eax - jz label_dump_name_ok - cmp eax,[memory_start] - jb label_name_outside_source - cmp eax,[source_start] - ja label_name_outside_source - sub eax,[memory_start] - dec eax - mov [edx+24],eax - jmp label_dump_name_ok - label_name_outside_source: - mov esi,eax - mov eax,edi - sub eax,ebx - or eax,1 shl 31 - mov [edx+24],eax - movzx ecx,byte [esi-1] - lea eax,[edi+ecx+1] - cmp edi,[display_buffer] - jae out_of_memory - rep movsb - xor al,al - stosb - label_dump_name_ok: - mov eax,[edx+28] - test eax,eax - jz label_dump_line_ok - sub eax,[memory_start] - mov [edx+28],eax - label_dump_line_ok: - mov eax,[edx+20] - test eax,eax - jz base_symbol_for_label_ok - cmp eax,[symbols_stream] - mov eax,[eax+4] - jae base_symbol_for_label_ok - xor eax,eax - base_symbol_for_label_ok: - mov [edx+20],eax - mov ax,[current_pass] - cmp ax,[edx+16] - je label_defined_flag_ok - and byte [edx+8],not 1 - label_defined_flag_ok: - cmp ax,[edx+18] - je label_used_flag_ok - and byte [edx+8],not 8 - label_used_flag_ok: - add edx,LABEL_STRUCTURE_SIZE - jmp prepare_labels_dump - labels_dump_ok: - mov eax,edi - sub eax,ebx - mov [ebx-40h+14h],eax - add eax,40h - mov [ebx-40h+18h],eax - mov ecx,[memory_end] - sub ecx,[labels_list] - mov [ebx-40h+1Ch],ecx - add eax,ecx - mov [ebx-40h+20h],eax - mov ecx,[source_start] - sub ecx,[memory_start] - mov [ebx-40h+24h],ecx - add eax,ecx - mov [ebx-40h+28h],eax - mov eax,[number_of_sections] - shl eax,2 - mov [ebx-40h+34h],eax - call prepare_preprocessed_source - mov esi,[labels_list] - mov ebp,edi - make_lines_dump: - cmp esi,[display_buffer] - je lines_dump_ok - mov eax,[esi-4] - mov ecx,[esi-8] - sub esi,8 - sub esi,ecx - cmp eax,1 - je process_line_dump - cmp eax,2 - jne make_lines_dump - add dword [ebx-40h+3Ch],8 - jmp make_lines_dump - process_line_dump: - mov eax,[esi+4] - sub eax,[code_start] - add eax,[headers_size] - cmp byte [esi+1Ah],0 - je store_offset - xor eax,eax - store_offset: - stos dword [edi] - mov eax,[esi] - sub eax,[memory_start] - stos dword [edi] - mov eax,[esi+4] - xor edx,edx - xor cl,cl - sub eax,[esi+8] - sbb edx,[esi+8+4] - sbb cl,[esi+1Bh] - stos dword [edi] - mov eax,edx - stos dword [edi] - mov eax,[esi+10h] - stos dword [edi] - mov eax,[esi+14h] - test eax,eax - jz base_symbol_for_line_ok - cmp eax,[symbols_stream] - mov eax,[eax+4] - jae base_symbol_for_line_ok - xor eax,eax - base_symbol_for_line_ok: - stos dword [edi] - mov eax,[esi+18h] - and eax,01FFFFh - stos dword [edi] - mov [edi-1],cl - cmp edi,[display_buffer] - jae out_of_memory - mov eax,edi - sub eax,1Ch - sub eax,ebp - mov [esi],eax - jmp make_lines_dump - lines_dump_ok: - mov edx,edi - mov eax,[current_offset] - sub eax,[code_start] - add eax,[headers_size] - stos dword [edi] - mov ecx,edi - sub ecx,ebx - sub ecx,[ebx-40h+14h] - mov [ebx-40h+2Ch],ecx - add ecx,[ebx-40h+28h] - mov [ebx-40h+30h],ecx - add ecx,[ebx-40h+34h] - mov [ebx-40h+38h],ecx - find_inexisting_offsets: - sub edx,1Ch - cmp edx,ebp - jb write_symbols - test byte [edx+1Ah],1 - jnz find_inexisting_offsets - cmp eax,[edx] - jb correct_inexisting_offset - mov eax,[edx] - jmp find_inexisting_offsets - correct_inexisting_offset: - and dword [edx],0 - or byte [edx+1Ah],2 - jmp find_inexisting_offsets - write_symbols: - mov edx,[symbols_file] - call create - jc write_failed - mov edx,[code_start] - mov ecx,[edx+14h] - add ecx,40h - call write - jc write_failed - mov edx,[display_buffer] - mov ecx,[memory_end] - sub ecx,[labels_list] - call write - jc write_failed - mov edx,[memory_start] - mov ecx,[source_start] - sub ecx,edx - call write - jc write_failed - mov edx,ebp - mov ecx,edi - sub ecx,edx - call write - jc write_failed - mov edx,[free_additional_memory] - mov ecx,[number_of_sections] - shl ecx,2 - call write - jc write_failed - mov esi,[labels_list] - mov edi,[memory_start] - make_references_dump: - cmp esi,[display_buffer] - je references_dump_ok - mov eax,[esi-4] - mov ecx,[esi-8] - sub esi,8 - sub esi,ecx - cmp eax,2 - je dump_reference - cmp eax,1 - jne make_references_dump - mov edx,[esi] - jmp make_references_dump - dump_reference: - mov eax,[memory_end] - sub eax,[esi] - sub eax,LABEL_STRUCTURE_SIZE - stosd - mov eax,edx - stosd - cmp edi,[display_buffer] - jb make_references_dump - jmp out_of_memory - references_dump_ok: - mov edx,[memory_start] - mov ecx,edi - sub ecx,edx - call write - jc write_failed - call close - ret - setup_dump_header: - xor eax,eax - mov ecx,40h shr 2 - rep stos dword [edi] - mov ebx,edi - mov dword [ebx-40h],'fas'+1Ah shl 24 - mov dword [ebx-40h+4],VERSION_MAJOR + VERSION_MINOR shl 8 + 40h shl 16 - mov dword [ebx-40h+10h],40h - ret -prepare_preprocessed_source: - mov esi,[memory_start] - mov ebp,[source_start] - test ebp,ebp - jnz prepare_preprocessed_line - mov ebp,[current_line] - inc ebp - prepare_preprocessed_line: - cmp esi,ebp - jae preprocessed_source_ok - mov eax,[memory_start] - mov edx,[input_file] - cmp [esi],edx - jne line_not_from_main_input - mov [esi],eax - line_not_from_main_input: - sub [esi],eax - test byte [esi+7],1 shl 7 - jz prepare_next_preprocessed_line - sub [esi+8],eax - sub [esi+12],eax - prepare_next_preprocessed_line: - call skip_preprocessed_line - jmp prepare_preprocessed_line - preprocessed_source_ok: - ret - skip_preprocessed_line: - add esi,16 - skip_preprocessed_line_content: - lods byte [esi] - cmp al,1Ah - je skip_preprocessed_symbol - cmp al,3Bh - je skip_preprocessed_symbol - cmp al,22h - je skip_preprocessed_string - or al,al - jnz skip_preprocessed_line_content - ret - skip_preprocessed_string: - lods dword [esi] - add esi,eax - jmp skip_preprocessed_line_content - skip_preprocessed_symbol: - lods byte [esi] - movzx eax,al - add esi,eax - jmp skip_preprocessed_line_content -restore_preprocessed_source: - mov esi,[memory_start] - mov ebp,[source_start] - test ebp,ebp - jnz restore_preprocessed_line - mov ebp,[current_line] - inc ebp - restore_preprocessed_line: - cmp esi,ebp - jae preprocessed_source_restored - mov eax,[memory_start] - add [esi],eax - cmp [esi],eax - jne preprocessed_line_source_restored - mov edx,[input_file] - mov [esi],edx - preprocessed_line_source_restored: - test byte [esi+7],1 shl 7 - jz restore_next_preprocessed_line - add [esi+8],eax - add [esi+12],eax - restore_next_preprocessed_line: - call skip_preprocessed_line - jmp restore_preprocessed_line - preprocessed_source_restored: - ret -dump_preprocessed_source: - mov edi,[free_additional_memory] - call setup_dump_header - mov esi,[input_file] - call copy_asciiz - cmp edi,[additional_memory_end] - jae out_of_memory - mov eax,edi - sub eax,ebx - dec eax - mov [ebx-40h+0Ch],eax - mov eax,edi - sub eax,ebx - mov [ebx-40h+14h],eax - add eax,40h - mov [ebx-40h+20h],eax - call prepare_preprocessed_source - sub esi,[memory_start] - mov [ebx-40h+24h],esi - mov edx,[symbols_file] - call create - jc write_failed - mov edx,[free_additional_memory] - mov ecx,[edx+14h] - add ecx,40h - call write - jc write_failed - mov edx,[memory_start] - mov ecx,esi - call write - jc write_failed - call close + +; flat assembler core +; Copyright (c) 1999-2013, Tomasz Grysztar. +; All rights reserved. + +dump_symbols: + mov edi,[code_start] + call setup_dump_header + mov esi,[input_file] + call copy_asciiz + cmp edi,[tagged_blocks] + jae out_of_memory + mov eax,edi + sub eax,ebx + mov [ebx-40h+0Ch],eax + mov esi,[output_file] + call copy_asciiz + cmp edi,[tagged_blocks] + jae out_of_memory + mov edx,[symbols_stream] + mov ebp,[free_additional_memory] + and [number_of_sections],0 + cmp [output_format],4 + je prepare_strings_table + cmp [output_format],5 + jne strings_table_ready + bt [format_flags],0 + jc strings_table_ready + prepare_strings_table: + cmp edx,ebp + je strings_table_ready + mov al,[edx] + test al,al + jz prepare_string + cmp al,80h + je prepare_string + add edx,0Ch + cmp al,0C0h + jb prepare_strings_table + add edx,4 + jmp prepare_strings_table + prepare_string: + mov esi,edi + sub esi,ebx + xchg esi,[edx+4] + test al,al + jz prepare_section_string + or dword [edx+4],1 shl 31 + add edx,0Ch + prepare_external_string: + mov ecx,[esi] + add esi,4 + rep movs byte [edi],[esi] + mov byte [edi],0 + inc edi + cmp edi,[tagged_blocks] + jae out_of_memory + jmp prepare_strings_table + prepare_section_string: + mov ecx,[number_of_sections] + mov eax,ecx + inc eax + mov [number_of_sections],eax + xchg eax,[edx+4] + shl ecx,2 + add ecx,[free_additional_memory] + mov [ecx],eax + add edx,20h + test esi,esi + jz prepare_default_section_string + cmp [output_format],5 + jne prepare_external_string + bt [format_flags],0 + jc prepare_external_string + mov esi,[esi] + add esi,[resource_data] + copy_elf_section_name: + lods byte [esi] + cmp edi,[tagged_blocks] + jae out_of_memory + stos byte [edi] + test al,al + jnz copy_elf_section_name + jmp prepare_strings_table + prepare_default_section_string: + mov eax,'.fla' + stos dword [edi] + mov ax,'t' + stos word [edi] + cmp edi,[tagged_blocks] + jae out_of_memory + jmp prepare_strings_table + strings_table_ready: + mov edx,[tagged_blocks] + mov ebp,[memory_end] + sub ebp,[labels_list] + add ebp,edx + prepare_labels_dump: + cmp edx,ebp + je labels_dump_ok + mov eax,[edx+24] + test eax,eax + jz label_dump_name_ok + cmp eax,[memory_start] + jb label_name_outside_source + cmp eax,[source_start] + ja label_name_outside_source + sub eax,[memory_start] + dec eax + mov [edx+24],eax + jmp label_dump_name_ok + label_name_outside_source: + mov esi,eax + mov eax,edi + sub eax,ebx + or eax,1 shl 31 + mov [edx+24],eax + movzx ecx,byte [esi-1] + lea eax,[edi+ecx+1] + cmp edi,[tagged_blocks] + jae out_of_memory + rep movsb + xor al,al + stosb + label_dump_name_ok: + mov eax,[edx+28] + test eax,eax + jz label_dump_line_ok + sub eax,[memory_start] + mov [edx+28],eax + label_dump_line_ok: + test byte [edx+9],4 + jz convert_base_symbol_for_label + xor eax,eax + mov [edx],eax + mov [edx+4],eax + jmp base_symbol_for_label_ok + convert_base_symbol_for_label: + mov eax,[edx+20] + test eax,eax + jz base_symbol_for_label_ok + cmp eax,[symbols_stream] + mov eax,[eax+4] + jae base_symbol_for_label_ok + xor eax,eax + base_symbol_for_label_ok: + mov [edx+20],eax + mov ax,[current_pass] + cmp ax,[edx+16] + je label_defined_flag_ok + and byte [edx+8],not 1 + label_defined_flag_ok: + cmp ax,[edx+18] + je label_used_flag_ok + and byte [edx+8],not 8 + label_used_flag_ok: + add edx,LABEL_STRUCTURE_SIZE + jmp prepare_labels_dump + labels_dump_ok: + mov eax,edi + sub eax,ebx + mov [ebx-40h+14h],eax + add eax,40h + mov [ebx-40h+18h],eax + mov ecx,[memory_end] + sub ecx,[labels_list] + mov [ebx-40h+1Ch],ecx + add eax,ecx + mov [ebx-40h+20h],eax + mov ecx,[source_start] + sub ecx,[memory_start] + mov [ebx-40h+24h],ecx + add eax,ecx + mov [ebx-40h+28h],eax + mov eax,[number_of_sections] + shl eax,2 + mov [ebx-40h+34h],eax + call prepare_preprocessed_source + mov esi,[labels_list] + mov ebp,edi + make_lines_dump: + cmp esi,[tagged_blocks] + je lines_dump_ok + mov eax,[esi-4] + mov ecx,[esi-8] + sub esi,8 + sub esi,ecx + cmp eax,1 + je process_line_dump + cmp eax,2 + jne make_lines_dump + add dword [ebx-40h+3Ch],8 + jmp make_lines_dump + process_line_dump: + push ebx + mov ebx,[esi+8] + mov eax,[esi+4] + sub eax,[code_start] + add eax,[headers_size] + test byte [ebx+0Ah],1 + jz store_offset + xor eax,eax + store_offset: + stos dword [edi] + mov eax,[esi] + sub eax,[memory_start] + stos dword [edi] + mov eax,[esi+4] + xor edx,edx + xor cl,cl + sub eax,[ebx] + sbb edx,[ebx+4] + sbb cl,[ebx+8] + stos dword [edi] + mov eax,edx + stos dword [edi] + mov eax,[ebx+10h] + stos dword [edi] + mov eax,[ebx+14h] + test eax,eax + jz base_symbol_for_line_ok + cmp eax,[symbols_stream] + mov eax,[eax+4] + jae base_symbol_for_line_ok + xor eax,eax + base_symbol_for_line_ok: + stos dword [edi] + mov al,[ebx+9] + stos byte [edi] + mov al,[esi+10h] + stos byte [edi] + mov al,[ebx+0Ah] + and al,1 + stos byte [edi] + mov al,cl + stos byte [edi] + pop ebx + cmp edi,[tagged_blocks] + jae out_of_memory + mov eax,edi + sub eax,1Ch + sub eax,ebp + mov [esi],eax + jmp make_lines_dump + lines_dump_ok: + mov edx,edi + mov eax,[current_offset] + sub eax,[code_start] + add eax,[headers_size] + stos dword [edi] + mov ecx,edi + sub ecx,ebx + sub ecx,[ebx-40h+14h] + mov [ebx-40h+2Ch],ecx + add ecx,[ebx-40h+28h] + mov [ebx-40h+30h],ecx + add ecx,[ebx-40h+34h] + mov [ebx-40h+38h],ecx + find_inexisting_offsets: + sub edx,1Ch + cmp edx,ebp + jb write_symbols + test byte [edx+1Ah],1 + jnz find_inexisting_offsets + cmp eax,[edx] + jb correct_inexisting_offset + mov eax,[edx] + jmp find_inexisting_offsets + correct_inexisting_offset: + and dword [edx],0 + or byte [edx+1Ah],2 + jmp find_inexisting_offsets + write_symbols: + mov edx,[symbols_file] + call create + jc write_failed + mov edx,[code_start] + mov ecx,[edx+14h] + add ecx,40h + call write + jc write_failed + mov edx,[tagged_blocks] + mov ecx,[memory_end] + sub ecx,[labels_list] + call write + jc write_failed + mov edx,[memory_start] + mov ecx,[source_start] + sub ecx,edx + call write + jc write_failed + mov edx,ebp + mov ecx,edi + sub ecx,edx + call write + jc write_failed + mov edx,[free_additional_memory] + mov ecx,[number_of_sections] + shl ecx,2 + call write + jc write_failed + mov esi,[labels_list] + mov edi,[memory_start] + make_references_dump: + cmp esi,[tagged_blocks] + je references_dump_ok + mov eax,[esi-4] + mov ecx,[esi-8] + sub esi,8 + sub esi,ecx + cmp eax,2 + je dump_reference + cmp eax,1 + jne make_references_dump + mov edx,[esi] + jmp make_references_dump + dump_reference: + mov eax,[memory_end] + sub eax,[esi] + sub eax,LABEL_STRUCTURE_SIZE + stosd + mov eax,edx + stosd + cmp edi,[tagged_blocks] + jb make_references_dump + jmp out_of_memory + references_dump_ok: + mov edx,[memory_start] + mov ecx,edi + sub ecx,edx + call write + jc write_failed + call close + ret + setup_dump_header: + xor eax,eax + mov ecx,40h shr 2 + rep stos dword [edi] + mov ebx,edi + mov dword [ebx-40h],'fas'+1Ah shl 24 + mov dword [ebx-40h+4],VERSION_MAJOR + VERSION_MINOR shl 8 + 40h shl 16 + mov dword [ebx-40h+10h],40h + ret +prepare_preprocessed_source: + mov esi,[memory_start] + mov ebp,[source_start] + test ebp,ebp + jnz prepare_preprocessed_line + mov ebp,[current_line] + inc ebp + prepare_preprocessed_line: + cmp esi,ebp + jae preprocessed_source_ok + mov eax,[memory_start] + mov edx,[input_file] + cmp [esi],edx + jne line_not_from_main_input + mov [esi],eax + line_not_from_main_input: + sub [esi],eax + test byte [esi+7],1 shl 7 + jz prepare_next_preprocessed_line + sub [esi+8],eax + sub [esi+12],eax + prepare_next_preprocessed_line: + call skip_preprocessed_line + jmp prepare_preprocessed_line + preprocessed_source_ok: + ret + skip_preprocessed_line: + add esi,16 + skip_preprocessed_line_content: + lods byte [esi] + cmp al,1Ah + je skip_preprocessed_symbol + cmp al,3Bh + je skip_preprocessed_symbol + cmp al,22h + je skip_preprocessed_string + or al,al + jnz skip_preprocessed_line_content + ret + skip_preprocessed_string: + lods dword [esi] + add esi,eax + jmp skip_preprocessed_line_content + skip_preprocessed_symbol: + lods byte [esi] + movzx eax,al + add esi,eax + jmp skip_preprocessed_line_content +restore_preprocessed_source: + mov esi,[memory_start] + mov ebp,[source_start] + test ebp,ebp + jnz restore_preprocessed_line + mov ebp,[current_line] + inc ebp + restore_preprocessed_line: + cmp esi,ebp + jae preprocessed_source_restored + mov eax,[memory_start] + add [esi],eax + cmp [esi],eax + jne preprocessed_line_source_restored + mov edx,[input_file] + mov [esi],edx + preprocessed_line_source_restored: + test byte [esi+7],1 shl 7 + jz restore_next_preprocessed_line + add [esi+8],eax + add [esi+12],eax + restore_next_preprocessed_line: + call skip_preprocessed_line + jmp restore_preprocessed_line + preprocessed_source_restored: + ret +dump_preprocessed_source: + mov edi,[free_additional_memory] + call setup_dump_header + mov esi,[input_file] + call copy_asciiz + cmp edi,[additional_memory_end] + jae out_of_memory + mov eax,edi + sub eax,ebx + dec eax + mov [ebx-40h+0Ch],eax + mov eax,edi + sub eax,ebx + mov [ebx-40h+14h],eax + add eax,40h + mov [ebx-40h+20h],eax + call prepare_preprocessed_source + sub esi,[memory_start] + mov [ebx-40h+24h],esi + mov edx,[symbols_file] + call create + jc write_failed + mov edx,[free_additional_memory] + mov ecx,[edx+14h] + add ecx,40h + call write + jc write_failed + mov edx,[memory_start] + mov ecx,esi + call write + jc write_failed + call close ret \ No newline at end of file diff --git a/programs/develop/fasm/trunk/tables.inc b/programs/develop/fasm/trunk/tables.inc index 840851cf8..1d7359844 100644 --- a/programs/develop/fasm/trunk/tables.inc +++ b/programs/develop/fasm/trunk/tables.inc @@ -1,3402 +1,3412 @@ - -; flat assembler core -; Copyright (c) 1999-2012, Tomasz Grysztar. -; All rights reserved. - -include_variable db 'INCLUDE',0 - -symbol_characters db 27 - db 9,0Ah,0Dh,1Ah,20h,'+-/*=<>()[]{}:,|&~#`;\' - -preprocessor_directives: - db 6,'define' - dw define_symbolic_constant-directive_handler - db 7,'include' - dw include_file-directive_handler - db 3,'irp' - dw irp_directive-directive_handler - db 4,'irps' - dw irps_directive-directive_handler - db 5,'macro' - dw define_macro-directive_handler - db 5,'match' - dw match_directive-directive_handler - db 5,'purge' - dw purge_macro-directive_handler - db 4,'rept' - dw rept_directive-directive_handler - db 7,'restore' - dw restore_equ_constant-directive_handler - db 7,'restruc' - dw purge_struc-directive_handler - db 5,'struc' - dw define_struc-directive_handler - db 0 - -macro_directives: - db 6,'common' - dw common_block-directive_handler - db 7,'forward' - dw forward_block-directive_handler - db 5,'local' - dw local_symbols-directive_handler - db 7,'reverse' - dw reverse_block-directive_handler - db 0 - -operators: - db 1,'+',80h - db 1,'-',81h - db 1,'*',90h - db 1,'/',91h - db 3,'and',0B0h - db 3,'mod',0A0h - db 2,'or',0B1h - db 3,'shl',0C0h - db 3,'shr',0C1h - db 3,'xor',0B2h - db 0 - -single_operand_operators: - db 1,'+',82h - db 1,'-',83h - db 3,'not',0D0h - db 3,'plt',0E1h - db 3,'rva',0E0h - db 0 - -directive_operators: - db 5,'align',8Ch - db 2,'as',86h - db 2,'at',80h - db 7,'defined',88h - db 3,'dup',81h - db 2,'eq',0F0h - db 6,'eqtype',0F7h - db 4,'from',82h - db 2,'in',0F6h - db 2,'on',84h - db 3,'ptr',85h - db 10,'relativeto',0F8h - db 4,'used',89h - db 0 - -address_sizes: - db 4,'byte',1 - db 5,'dword',4 - db 5,'qword',8 - db 4,'word',2 - db 0 - -symbols: - dw symbols_2-symbols,(symbols_3-symbols_2)/(2+2) - dw symbols_3-symbols,(symbols_4-symbols_3)/(3+2) - dw symbols_4-symbols,(symbols_5-symbols_4)/(4+2) - dw symbols_5-symbols,(symbols_6-symbols_5)/(5+2) - dw symbols_6-symbols,(symbols_7-symbols_6)/(6+2) - dw symbols_7-symbols,(symbols_8-symbols_7)/(7+2) - dw symbols_8-symbols,(symbols_9-symbols_8)/(8+2) - dw symbols_9-symbols,(symbols_10-symbols_9)/(9+2) - dw symbols_10-symbols,(symbols_11-symbols_10)/(10+2) - dw symbols_11-symbols,(symbols_end-symbols_11)/(11+2) - -symbols_2: - db 'ah',10h,04h - db 'al',10h,10h - db 'ax',10h,20h - db 'bh',10h,07h - db 'bl',10h,13h - db 'bp',10h,25h - db 'bx',10h,23h - db 'ch',10h,05h - db 'cl',10h,11h - db 'cs',10h,62h - db 'cx',10h,21h - db 'dh',10h,06h - db 'di',10h,27h - db 'dl',10h,12h - db 'ds',10h,64h - db 'dx',10h,22h - db 'es',10h,61h - db 'fs',10h,65h - db 'gs',10h,66h - db 'ms',1Ch,41h - db 'mz',18h,20h - db 'nx',1Bh,83h - db 'pe',18h,30h - db 'r8',10h,88h - db 'r9',10h,89h - db 'si',10h,26h - db 'sp',10h,24h - db 'ss',10h,63h - db 'st',10h,0A0h -symbols_3: - db 'bpl',10h,15h - db 'cr0',10h,50h - db 'cr1',10h,51h - db 'cr2',10h,52h - db 'cr3',10h,53h - db 'cr4',10h,54h - db 'cr5',10h,55h - db 'cr6',10h,56h - db 'cr7',10h,57h - db 'cr8',10h,58h - db 'cr9',10h,59h - db 'dil',10h,17h - db 'dll',1Bh,80h - db 'dr0',10h,70h - db 'dr1',10h,71h - db 'dr2',10h,72h - db 'dr3',10h,73h - db 'dr4',10h,74h - db 'dr5',10h,75h - db 'dr6',10h,76h - db 'dr7',10h,77h - db 'dr8',10h,78h - db 'dr9',10h,79h - db 'eax',10h,40h - db 'ebp',10h,45h - db 'ebx',10h,43h - db 'ecx',10h,41h - db 'edi',10h,47h - db 'edx',10h,42h - db 'efi',1Bh,10 - db 'eip',10h,0F4h - db 'elf',18h,50h - db 'esi',10h,46h - db 'esp',10h,44h - db 'far',12h,3 - db 'gui',1Bh,2 - db 'mm0',10h,0B0h - db 'mm1',10h,0B1h - db 'mm2',10h,0B2h - db 'mm3',10h,0B3h - db 'mm4',10h,0B4h - db 'mm5',10h,0B5h - db 'mm6',10h,0B6h - db 'mm7',10h,0B7h - db 'r10',10h,8Ah - db 'r11',10h,8Bh - db 'r12',10h,8Ch - db 'r13',10h,8Dh - db 'r14',10h,8Eh - db 'r15',10h,8Fh - db 'r8b',10h,18h - db 'r8d',10h,48h - db 'r8l',10h,18h - db 'r8w',10h,28h - db 'r9b',10h,19h - db 'r9d',10h,49h - db 'r9l',10h,19h - db 'r9w',10h,29h - db 'rax',10h,80h - db 'rbp',10h,85h - db 'rbx',10h,83h - db 'rcx',10h,81h - db 'rdi',10h,87h - db 'rdx',10h,82h - db 'rip',10h,0F8h - db 'rsi',10h,86h - db 'rsp',10h,84h - db 'sil',10h,16h - db 'spl',10h,14h - db 'st0',10h,0A0h - db 'st1',10h,0A1h - db 'st2',10h,0A2h - db 'st3',10h,0A3h - db 'st4',10h,0A4h - db 'st5',10h,0A5h - db 'st6',10h,0A6h - db 'st7',10h,0A7h - db 'tr0',10h,90h - db 'tr1',10h,91h - db 'tr2',10h,92h - db 'tr3',10h,93h - db 'tr4',10h,94h - db 'tr5',10h,95h - db 'tr6',10h,96h - db 'tr7',10h,97h - db 'wdm',1Bh,81h -symbols_4: - db 'byte',11h,1 - db 'code',19h,5 - db 'coff',18h,40h - db 'cr10',10h,5Ah - db 'cr11',10h,5Bh - db 'cr12',10h,5Ch - db 'cr13',10h,5Dh - db 'cr14',10h,5Eh - db 'cr15',10h,5Fh - db 'data',19h,6 - db 'dr10',10h,7Ah - db 'dr11',10h,7Bh - db 'dr12',10h,7Ch - db 'dr13',10h,7Dh - db 'dr14',10h,7Eh - db 'dr15',10h,7Fh - db 'ms64',1Ch,49h - db 'near',12h,2 - db 'note',1Eh,4 - db 'pe64',18h,3Ch - db 'r10b',10h,1Ah - db 'r10d',10h,4Ah - db 'r10l',10h,1Ah - db 'r10w',10h,2Ah - db 'r11b',10h,1Bh - db 'r11d',10h,4Bh - db 'r11l',10h,1Bh - db 'r11w',10h,2Bh - db 'r12b',10h,1Ch - db 'r12d',10h,4Ch - db 'r12l',10h,1Ch - db 'r12w',10h,2Ch - db 'r13b',10h,1Dh - db 'r13d',10h,4Dh - db 'r13l',10h,1Dh - db 'r13w',10h,2Dh - db 'r14b',10h,1Eh - db 'r14d',10h,4Eh - db 'r14l',10h,1Eh - db 'r14w',10h,2Eh - db 'r15b',10h,1Fh - db 'r15d',10h,4Fh - db 'r15l',10h,1Fh - db 'r15w',10h,2Fh - db 'word',11h,2 - db 'xmm0',10h,0C0h - db 'xmm1',10h,0C1h - db 'xmm2',10h,0C2h - db 'xmm3',10h,0C3h - db 'xmm4',10h,0C4h - db 'xmm5',10h,0C5h - db 'xmm6',10h,0C6h - db 'xmm7',10h,0C7h - db 'xmm8',10h,0C8h - db 'xmm9',10h,0C9h - db 'ymm0',10h,0D0h - db 'ymm1',10h,0D1h - db 'ymm2',10h,0D2h - db 'ymm3',10h,0D3h - db 'ymm4',10h,0D4h - db 'ymm5',10h,0D5h - db 'ymm6',10h,0D6h - db 'ymm7',10h,0D7h - db 'ymm8',10h,0D8h - db 'ymm9',10h,0D9h -symbols_5: - db 'dword',11h,4 - db 'elf64',18h,58h - db 'fword',11h,6 - db 'large',1Bh,82h - db 'pword',11h,6 - db 'qword',11h,8 - db 'short',12h,1 - db 'tbyte',11h,0Ah - db 'tword',11h,0Ah - db 'use16',13h,16 - db 'use32',13h,32 - db 'use64',13h,64 - db 'xmm10',10h,0CAh - db 'xmm11',10h,0CBh - db 'xmm12',10h,0CCh - db 'xmm13',10h,0CDh - db 'xmm14',10h,0CEh - db 'xmm15',10h,0CFh - db 'xword',11h,16 - db 'ymm10',10h,0DAh - db 'ymm11',10h,0DBh - db 'ymm12',10h,0DCh - db 'ymm13',10h,0DDh - db 'ymm14',10h,0DEh - db 'ymm15',10h,0DFh - db 'yword',11h,32 -symbols_6: - db 'binary',18h,10h - db 'dqword',11h,16 - db 'export',1Ah,0 - db 'fixups',1Ah,5 - db 'import',1Ah,1 - db 'native',1Bh,1 - db 'qqword',11h,32 - db 'static',1Dh,1 -symbols_7: - db 'console',1Bh,3 - db 'dynamic',1Eh,2 - db 'efiboot',1Bh,11 -symbols_8: - db 'linkinfo',19h,9 - db 'readable',19h,30 - db 'resource',1Ah,2 - db 'writable',19h,31 -symbols_9: - db 'shareable',19h,28 - db 'writeable',19h,31 -symbols_10: - db 'efiruntime',1Bh,12 - db 'executable',19h,29 - db 'linkremove',19h,11 -symbols_11: - db 'discardable',19h,25 - db 'interpreter',1Eh,3 - db 'notpageable',19h,27 -symbols_end: - -instructions: - dw instructions_2-instructions,(instructions_3-instructions_2)/(2+3) - dw instructions_3-instructions,(instructions_4-instructions_3)/(3+3) - dw instructions_4-instructions,(instructions_5-instructions_4)/(4+3) - dw instructions_5-instructions,(instructions_6-instructions_5)/(5+3) - dw instructions_6-instructions,(instructions_7-instructions_6)/(6+3) - dw instructions_7-instructions,(instructions_8-instructions_7)/(7+3) - dw instructions_8-instructions,(instructions_9-instructions_8)/(8+3) - dw instructions_9-instructions,(instructions_10-instructions_9)/(9+3) - dw instructions_10-instructions,(instructions_11-instructions_10)/(10+3) - dw instructions_11-instructions,(instructions_12-instructions_11)/(11+3) - dw instructions_12-instructions,(instructions_13-instructions_12)/(12+3) - dw instructions_13-instructions,(instructions_14-instructions_13)/(13+3) - dw instructions_14-instructions,(instructions_15-instructions_14)/(14+3) - dw instructions_15-instructions,(instructions_16-instructions_15)/(15+3) - dw instructions_16-instructions,(instructions_end-instructions_16)/(16+3) - -instructions_2: - db 'bt',4 - dw bt_instruction-instruction_handler - db 'if',0 - dw if_directive-instruction_handler - db 'in',0 - dw in_instruction-instruction_handler - db 'ja',77h - dw conditional_jump-instruction_handler - db 'jb',72h - dw conditional_jump-instruction_handler - db 'jc',72h - dw conditional_jump-instruction_handler - db 'je',74h - dw conditional_jump-instruction_handler - db 'jg',7Fh - dw conditional_jump-instruction_handler - db 'jl',7Ch - dw conditional_jump-instruction_handler - db 'jo',70h - dw conditional_jump-instruction_handler - db 'jp',7Ah - dw conditional_jump-instruction_handler - db 'js',78h - dw conditional_jump-instruction_handler - db 'jz',74h - dw conditional_jump-instruction_handler - db 'or',08h - dw basic_instruction-instruction_handler -instructions_3: - db 'aaa',37h - dw simple_instruction_except64-instruction_handler - db 'aad',0D5h - dw aa_instruction-instruction_handler - db 'aam',0D4h - dw aa_instruction-instruction_handler - db 'aas',3Fh - dw simple_instruction_except64-instruction_handler - db 'adc',10h - dw basic_instruction-instruction_handler - db 'add',00h - dw basic_instruction-instruction_handler - db 'and',20h - dw basic_instruction-instruction_handler - db 'bsf',0BCh - dw bs_instruction-instruction_handler - db 'bsr',0BDh - dw bs_instruction-instruction_handler - db 'btc',7 - dw bt_instruction-instruction_handler - db 'btr',6 - dw bt_instruction-instruction_handler - db 'bts',5 - dw bt_instruction-instruction_handler - db 'cbw',98h - dw simple_instruction_16bit-instruction_handler - db 'cdq',99h - dw simple_instruction_32bit-instruction_handler - db 'clc',0F8h - dw simple_instruction-instruction_handler - db 'cld',0FCh - dw simple_instruction-instruction_handler - db 'cli',0FAh - dw simple_instruction-instruction_handler - db 'cmc',0F5h - dw simple_instruction-instruction_handler - db 'cmp',38h - dw basic_instruction-instruction_handler - db 'cqo',99h - dw simple_instruction_64bit-instruction_handler - db 'cwd',99h - dw simple_instruction_16bit-instruction_handler - db 'daa',27h - dw simple_instruction_except64-instruction_handler - db 'das',2Fh - dw simple_instruction_except64-instruction_handler - db 'dec',1 - dw inc_instruction-instruction_handler - db 'div',6 - dw single_operand_instruction-instruction_handler - db 'end',0 - dw end_directive-instruction_handler - db 'err',0 - dw err_directive-instruction_handler - db 'fld',0 - dw fld_instruction-instruction_handler - db 'fst',2 - dw fld_instruction-instruction_handler - db 'hlt',0F4h - dw simple_instruction-instruction_handler - db 'inc',0 - dw inc_instruction-instruction_handler - db 'ins',6Ch - dw ins_instruction-instruction_handler - db 'int',0CDh - dw int_instruction-instruction_handler - db 'jae',73h - dw conditional_jump-instruction_handler - db 'jbe',76h - dw conditional_jump-instruction_handler - db 'jge',7Dh - dw conditional_jump-instruction_handler - db 'jle',7Eh - dw conditional_jump-instruction_handler - db 'jmp',0 - dw jmp_instruction-instruction_handler - db 'jna',76h - dw conditional_jump-instruction_handler - db 'jnb',73h - dw conditional_jump-instruction_handler - db 'jnc',73h - dw conditional_jump-instruction_handler - db 'jne',75h - dw conditional_jump-instruction_handler - db 'jng',7Eh - dw conditional_jump-instruction_handler - db 'jnl',7Dh - dw conditional_jump-instruction_handler - db 'jno',71h - dw conditional_jump-instruction_handler - db 'jnp',7Bh - dw conditional_jump-instruction_handler - db 'jns',79h - dw conditional_jump-instruction_handler - db 'jnz',75h - dw conditional_jump-instruction_handler - db 'jpe',7Ah - dw conditional_jump-instruction_handler - db 'jpo',7Bh - dw conditional_jump-instruction_handler - db 'lar',2 - dw lar_instruction-instruction_handler - db 'lds',3 - dw ls_instruction-instruction_handler - db 'lea',0 - dw lea_instruction-instruction_handler - db 'les',0 - dw ls_instruction-instruction_handler - db 'lfs',4 - dw ls_instruction-instruction_handler - db 'lgs',5 - dw ls_instruction-instruction_handler - db 'lsl',3 - dw lar_instruction-instruction_handler - db 'lss',2 - dw ls_instruction-instruction_handler - db 'ltr',3 - dw pm_word_instruction-instruction_handler - db 'mov',0 - dw mov_instruction-instruction_handler - db 'mul',4 - dw single_operand_instruction-instruction_handler - db 'neg',3 - dw single_operand_instruction-instruction_handler - db 'nop',90h - dw nop_instruction-instruction_handler - db 'not',2 - dw single_operand_instruction-instruction_handler - db 'org',0 - dw org_directive-instruction_handler - db 'out',0 - dw out_instruction-instruction_handler - db 'pop',0 - dw pop_instruction-instruction_handler - db 'por',0EBh - dw basic_mmx_instruction-instruction_handler - db 'rcl',2 - dw sh_instruction-instruction_handler - db 'rcr',3 - dw sh_instruction-instruction_handler - db 'rep',0F3h - dw prefix_instruction-instruction_handler - db 'ret',0C2h - dw ret_instruction-instruction_handler - db 'rol',0 - dw sh_instruction-instruction_handler - db 'ror',1 - dw sh_instruction-instruction_handler - db 'rsm',0AAh - dw simple_extended_instruction-instruction_handler - db 'sal',4 - dw sh_instruction-instruction_handler - db 'sar',7 - dw sh_instruction-instruction_handler - db 'sbb',18h - dw basic_instruction-instruction_handler - db 'shl',4 - dw sh_instruction-instruction_handler - db 'shr',5 - dw sh_instruction-instruction_handler - db 'stc',0F9h - dw simple_instruction-instruction_handler - db 'std',0FDh - dw simple_instruction-instruction_handler - db 'sti',0FBh - dw simple_instruction-instruction_handler - db 'str',1 - dw pm_store_word_instruction-instruction_handler - db 'sub',28h - dw basic_instruction-instruction_handler - db 'ud2',0Bh - dw simple_extended_instruction-instruction_handler - db 'xor',30h - dw basic_instruction-instruction_handler -instructions_4: - db 'andn',0F2h - dw andn_instruction-instruction_handler - db 'arpl',0 - dw arpl_instruction-instruction_handler - db 'blci',26h - dw tbm_instruction-instruction_handler - db 'blcs',13h - dw tbm_instruction-instruction_handler - db 'blsi',3 - dw bmi_instruction-instruction_handler - db 'blsr',1 - dw bmi_instruction-instruction_handler - db 'bzhi',0F5h - dw bzhi_instruction-instruction_handler - db 'call',0 - dw call_instruction-instruction_handler - db 'cdqe',98h - dw simple_instruction_64bit-instruction_handler - db 'clgi',0DDh - dw simple_vmx_instruction-instruction_handler - db 'clts',6 - dw simple_extended_instruction-instruction_handler - db 'cmps',0A6h - dw cmps_instruction-instruction_handler - db 'cwde',98h - dw simple_instruction_32bit-instruction_handler - db 'data',0 - dw data_directive-instruction_handler - db 'dppd',41h - dw sse4_instruction_3a_imm8-instruction_handler - db 'dpps',40h - dw sse4_instruction_3a_imm8-instruction_handler - db 'else',0 - dw else_directive-instruction_handler - db 'emms',77h - dw simple_extended_instruction-instruction_handler - db 'fabs',100001b - dw simple_fpu_instruction-instruction_handler - db 'fadd',0 - dw basic_fpu_instruction-instruction_handler - db 'fbld',4 - dw fbld_instruction-instruction_handler - db 'fchs',100000b - dw simple_fpu_instruction-instruction_handler - db 'fcom',2 - dw basic_fpu_instruction-instruction_handler - db 'fcos',111111b - dw simple_fpu_instruction-instruction_handler - db 'fdiv',6 - dw basic_fpu_instruction-instruction_handler - db 'feni',0E0h - dw finit_instruction-instruction_handler - db 'fild',0 - dw fild_instruction-instruction_handler - db 'fist',2 - dw fild_instruction-instruction_handler - db 'fld1',101000b - dw simple_fpu_instruction-instruction_handler - db 'fldz',101110b - dw simple_fpu_instruction-instruction_handler - db 'fmul',1 - dw basic_fpu_instruction-instruction_handler - db 'fnop',010000b - dw simple_fpu_instruction-instruction_handler - db 'fsin',111110b - dw simple_fpu_instruction-instruction_handler - db 'fstp',3 - dw fld_instruction-instruction_handler - db 'fsub',4 - dw basic_fpu_instruction-instruction_handler - db 'ftst',100100b - dw simple_fpu_instruction-instruction_handler - db 'fxam',100101b - dw simple_fpu_instruction-instruction_handler - db 'fxch',0 - dw fxch_instruction-instruction_handler - db 'heap',0 - dw heap_directive-instruction_handler - db 'idiv',7 - dw single_operand_instruction-instruction_handler - db 'imul',0 - dw imul_instruction-instruction_handler - db 'insb',6Ch - dw simple_instruction-instruction_handler - db 'insd',6Dh - dw simple_instruction_32bit-instruction_handler - db 'insw',6Dh - dw simple_instruction_16bit-instruction_handler - db 'int1',0F1h - dw simple_instruction-instruction_handler - db 'int3',0CCh - dw simple_instruction-instruction_handler - db 'into',0CEh - dw simple_instruction_except64-instruction_handler - db 'invd',8 - dw simple_extended_instruction-instruction_handler - db 'iret',0CFh - dw iret_instruction-instruction_handler - db 'jcxz',0E3h - dw loop_instruction_16bit-instruction_handler - db 'jnae',72h - dw conditional_jump-instruction_handler - db 'jnbe',77h - dw conditional_jump-instruction_handler - db 'jnge',7Ch - dw conditional_jump-instruction_handler - db 'jnle',7Fh - dw conditional_jump-instruction_handler - db 'lahf',9Fh - dw simple_instruction-instruction_handler - db 'lgdt',2 - dw lgdt_instruction-instruction_handler - db 'lidt',3 - dw lgdt_instruction-instruction_handler - db 'lldt',2 - dw pm_word_instruction-instruction_handler - db 'lmsw',16h - dw pm_word_instruction-instruction_handler - db 'load',0 - dw load_directive-instruction_handler - db 'lock',0F0h - dw prefix_instruction-instruction_handler - db 'lods',0ACh - dw lods_instruction-instruction_handler - db 'loop',0E2h - dw loop_instruction-instruction_handler - db 'movd',0 - dw movd_instruction-instruction_handler - db 'movq',0 - dw movq_instruction-instruction_handler - db 'movs',0A4h - dw movs_instruction-instruction_handler - db 'mulx',0F6h - dw pdep_instruction-instruction_handler - db 'orpd',56h - dw sse_pd_instruction-instruction_handler - db 'orps',56h - dw sse_ps_instruction-instruction_handler - db 'outs',6Eh - dw outs_instruction-instruction_handler - db 'pand',0DBh - dw basic_mmx_instruction-instruction_handler - db 'pdep',0F5h - dw pdep_instruction-instruction_handler - db 'pext',0F5h - dw pext_instruction-instruction_handler - db 'popa',61h - dw simple_instruction_except64-instruction_handler - db 'popd',4 - dw pop_instruction-instruction_handler - db 'popf',9Dh - dw simple_instruction-instruction_handler - db 'popq',8 - dw pop_instruction-instruction_handler - db 'popw',2 - dw pop_instruction-instruction_handler - db 'push',0 - dw push_instruction-instruction_handler - db 'pxor',0EFh - dw basic_mmx_instruction-instruction_handler - db 'repe',0F3h - dw prefix_instruction-instruction_handler - db 'repz',0F3h - dw prefix_instruction-instruction_handler - db 'retd',0C2h - dw ret_instruction_32bit_except64-instruction_handler - db 'retf',0CAh - dw retf_instruction-instruction_handler - db 'retn',0C2h - dw ret_instruction-instruction_handler - db 'retq',0C2h - dw ret_instruction_only64-instruction_handler - db 'retw',0C2h - dw ret_instruction_16bit-instruction_handler - db 'rorx',0F0h - dw rorx_instruction-instruction_handler - db 'sahf',9Eh - dw simple_instruction-instruction_handler - db 'salc',0D6h - dw simple_instruction_except64-instruction_handler - db 'sarx',0F7h - dw sarx_instruction-instruction_handler - db 'scas',0AEh - dw stos_instruction-instruction_handler - db 'seta',97h - dw set_instruction-instruction_handler - db 'setb',92h - dw set_instruction-instruction_handler - db 'setc',92h - dw set_instruction-instruction_handler - db 'sete',94h - dw set_instruction-instruction_handler - db 'setg',9Fh - dw set_instruction-instruction_handler - db 'setl',9Ch - dw set_instruction-instruction_handler - db 'seto',90h - dw set_instruction-instruction_handler - db 'setp',9Ah - dw set_instruction-instruction_handler - db 'sets',98h - dw set_instruction-instruction_handler - db 'setz',94h - dw set_instruction-instruction_handler - db 'sgdt',0 - dw lgdt_instruction-instruction_handler - db 'shld',0A4h - dw shd_instruction-instruction_handler - db 'shlx',0F7h - dw shlx_instruction-instruction_handler - db 'shrd',0ACh - dw shd_instruction-instruction_handler - db 'shrx',0F7h - dw shrx_instruction-instruction_handler - db 'sidt',1 - dw lgdt_instruction-instruction_handler - db 'sldt',0 - dw pm_store_word_instruction-instruction_handler - db 'smsw',14h - dw pm_store_word_instruction-instruction_handler - db 'stgi',0DCh - dw simple_vmx_instruction-instruction_handler - db 'stos',0AAh - dw stos_instruction-instruction_handler - db 'test',0 - dw test_instruction-instruction_handler - db 'verr',4 - dw pm_word_instruction-instruction_handler - db 'verw',5 - dw pm_word_instruction-instruction_handler - db 'vpor',0EBh - dw avx_pd_instruction-instruction_handler - db 'wait',9Bh - dw simple_instruction-instruction_handler - db 'xadd',0C0h - dw basic_486_instruction-instruction_handler - db 'xchg',0 - dw xchg_instruction-instruction_handler - db 'xend',0D5h - dw simple_vmx_instruction-instruction_handler - db 'xlat',0D7h - dw xlat_instruction-instruction_handler -instructions_5: - db 'addpd',58h - dw sse_pd_instruction-instruction_handler - db 'addps',58h - dw sse_ps_instruction-instruction_handler - db 'addsd',58h - dw sse_sd_instruction-instruction_handler - db 'addss',58h - dw sse_ss_instruction-instruction_handler - db 'align',0 - dw align_directive-instruction_handler - db 'andpd',54h - dw sse_pd_instruction-instruction_handler - db 'andps',54h - dw sse_ps_instruction-instruction_handler - db 'bextr',0F7h - dw bextr_instruction-instruction_handler - db 'blcic',15h - dw tbm_instruction-instruction_handler - db 'blsic',16h - dw tbm_instruction-instruction_handler - db 'bound',0 - dw bound_instruction-instruction_handler - db 'break',0 - dw break_directive-instruction_handler - db 'bswap',0 - dw bswap_instruction-instruction_handler - db 'cmova',47h - dw bs_instruction-instruction_handler - db 'cmovb',42h - dw bs_instruction-instruction_handler - db 'cmovc',42h - dw bs_instruction-instruction_handler - db 'cmove',44h - dw bs_instruction-instruction_handler - db 'cmovg',4Fh - dw bs_instruction-instruction_handler - db 'cmovl',4Ch - dw bs_instruction-instruction_handler - db 'cmovo',40h - dw bs_instruction-instruction_handler - db 'cmovp',4Ah - dw bs_instruction-instruction_handler - db 'cmovs',48h - dw bs_instruction-instruction_handler - db 'cmovz',44h - dw bs_instruction-instruction_handler - db 'cmppd',-1 - dw cmp_pd_instruction-instruction_handler - db 'cmpps',-1 - dw cmp_ps_instruction-instruction_handler - db 'cmpsb',0A6h - dw simple_instruction-instruction_handler - db 'cmpsd',-1 - dw cmpsd_instruction-instruction_handler - db 'cmpsq',0A7h - dw simple_instruction_64bit-instruction_handler - db 'cmpss',-1 - dw cmp_ss_instruction-instruction_handler - db 'cmpsw',0A7h - dw simple_instruction_16bit-instruction_handler - db 'cpuid',0A2h - dw simple_extended_instruction-instruction_handler - db 'crc32',0 - dw crc32_instruction-instruction_handler - db 'divpd',5Eh - dw sse_pd_instruction-instruction_handler - db 'divps',5Eh - dw sse_ps_instruction-instruction_handler - db 'divsd',5Eh - dw sse_sd_instruction-instruction_handler - db 'divss',5Eh - dw sse_ss_instruction-instruction_handler - db 'enter',0 - dw enter_instruction-instruction_handler - db 'entry',0 - dw entry_directive-instruction_handler - db 'extrn',0 - dw extrn_directive-instruction_handler - db 'extrq',0 - dw extrq_instruction-instruction_handler - db 'f2xm1',110000b - dw simple_fpu_instruction-instruction_handler - db 'faddp',0 - dw faddp_instruction-instruction_handler - db 'fbstp',6 - dw fbld_instruction-instruction_handler - db 'fclex',0E2h - dw finit_instruction-instruction_handler - db 'fcomi',0F0h - dw fcomi_instruction-instruction_handler - db 'fcomp',3 - dw basic_fpu_instruction-instruction_handler - db 'fdisi',0E1h - dw finit_instruction-instruction_handler - db 'fdivp',7 - dw faddp_instruction-instruction_handler - db 'fdivr',7 - dw basic_fpu_instruction-instruction_handler - db 'femms',0Eh - dw simple_extended_instruction-instruction_handler - db 'ffree',0 - dw ffree_instruction-instruction_handler - db 'fiadd',0 - dw fi_instruction-instruction_handler - db 'ficom',2 - dw fi_instruction-instruction_handler - db 'fidiv',6 - dw fi_instruction-instruction_handler - db 'fimul',1 - dw fi_instruction-instruction_handler - db 'finit',0E3h - dw finit_instruction-instruction_handler - db 'fistp',3 - dw fild_instruction-instruction_handler - db 'fisub',4 - dw fi_instruction-instruction_handler - db 'fldcw',5 - dw fldcw_instruction-instruction_handler - db 'fldpi',101011b - dw simple_fpu_instruction-instruction_handler - db 'fmulp',1 - dw faddp_instruction-instruction_handler - db 'fneni',0E0h - dw fninit_instruction-instruction_handler - db 'fprem',111000b - dw simple_fpu_instruction-instruction_handler - db 'fptan',110010b - dw simple_fpu_instruction-instruction_handler - db 'fsave',6 - dw fsave_instruction-instruction_handler - db 'fsqrt',111010b - dw simple_fpu_instruction-instruction_handler - db 'fstcw',7 - dw fstcw_instruction-instruction_handler - db 'fstsw',0 - dw fstsw_instruction-instruction_handler - db 'fsubp',5 - dw faddp_instruction-instruction_handler - db 'fsubr',5 - dw basic_fpu_instruction-instruction_handler - db 'fucom',4 - dw ffree_instruction-instruction_handler - db 'fwait',9Bh - dw simple_instruction-instruction_handler - db 'fyl2x',110001b - dw simple_fpu_instruction-instruction_handler - db 'icebp',0F1h - dw simple_instruction-instruction_handler - db 'iretd',0CFh - dw simple_instruction_32bit-instruction_handler - db 'iretq',0CFh - dw simple_instruction_64bit-instruction_handler - db 'iretw',0CFh - dw simple_instruction_16bit-instruction_handler - db 'jecxz',0E3h - dw loop_instruction_32bit-instruction_handler - db 'jrcxz',0E3h - dw loop_instruction_64bit-instruction_handler - db 'label',0 - dw label_directive-instruction_handler - db 'lddqu',0 - dw lddqu_instruction-instruction_handler - db 'leave',0C9h - dw simple_instruction-instruction_handler - db 'lodsb',0ACh - dw simple_instruction-instruction_handler - db 'lodsd',0ADh - dw simple_instruction_32bit-instruction_handler - db 'lodsq',0ADh - dw simple_instruction_64bit-instruction_handler - db 'lodsw',0ADh - dw simple_instruction_16bit-instruction_handler - db 'loopd',0E2h - dw loop_instruction_32bit-instruction_handler - db 'loope',0E1h - dw loop_instruction-instruction_handler - db 'loopq',0E2h - dw loop_instruction_64bit-instruction_handler - db 'loopw',0E2h - dw loop_instruction_16bit-instruction_handler - db 'loopz',0E1h - dw loop_instruction-instruction_handler - db 'lzcnt',0BDh - dw popcnt_instruction-instruction_handler - db 'maxpd',5Fh - dw sse_pd_instruction-instruction_handler - db 'maxps',5Fh - dw sse_ps_instruction-instruction_handler - db 'maxsd',5Fh - dw sse_sd_instruction-instruction_handler - db 'maxss',5Fh - dw sse_ss_instruction-instruction_handler - db 'minpd',5Dh - dw sse_pd_instruction-instruction_handler - db 'minps',5Dh - dw sse_ps_instruction-instruction_handler - db 'minsd',5Dh - dw sse_sd_instruction-instruction_handler - db 'minss',5Dh - dw sse_ss_instruction-instruction_handler - db 'movbe',0F0h - dw movbe_instruction-instruction_handler - db 'movsb',0A4h - dw simple_instruction-instruction_handler - db 'movsd',0 - dw movsd_instruction-instruction_handler - db 'movsq',0A5h - dw simple_instruction_64bit-instruction_handler - db 'movss',0 - dw movss_instruction-instruction_handler - db 'movsw',0A5h - dw simple_instruction_16bit-instruction_handler - db 'movsx',0BEh - dw movx_instruction-instruction_handler - db 'movzx',0B6h - dw movx_instruction-instruction_handler - db 'mulpd',59h - dw sse_pd_instruction-instruction_handler - db 'mulps',59h - dw sse_ps_instruction-instruction_handler - db 'mulsd',59h - dw sse_sd_instruction-instruction_handler - db 'mulss',59h - dw sse_ss_instruction-instruction_handler - db 'mwait',0C9h - dw monitor_instruction-instruction_handler - db 'outsb',6Eh - dw simple_instruction-instruction_handler - db 'outsd',6Fh - dw simple_instruction_32bit-instruction_handler - db 'outsw',6Fh - dw simple_instruction_16bit-instruction_handler - db 'pabsb',1Ch - dw ssse3_instruction-instruction_handler - db 'pabsd',1Eh - dw ssse3_instruction-instruction_handler - db 'pabsw',1Dh - dw ssse3_instruction-instruction_handler - db 'paddb',0FCh - dw basic_mmx_instruction-instruction_handler - db 'paddd',0FEh - dw basic_mmx_instruction-instruction_handler - db 'paddq',0D4h - dw basic_mmx_instruction-instruction_handler - db 'paddw',0FDh - dw basic_mmx_instruction-instruction_handler - db 'pandn',0DFh - dw basic_mmx_instruction-instruction_handler - db 'pause',0 - dw pause_instruction-instruction_handler - db 'pavgb',0E0h - dw basic_mmx_instruction-instruction_handler - db 'pavgw',0E3h - dw basic_mmx_instruction-instruction_handler - db 'pf2id',1Dh - dw amd3dnow_instruction-instruction_handler - db 'pf2iw',1Ch - dw amd3dnow_instruction-instruction_handler - db 'pfacc',0AEh - dw amd3dnow_instruction-instruction_handler - db 'pfadd',9Eh - dw amd3dnow_instruction-instruction_handler - db 'pfmax',0A4h - dw amd3dnow_instruction-instruction_handler - db 'pfmin',94h - dw amd3dnow_instruction-instruction_handler - db 'pfmul',0B4h - dw amd3dnow_instruction-instruction_handler - db 'pfrcp',96h - dw amd3dnow_instruction-instruction_handler - db 'pfsub',9Ah - dw amd3dnow_instruction-instruction_handler - db 'pi2fd',0Dh - dw amd3dnow_instruction-instruction_handler - db 'pi2fw',0Ch - dw amd3dnow_instruction-instruction_handler - db 'popad',61h - dw simple_instruction_32bit_except64-instruction_handler - db 'popaw',61h - dw simple_instruction_16bit_except64-instruction_handler - db 'popfd',9Dh - dw simple_instruction_32bit_except64-instruction_handler - db 'popfq',9Dh - dw simple_instruction_only64-instruction_handler - db 'popfw',9Dh - dw simple_instruction_16bit-instruction_handler - db 'pslld',0F2h - dw mmx_bit_shift_instruction-instruction_handler - db 'psllq',0F3h - dw mmx_bit_shift_instruction-instruction_handler - db 'psllw',0F1h - dw mmx_bit_shift_instruction-instruction_handler - db 'psrad',0E2h - dw mmx_bit_shift_instruction-instruction_handler - db 'psraw',0E1h - dw mmx_bit_shift_instruction-instruction_handler - db 'psrld',0D2h - dw mmx_bit_shift_instruction-instruction_handler - db 'psrlq',0D3h - dw mmx_bit_shift_instruction-instruction_handler - db 'psrlw',0D1h - dw mmx_bit_shift_instruction-instruction_handler - db 'psubb',0F8h - dw basic_mmx_instruction-instruction_handler - db 'psubd',0FAh - dw basic_mmx_instruction-instruction_handler - db 'psubq',0FBh - dw basic_mmx_instruction-instruction_handler - db 'psubw',0F9h - dw basic_mmx_instruction-instruction_handler - db 'ptest',17h - dw sse4_instruction_38-instruction_handler - db 'pusha',60h - dw simple_instruction_except64-instruction_handler - db 'pushd',4 - dw push_instruction-instruction_handler - db 'pushf',9Ch - dw simple_instruction-instruction_handler - db 'pushq',8 - dw push_instruction-instruction_handler - db 'pushw',2 - dw push_instruction-instruction_handler - db 'rcpps',53h - dw sse_ps_instruction-instruction_handler - db 'rcpss',53h - dw sse_ss_instruction-instruction_handler - db 'rdmsr',32h - dw simple_extended_instruction-instruction_handler - db 'rdpmc',33h - dw simple_extended_instruction-instruction_handler - db 'rdtsc',31h - dw simple_extended_instruction-instruction_handler - db 'repne',0F2h - dw prefix_instruction-instruction_handler - db 'repnz',0F2h - dw prefix_instruction-instruction_handler - db 'retfd',0CAh - dw ret_instruction_32bit-instruction_handler - db 'retfq',0CAh - dw ret_instruction_64bit-instruction_handler - db 'retfw',0CAh - dw ret_instruction_16bit-instruction_handler - db 'retnd',0C2h - dw ret_instruction_32bit_except64-instruction_handler - db 'retnq',0C2h - dw ret_instruction_only64-instruction_handler - db 'retnw',0C2h - dw ret_instruction_16bit-instruction_handler - db 'scasb',0AEh - dw simple_instruction-instruction_handler - db 'scasd',0AFh - dw simple_instruction_32bit-instruction_handler - db 'scasq',0AFh - dw simple_instruction_64bit-instruction_handler - db 'scasw',0AFh - dw simple_instruction_16bit-instruction_handler - db 'setae',93h - dw set_instruction-instruction_handler - db 'setbe',96h - dw set_instruction-instruction_handler - db 'setge',9Dh - dw set_instruction-instruction_handler - db 'setle',9Eh - dw set_instruction-instruction_handler - db 'setna',96h - dw set_instruction-instruction_handler - db 'setnb',93h - dw set_instruction-instruction_handler - db 'setnc',93h - dw set_instruction-instruction_handler - db 'setne',95h - dw set_instruction-instruction_handler - db 'setng',9Eh - dw set_instruction-instruction_handler - db 'setnl',9Dh - dw set_instruction-instruction_handler - db 'setno',91h - dw set_instruction-instruction_handler - db 'setnp',9Bh - dw set_instruction-instruction_handler - db 'setns',99h - dw set_instruction-instruction_handler - db 'setnz',95h - dw set_instruction-instruction_handler - db 'setpe',9Ah - dw set_instruction-instruction_handler - db 'setpo',9Bh - dw set_instruction-instruction_handler - db 'stack',0 - dw stack_directive-instruction_handler - db 'store',0 - dw store_directive-instruction_handler - db 'stosb',0AAh - dw simple_instruction-instruction_handler - db 'stosd',0ABh - dw simple_instruction_32bit-instruction_handler - db 'stosq',0ABh - dw simple_instruction_64bit-instruction_handler - db 'stosw',0ABh - dw simple_instruction_16bit-instruction_handler - db 'subpd',5Ch - dw sse_pd_instruction-instruction_handler - db 'subps',5Ch - dw sse_ps_instruction-instruction_handler - db 'subsd',5Ch - dw sse_sd_instruction-instruction_handler - db 'subss',5Ch - dw sse_ss_instruction-instruction_handler - db 'times',0 - dw times_directive-instruction_handler - db 'tzcnt',0BCh - dw popcnt_instruction-instruction_handler - db 'tzmsk',14h - dw tbm_instruction-instruction_handler - db 'vdppd',41h - dw avx_128bit_instruction_3a_imm8-instruction_handler - db 'vdpps',40h - dw avx_instruction_3a_imm8-instruction_handler - db 'vmovd',0 - dw avx_movd_instruction-instruction_handler - db 'vmovq',0 - dw avx_movq_instruction-instruction_handler - db 'vmrun',0D8h - dw simple_svm_instruction-instruction_handler - db 'vmxon',6 - dw vmxon_instruction-instruction_handler - db 'vorpd',56h - dw avx_pd_instruction-instruction_handler - db 'vorps',56h - dw avx_ps_instruction-instruction_handler - db 'vpand',0DBh - dw avx_pd_instruction-instruction_handler - db 'vpxor',0EFh - dw avx_pd_instruction-instruction_handler - db 'while',0 - dw while_directive-instruction_handler - db 'wrmsr',30h - dw simple_extended_instruction-instruction_handler - db 'xlatb',0D7h - dw simple_instruction-instruction_handler - db 'xorpd',57h - dw sse_pd_instruction-instruction_handler - db 'xorps',57h - dw sse_ps_instruction-instruction_handler - db 'xsave',100b - dw fxsave_instruction-instruction_handler - db 'xtest',0D6h - dw simple_vmx_instruction-instruction_handler -instructions_6: - db 'aesdec',0DEh - dw sse4_instruction_38-instruction_handler - db 'aesenc',0DCh - dw sse4_instruction_38-instruction_handler - db 'aesimc',0DBh - dw sse4_instruction_38-instruction_handler - db 'andnpd',55h - dw sse_pd_instruction-instruction_handler - db 'andnps',55h - dw sse_ps_instruction-instruction_handler - db 'assert',0 - dw assert_directive-instruction_handler - db 'blcmsk',21h - dw tbm_instruction-instruction_handler - db 'blsmsk',2 - dw bmi_instruction-instruction_handler - db 'cmovae',43h - dw bs_instruction-instruction_handler - db 'cmovbe',46h - dw bs_instruction-instruction_handler - db 'cmovge',4Dh - dw bs_instruction-instruction_handler - db 'cmovle',4Eh - dw bs_instruction-instruction_handler - db 'cmovna',46h - dw bs_instruction-instruction_handler - db 'cmovnb',43h - dw bs_instruction-instruction_handler - db 'cmovnc',43h - dw bs_instruction-instruction_handler - db 'cmovne',45h - dw bs_instruction-instruction_handler - db 'cmovng',4Eh - dw bs_instruction-instruction_handler - db 'cmovnl',4Dh - dw bs_instruction-instruction_handler - db 'cmovno',41h - dw bs_instruction-instruction_handler - db 'cmovnp',4Bh - dw bs_instruction-instruction_handler - db 'cmovns',49h - dw bs_instruction-instruction_handler - db 'cmovnz',45h - dw bs_instruction-instruction_handler - db 'cmovpe',4Ah - dw bs_instruction-instruction_handler - db 'cmovpo',4Bh - dw bs_instruction-instruction_handler - db 'comisd',2Fh - dw comisd_instruction-instruction_handler - db 'comiss',2Fh - dw comiss_instruction-instruction_handler - db 'fcmovb',0C0h - dw fcmov_instruction-instruction_handler - db 'fcmove',0C8h - dw fcmov_instruction-instruction_handler - db 'fcmovu',0D8h - dw fcmov_instruction-instruction_handler - db 'fcomip',0F0h - dw fcomip_instruction-instruction_handler - db 'fcompp',0 - dw fcompp_instruction-instruction_handler - db 'fdivrp',6 - dw faddp_instruction-instruction_handler - db 'ffreep',0 - dw ffreep_instruction-instruction_handler - db 'ficomp',3 - dw fi_instruction-instruction_handler - db 'fidivr',7 - dw fi_instruction-instruction_handler - db 'fisttp',1 - dw fild_instruction-instruction_handler - db 'fisubr',5 - dw fi_instruction-instruction_handler - db 'fldenv',4 - dw fldenv_instruction-instruction_handler - db 'fldl2e',101010b - dw simple_fpu_instruction-instruction_handler - db 'fldl2t',101001b - dw simple_fpu_instruction-instruction_handler - db 'fldlg2',101100b - dw simple_fpu_instruction-instruction_handler - db 'fldln2',101101b - dw simple_fpu_instruction-instruction_handler - db 'fnclex',0E2h - dw fninit_instruction-instruction_handler - db 'fndisi',0E1h - dw fninit_instruction-instruction_handler - db 'fninit',0E3h - dw fninit_instruction-instruction_handler - db 'fnsave',6 - dw fnsave_instruction-instruction_handler - db 'fnstcw',7 - dw fldcw_instruction-instruction_handler - db 'fnstsw',0 - dw fnstsw_instruction-instruction_handler - db 'format',0 - dw format_directive-instruction_handler - db 'fpatan',110011b - dw simple_fpu_instruction-instruction_handler - db 'fprem1',110101b - dw simple_fpu_instruction-instruction_handler - db 'frstor',4 - dw fnsave_instruction-instruction_handler - db 'frstpm',0E5h - dw fninit_instruction-instruction_handler - db 'fsaved',6 - dw fsave_instruction_32bit-instruction_handler - db 'fsavew',6 - dw fsave_instruction_16bit-instruction_handler - db 'fscale',111101b - dw simple_fpu_instruction-instruction_handler - db 'fsetpm',0E4h - dw fninit_instruction-instruction_handler - db 'fstenv',6 - dw fstenv_instruction-instruction_handler - db 'fsubrp',4 - dw faddp_instruction-instruction_handler - db 'fucomi',0E8h - dw fcomi_instruction-instruction_handler - db 'fucomp',5 - dw ffree_instruction-instruction_handler - db 'fxsave',0 - dw fxsave_instruction-instruction_handler - db 'getsec',37h - dw simple_extended_instruction-instruction_handler - db 'haddpd',07Ch - dw sse_pd_instruction-instruction_handler - db 'haddps',07Ch - dw cvtpd2dq_instruction-instruction_handler - db 'hsubpd',07Dh - dw sse_pd_instruction-instruction_handler - db 'hsubps',07Dh - dw cvtpd2dq_instruction-instruction_handler - db 'invept',80h - dw vmx_inv_instruction-instruction_handler - db 'invlpg',0 - dw invlpg_instruction-instruction_handler - db 'lfence',0E8h - dw fence_instruction-instruction_handler - db 'llwpcb',0 - dw llwpcb_instruction-instruction_handler - db 'looped',0E1h - dw loop_instruction_32bit-instruction_handler - db 'loopeq',0E1h - dw loop_instruction_64bit-instruction_handler - db 'loopew',0E1h - dw loop_instruction_16bit-instruction_handler - db 'loopne',0E0h - dw loop_instruction-instruction_handler - db 'loopnz',0E0h - dw loop_instruction-instruction_handler - db 'loopzd',0E1h - dw loop_instruction_32bit-instruction_handler - db 'loopzq',0E1h - dw loop_instruction_64bit-instruction_handler - db 'loopzw',0E1h - dw loop_instruction_16bit-instruction_handler - db 'lwpins',0 - dw lwpins_instruction-instruction_handler - db 'lwpval',1 - dw lwpins_instruction-instruction_handler - db 'mfence',0F0h - dw fence_instruction-instruction_handler - db 'movapd',28h - dw movpd_instruction-instruction_handler - db 'movaps',28h - dw movps_instruction-instruction_handler - db 'movdqa',66h - dw movdq_instruction-instruction_handler - db 'movdqu',0F3h - dw movdq_instruction-instruction_handler - db 'movhpd',16h - dw movlpd_instruction-instruction_handler - db 'movhps',16h - dw movlps_instruction-instruction_handler - db 'movlpd',12h - dw movlpd_instruction-instruction_handler - db 'movlps',12h - dw movlps_instruction-instruction_handler - db 'movnti',0C3h - dw movnti_instruction-instruction_handler - db 'movntq',0E7h - dw movntq_instruction-instruction_handler - db 'movsxd',63h - dw movsxd_instruction-instruction_handler - db 'movupd',10h - dw movpd_instruction-instruction_handler - db 'movups',10h - dw movps_instruction-instruction_handler - db 'paddsb',0ECh - dw basic_mmx_instruction-instruction_handler - db 'paddsw',0EDh - dw basic_mmx_instruction-instruction_handler - db 'pextrb',14h - dw pextrb_instruction-instruction_handler - db 'pextrd',16h - dw pextrd_instruction-instruction_handler - db 'pextrq',16h - dw pextrq_instruction-instruction_handler - db 'pextrw',15h - dw pextrw_instruction-instruction_handler - db 'pfnacc',8Ah - dw amd3dnow_instruction-instruction_handler - db 'pfsubr',0AAh - dw amd3dnow_instruction-instruction_handler - db 'phaddd',2 - dw ssse3_instruction-instruction_handler - db 'phaddw',1 - dw ssse3_instruction-instruction_handler - db 'phsubd',6 - dw ssse3_instruction-instruction_handler - db 'phsubw',5 - dw ssse3_instruction-instruction_handler - db 'pinsrb',20h - dw pinsrb_instruction-instruction_handler - db 'pinsrd',22h - dw pinsrd_instruction-instruction_handler - db 'pinsrq',22h - dw pinsrq_instruction-instruction_handler - db 'pinsrw',0C4h - dw pinsrw_instruction-instruction_handler - db 'pmaxsb',3Ch - dw sse4_instruction_38-instruction_handler - db 'pmaxsd',3Dh - dw sse4_instruction_38-instruction_handler - db 'pmaxsw',0EEh - dw basic_mmx_instruction-instruction_handler - db 'pmaxub',0DEh - dw basic_mmx_instruction-instruction_handler - db 'pmaxud',3Fh - dw sse4_instruction_38-instruction_handler - db 'pmaxuw',3Eh - dw sse4_instruction_38-instruction_handler - db 'pminsb',38h - dw sse4_instruction_38-instruction_handler - db 'pminsd',39h - dw sse4_instruction_38-instruction_handler - db 'pminsw',0EAh - dw basic_mmx_instruction-instruction_handler - db 'pminub',0DAh - dw basic_mmx_instruction-instruction_handler - db 'pminud',3Bh - dw sse4_instruction_38-instruction_handler - db 'pminuw',3Ah - dw sse4_instruction_38-instruction_handler - db 'pmuldq',28h - dw sse4_instruction_38-instruction_handler - db 'pmulhw',0E5h - dw basic_mmx_instruction-instruction_handler - db 'pmulld',40h - dw sse4_instruction_38-instruction_handler - db 'pmullw',0D5h - dw basic_mmx_instruction-instruction_handler - db 'popcnt',0B8h - dw popcnt_instruction-instruction_handler - db 'psadbw',0F6h - dw basic_mmx_instruction-instruction_handler - db 'pshufb',0 - dw ssse3_instruction-instruction_handler - db 'pshufd',66h - dw pshufd_instruction-instruction_handler - db 'pshufw',0 - dw pshufw_instruction-instruction_handler - db 'psignb',8 - dw ssse3_instruction-instruction_handler - db 'psignd',0Ah - dw ssse3_instruction-instruction_handler - db 'psignw',9 - dw ssse3_instruction-instruction_handler - db 'pslldq',111b - dw pslldq_instruction-instruction_handler - db 'psrldq',011b - dw pslldq_instruction-instruction_handler - db 'psubsb',0E8h - dw basic_mmx_instruction-instruction_handler - db 'psubsw',0E9h - dw basic_mmx_instruction-instruction_handler - db 'pswapd',0BBh - dw amd3dnow_instruction-instruction_handler - db 'public',0 - dw public_directive-instruction_handler - db 'pushad',60h - dw simple_instruction_32bit_except64-instruction_handler - db 'pushaw',60h - dw simple_instruction_16bit_except64-instruction_handler - db 'pushfd',9Ch - dw simple_instruction_32bit_except64-instruction_handler - db 'pushfq',9Ch - dw simple_instruction_only64-instruction_handler - db 'pushfw',9Ch - dw simple_instruction_16bit-instruction_handler - db 'rdmsrq',32h - dw simple_extended_instruction_64bit-instruction_handler - db 'rdrand',110b - dw rdrand_instruction-instruction_handler - db 'rdtscp',1 - dw rdtscp_instruction-instruction_handler - db 'repeat',0 - dw repeat_directive-instruction_handler - db 'setalc',0D6h - dw simple_instruction_except64-instruction_handler - db 'setnae',92h - dw set_instruction-instruction_handler - db 'setnbe',97h - dw set_instruction-instruction_handler - db 'setnge',9Ch - dw set_instruction-instruction_handler - db 'setnle',9Fh - dw set_instruction-instruction_handler - db 'sfence',0F8h - dw fence_instruction-instruction_handler - db 'shufpd',0C6h - dw sse_pd_instruction_imm8-instruction_handler - db 'shufps',0C6h - dw sse_ps_instruction_imm8-instruction_handler - db 'skinit',0 - dw skinit_instruction-instruction_handler - db 'slwpcb',1 - dw llwpcb_instruction-instruction_handler - db 'sqrtpd',51h - dw sse_pd_instruction-instruction_handler - db 'sqrtps',51h - dw sse_ps_instruction-instruction_handler - db 'sqrtsd',51h - dw sse_sd_instruction-instruction_handler - db 'sqrtss',51h - dw sse_ss_instruction-instruction_handler - db 'swapgs',0 - dw swapgs_instruction-instruction_handler - db 'sysret',07h - dw simple_extended_instruction-instruction_handler - db 't1mskc',17h - dw tbm_instruction-instruction_handler - db 'vaddpd',58h - dw avx_pd_instruction-instruction_handler - db 'vaddps',58h - dw avx_ps_instruction-instruction_handler - db 'vaddsd',58h - dw avx_sd_instruction-instruction_handler - db 'vaddss',58h - dw avx_ss_instruction-instruction_handler - db 'vandpd',54h - dw avx_pd_instruction-instruction_handler - db 'vandps',54h - dw avx_ps_instruction-instruction_handler - db 'vcmppd',-1 - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpps',-1 - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpsd',-1 - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpss',-1 - dw avx_cmp_ss_instruction-instruction_handler - db 'vdivpd',5Eh - dw avx_pd_instruction-instruction_handler - db 'vdivps',5Eh - dw avx_ps_instruction-instruction_handler - db 'vdivsd',5Eh - dw avx_sd_instruction-instruction_handler - db 'vdivss',5Eh - dw avx_ss_instruction-instruction_handler - db 'vlddqu',0F0h - dw avx_lddqu_instruction-instruction_handler - db 'vmaxpd',5Fh - dw avx_pd_instruction-instruction_handler - db 'vmaxps',5Fh - dw avx_ps_instruction-instruction_handler - db 'vmaxsd',5Fh - dw avx_sd_instruction-instruction_handler - db 'vmaxss',5Fh - dw avx_ss_instruction-instruction_handler - db 'vmcall',0C1h - dw simple_vmx_instruction-instruction_handler - db 'vminpd',5Dh - dw avx_pd_instruction-instruction_handler - db 'vminps',5Dh - dw avx_ps_instruction-instruction_handler - db 'vminsd',5Dh - dw avx_sd_instruction-instruction_handler - db 'vminss',5Dh - dw avx_ss_instruction-instruction_handler - db 'vmload',0DAh - dw simple_svm_instruction-instruction_handler - db 'vmovsd',0 - dw avx_movsd_instruction-instruction_handler - db 'vmovss',0 - dw avx_movss_instruction-instruction_handler - db 'vmread',0 - dw vmread_instruction-instruction_handler - db 'vmsave',0DBh - dw simple_svm_instruction-instruction_handler - db 'vmulpd',59h - dw avx_pd_instruction-instruction_handler - db 'vmulps',59h - dw avx_ps_instruction-instruction_handler - db 'vmulsd',59h - dw avx_sd_instruction-instruction_handler - db 'vmulss',59h - dw avx_ss_instruction-instruction_handler - db 'vmxoff',0C4h - dw simple_vmx_instruction-instruction_handler - db 'vpabsb',1Ch - dw avx_single_source_instruction_38-instruction_handler - db 'vpabsd',1Eh - dw avx_single_source_instruction_38-instruction_handler - db 'vpabsw',1Dh - dw avx_single_source_instruction_38-instruction_handler - db 'vpaddb',0FCh - dw avx_pd_instruction-instruction_handler - db 'vpaddd',0FEh - dw avx_pd_instruction-instruction_handler - db 'vpaddq',0D4h - dw avx_pd_instruction-instruction_handler - db 'vpaddw',0FDh - dw avx_pd_instruction-instruction_handler - db 'vpandn',0DFh - dw avx_pd_instruction-instruction_handler - db 'vpavgb',0E0h - dw avx_pd_instruction-instruction_handler - db 'vpavgw',0E3h - dw avx_pd_instruction-instruction_handler - db 'vpcmov',0A2h - dw vpcmov_instruction-instruction_handler - db 'vpcomb',-1 - dw xop_pcom_b_instruction-instruction_handler - db 'vpcomd',-1 - dw xop_pcom_d_instruction-instruction_handler - db 'vpcomq',-1 - dw xop_pcom_q_instruction-instruction_handler - db 'vpcomw',-1 - dw xop_pcom_w_instruction-instruction_handler - db 'vpermd',36h - dw avx_permd_instruction-instruction_handler - db 'vpermq',0 - dw avx_permq_instruction-instruction_handler - db 'vpperm',0A3h - dw xop_128bit_instruction-instruction_handler - db 'vprotb',90h - dw xop_shift_instruction-instruction_handler - db 'vprotd',92h - dw xop_shift_instruction-instruction_handler - db 'vprotq',93h - dw xop_shift_instruction-instruction_handler - db 'vprotw',91h - dw xop_shift_instruction-instruction_handler - db 'vpshab',98h - dw xop_shift_instruction-instruction_handler - db 'vpshad',9Ah - dw xop_shift_instruction-instruction_handler - db 'vpshaq',9Bh - dw xop_shift_instruction-instruction_handler - db 'vpshaw',99h - dw xop_shift_instruction-instruction_handler - db 'vpshlb',94h - dw xop_shift_instruction-instruction_handler - db 'vpshld',96h - dw xop_shift_instruction-instruction_handler - db 'vpshlq',97h - dw xop_shift_instruction-instruction_handler - db 'vpshlw',95h - dw xop_shift_instruction-instruction_handler - db 'vpslld',0F2h - dw avx_bit_shift_instruction-instruction_handler - db 'vpsllq',0F3h - dw avx_bit_shift_instruction-instruction_handler - db 'vpsllw',0F1h - dw avx_bit_shift_instruction-instruction_handler - db 'vpsrad',0E2h - dw avx_bit_shift_instruction-instruction_handler - db 'vpsraw',0E1h - dw avx_bit_shift_instruction-instruction_handler - db 'vpsrld',0D2h - dw avx_bit_shift_instruction-instruction_handler - db 'vpsrlq',0D3h - dw avx_bit_shift_instruction-instruction_handler - db 'vpsrlw',0D1h - dw avx_bit_shift_instruction-instruction_handler - db 'vpsubb',0F8h - dw avx_pd_instruction-instruction_handler - db 'vpsubd',0FAh - dw avx_pd_instruction-instruction_handler - db 'vpsubq',0FBh - dw avx_pd_instruction-instruction_handler - db 'vpsubw',0F9h - dw avx_pd_instruction-instruction_handler - db 'vptest',17h - dw avx_single_source_instruction_38-instruction_handler - db 'vrcpps',53h - dw avx_single_source_ps_instruction-instruction_handler - db 'vrcpss',53h - dw avx_ss_instruction-instruction_handler - db 'vsubpd',5Ch - dw avx_pd_instruction-instruction_handler - db 'vsubps',5Ch - dw avx_ps_instruction-instruction_handler - db 'vsubsd',5Ch - dw avx_sd_instruction-instruction_handler - db 'vsubss',5Ch - dw avx_ss_instruction-instruction_handler - db 'vxorpd',57h - dw avx_pd_instruction-instruction_handler - db 'vxorps',57h - dw avx_ps_instruction-instruction_handler - db 'wbinvd',9 - dw simple_extended_instruction-instruction_handler - db 'wrmsrq',30h - dw simple_extended_instruction_64bit-instruction_handler - db 'xabort',0 - dw xabort_instruction-instruction_handler - db 'xbegin',0 - dw xbegin_instruction-instruction_handler - db 'xgetbv',0D0h - dw simple_vmx_instruction-instruction_handler - db 'xrstor',101b - dw fxsave_instruction-instruction_handler - db 'xsetbv',0D1h - dw simple_vmx_instruction-instruction_handler -instructions_7: - db 'blcfill',11h - dw tbm_instruction-instruction_handler - db 'blendpd',0Dh - dw sse4_instruction_3a_imm8-instruction_handler - db 'blendps',0Ch - dw sse4_instruction_3a_imm8-instruction_handler - db 'blsfill',12h - dw tbm_instruction-instruction_handler - db 'clflush',111b - dw fxsave_instruction-instruction_handler - db 'cmovnae',42h - dw bs_instruction-instruction_handler - db 'cmovnbe',47h - dw bs_instruction-instruction_handler - db 'cmovnge',4Ch - dw bs_instruction-instruction_handler - db 'cmovnle',4Fh - dw bs_instruction-instruction_handler - db 'cmpeqpd',0 - dw cmp_pd_instruction-instruction_handler - db 'cmpeqps',0 - dw cmp_ps_instruction-instruction_handler - db 'cmpeqsd',0 - dw cmp_sd_instruction-instruction_handler - db 'cmpeqss',0 - dw cmp_ss_instruction-instruction_handler - db 'cmplepd',2 - dw cmp_pd_instruction-instruction_handler - db 'cmpleps',2 - dw cmp_ps_instruction-instruction_handler - db 'cmplesd',2 - dw cmp_sd_instruction-instruction_handler - db 'cmpless',2 - dw cmp_ss_instruction-instruction_handler - db 'cmpltpd',1 - dw cmp_pd_instruction-instruction_handler - db 'cmpltps',1 - dw cmp_ps_instruction-instruction_handler - db 'cmpltsd',1 - dw cmp_sd_instruction-instruction_handler - db 'cmpltss',1 - dw cmp_ss_instruction-instruction_handler - db 'cmpxchg',0B0h - dw basic_486_instruction-instruction_handler - db 'display',0 - dw display_directive-instruction_handler - db 'fcmovbe',0D0h - dw fcmov_instruction-instruction_handler - db 'fcmovnb',0C0h - dw fcomi_instruction-instruction_handler - db 'fcmovne',0C8h - dw fcomi_instruction-instruction_handler - db 'fcmovnu',0D8h - dw fcomi_instruction-instruction_handler - db 'fdecstp',110110b - dw simple_fpu_instruction-instruction_handler - db 'fincstp',110111b - dw simple_fpu_instruction-instruction_handler - db 'fldenvd',4 - dw fldenv_instruction_32bit-instruction_handler - db 'fldenvw',4 - dw fldenv_instruction_16bit-instruction_handler - db 'fnsaved',6 - dw fnsave_instruction_32bit-instruction_handler - db 'fnsavew',6 - dw fnsave_instruction_16bit-instruction_handler - db 'fnstenv',6 - dw fldenv_instruction-instruction_handler - db 'frndint',111100b - dw simple_fpu_instruction-instruction_handler - db 'frstord',4 - dw fnsave_instruction_32bit-instruction_handler - db 'frstorw',4 - dw fnsave_instruction_16bit-instruction_handler - db 'fsincos',111011b - dw simple_fpu_instruction-instruction_handler - db 'fstenvd',6 - dw fstenv_instruction_32bit-instruction_handler - db 'fstenvw',6 - dw fstenv_instruction_16bit-instruction_handler - db 'fucomip',0E8h - dw fcomip_instruction-instruction_handler - db 'fucompp',0 - dw fucompp_instruction-instruction_handler - db 'fxrstor',1 - dw fxsave_instruction-instruction_handler - db 'fxtract',110100b - dw simple_fpu_instruction-instruction_handler - db 'fyl2xp1',111001b - dw simple_fpu_instruction-instruction_handler - db 'insertq',0 - dw insertq_instruction-instruction_handler - db 'invlpga',0DFh - dw invlpga_instruction-instruction_handler - db 'invpcid',82h - dw vmx_inv_instruction-instruction_handler - db 'invvpid',81h - dw vmx_inv_instruction-instruction_handler - db 'ldmxcsr',10b - dw fxsave_instruction-instruction_handler - db 'loopned',0E0h - dw loop_instruction_32bit-instruction_handler - db 'loopneq',0E0h - dw loop_instruction_64bit-instruction_handler - db 'loopnew',0E0h - dw loop_instruction_16bit-instruction_handler - db 'loopnzd',0E0h - dw loop_instruction_32bit-instruction_handler - db 'loopnzq',0E0h - dw loop_instruction_64bit-instruction_handler - db 'loopnzw',0E0h - dw loop_instruction_16bit-instruction_handler - db 'monitor',0C8h - dw monitor_instruction-instruction_handler - db 'movddup',12h - dw sse_sd_instruction-instruction_handler - db 'movdq2q',0 - dw movdq2q_instruction-instruction_handler - db 'movhlps',12h - dw movhlps_instruction-instruction_handler - db 'movlhps',16h - dw movhlps_instruction-instruction_handler - db 'movntdq',0E7h - dw movntpd_instruction-instruction_handler - db 'movntpd',2Bh - dw movntpd_instruction-instruction_handler - db 'movntps',2Bh - dw movntps_instruction-instruction_handler - db 'movntsd',2Bh - dw movntsd_instruction-instruction_handler - db 'movntss',2Bh - dw movntss_instruction-instruction_handler - db 'movq2dq',0 - dw movq2dq_instruction-instruction_handler - db 'mpsadbw',42h - dw sse4_instruction_3a_imm8-instruction_handler - db 'paddusb',0DCh - dw basic_mmx_instruction-instruction_handler - db 'paddusw',0DDh - dw basic_mmx_instruction-instruction_handler - db 'palignr',0 - dw palignr_instruction-instruction_handler - db 'pavgusb',0BFh - dw amd3dnow_instruction-instruction_handler - db 'pblendw',0Eh - dw sse4_instruction_3a_imm8-instruction_handler - db 'pcmpeqb',74h - dw basic_mmx_instruction-instruction_handler - db 'pcmpeqd',76h - dw basic_mmx_instruction-instruction_handler - db 'pcmpeqq',29h - dw sse4_instruction_38-instruction_handler - db 'pcmpeqw',75h - dw basic_mmx_instruction-instruction_handler - db 'pcmpgtb',64h - dw basic_mmx_instruction-instruction_handler - db 'pcmpgtd',66h - dw basic_mmx_instruction-instruction_handler - db 'pcmpgtq',37h - dw sse4_instruction_38-instruction_handler - db 'pcmpgtw',65h - dw basic_mmx_instruction-instruction_handler - db 'pfcmpeq',0B0h - dw amd3dnow_instruction-instruction_handler - db 'pfcmpge',90h - dw amd3dnow_instruction-instruction_handler - db 'pfcmpgt',0A0h - dw amd3dnow_instruction-instruction_handler - db 'pfpnacc',8Eh - dw amd3dnow_instruction-instruction_handler - db 'pfrsqrt',97h - dw amd3dnow_instruction-instruction_handler - db 'phaddsw',3 - dw ssse3_instruction-instruction_handler - db 'phsubsw',7 - dw ssse3_instruction-instruction_handler - db 'pmaddwd',0F5h - dw basic_mmx_instruction-instruction_handler - db 'pmulhrw',0B7h - dw amd3dnow_instruction-instruction_handler - db 'pmulhuw',0E4h - dw basic_mmx_instruction-instruction_handler - db 'pmuludq',0F4h - dw basic_mmx_instruction-instruction_handler - db 'pshufhw',0F3h - dw pshufd_instruction-instruction_handler - db 'pshuflw',0F2h - dw pshufd_instruction-instruction_handler - db 'psubusb',0D8h - dw basic_mmx_instruction-instruction_handler - db 'psubusw',0D9h - dw basic_mmx_instruction-instruction_handler - db 'roundpd',9 - dw sse4_instruction_3a_imm8-instruction_handler - db 'roundps',8 - dw sse4_instruction_3a_imm8-instruction_handler - db 'roundsd',0Bh - dw sse4_sd_instruction_3a_imm8-instruction_handler - db 'roundss',0Ah - dw sse4_ss_instruction_3a_imm8-instruction_handler - db 'rsqrtps',52h - dw sse_ps_instruction-instruction_handler - db 'rsqrtss',52h - dw sse_ss_instruction-instruction_handler - db 'section',0 - dw section_directive-instruction_handler - db 'segment',0 - dw segment_directive-instruction_handler - db 'stmxcsr',11b - dw fxsave_instruction-instruction_handler - db 'syscall',05h - dw simple_extended_instruction-instruction_handler - db 'sysexit',35h - dw simple_extended_instruction-instruction_handler - db 'sysretq',07h - dw simple_extended_instruction_64bit-instruction_handler - db 'ucomisd',2Eh - dw comisd_instruction-instruction_handler - db 'ucomiss',2Eh - dw comiss_instruction-instruction_handler - db 'vaesdec',0DEh - dw avx_128bit_instruction_38-instruction_handler - db 'vaesenc',0DCh - dw avx_128bit_instruction_38-instruction_handler - db 'vaesimc',0DBh - dw avx_single_source_128bit_instruction_38-instruction_handler - db 'vandnpd',55h - dw avx_pd_instruction-instruction_handler - db 'vandnps',55h - dw avx_ps_instruction-instruction_handler - db 'vcomisd',2Fh - dw avx_comisd_instruction-instruction_handler - db 'vcomiss',2Fh - dw avx_comiss_instruction-instruction_handler - db 'vfrczpd',81h - dw xop_single_source_instruction-instruction_handler - db 'vfrczps',80h - dw xop_single_source_instruction-instruction_handler - db 'vfrczsd',83h - dw xop_single_source_sd_instruction-instruction_handler - db 'vfrczss',82h - dw xop_single_source_ss_instruction-instruction_handler - db 'vhaddpd',07Ch - dw avx_pd_instruction-instruction_handler - db 'vhaddps',07Ch - dw avx_haddps_instruction-instruction_handler - db 'vhsubpd',07Dh - dw avx_pd_instruction-instruction_handler - db 'vhsubps',07Dh - dw avx_haddps_instruction-instruction_handler - db 'virtual',0 - dw virtual_directive-instruction_handler - db 'vmclear',6 - dw vmclear_instruction-instruction_handler - db 'vmmcall',0D9h - dw simple_vmx_instruction-instruction_handler - db 'vmovapd',28h - dw avx_movpd_instruction-instruction_handler - db 'vmovaps',28h - dw avx_movps_instruction-instruction_handler - db 'vmovdqa',6Fh - dw avx_movpd_instruction-instruction_handler - db 'vmovdqu',6Fh - dw avx_movdqu_instruction-instruction_handler - db 'vmovhpd',16h - dw avx_movlpd_instruction-instruction_handler - db 'vmovhps',16h - dw avx_movlps_instruction-instruction_handler - db 'vmovlpd',12h - dw avx_movlpd_instruction-instruction_handler - db 'vmovlps',12h - dw avx_movlps_instruction-instruction_handler - db 'vmovupd',10h - dw avx_movpd_instruction-instruction_handler - db 'vmovups',10h - dw avx_movps_instruction-instruction_handler - db 'vmptrld',6 - dw vmx_instruction-instruction_handler - db 'vmptrst',7 - dw vmx_instruction-instruction_handler - db 'vmwrite',0 - dw vmwrite_instruction-instruction_handler - db 'vpaddsb',0ECh - dw avx_pd_instruction-instruction_handler - db 'vpaddsw',0EDh - dw avx_pd_instruction-instruction_handler - db 'vpcomub',-1 - dw xop_pcom_ub_instruction-instruction_handler - db 'vpcomud',-1 - dw xop_pcom_ud_instruction-instruction_handler - db 'vpcomuq',-1 - dw xop_pcom_uq_instruction-instruction_handler - db 'vpcomuw',-1 - dw xop_pcom_uw_instruction-instruction_handler - db 'vpermpd',1 - dw avx_permq_instruction-instruction_handler - db 'vpermps',16h - dw avx_permd_instruction-instruction_handler - db 'vpextrb',14h - dw avx_pextrb_instruction-instruction_handler - db 'vpextrd',16h - dw avx_pextrd_instruction-instruction_handler - db 'vpextrq',16h - dw avx_pextrq_instruction-instruction_handler - db 'vpextrw',15h - dw avx_pextrw_instruction-instruction_handler - db 'vphaddd',2 - dw avx_instruction_38-instruction_handler - db 'vphaddw',1 - dw avx_instruction_38-instruction_handler - db 'vphsubd',6 - dw avx_instruction_38-instruction_handler - db 'vphsubw',5 - dw avx_instruction_38-instruction_handler - db 'vpinsrb',20h - dw avx_pinsrb_instruction-instruction_handler - db 'vpinsrd',22h - dw avx_pinsrd_instruction-instruction_handler - db 'vpinsrq',22h - dw avx_pinsrq_instruction-instruction_handler - db 'vpinsrw',0C4h - dw avx_pinsrw_instruction-instruction_handler - db 'vpmaxsb',3Ch - dw avx_instruction_38-instruction_handler - db 'vpmaxsd',3Dh - dw avx_instruction_38-instruction_handler - db 'vpmaxsw',0EEh - dw avx_pd_instruction-instruction_handler - db 'vpmaxub',0DEh - dw avx_pd_instruction-instruction_handler - db 'vpmaxud',3Fh - dw avx_instruction_38-instruction_handler - db 'vpmaxuw',3Eh - dw avx_instruction_38-instruction_handler - db 'vpminsb',38h - dw avx_instruction_38-instruction_handler - db 'vpminsd',39h - dw avx_instruction_38-instruction_handler - db 'vpminsw',0EAh - dw avx_pd_instruction-instruction_handler - db 'vpminub',0DAh - dw avx_pd_instruction-instruction_handler - db 'vpminud',3Bh - dw avx_instruction_38-instruction_handler - db 'vpminuw',3Ah - dw avx_instruction_38-instruction_handler - db 'vpmuldq',28h - dw avx_instruction_38-instruction_handler - db 'vpmulhw',0E5h - dw avx_pd_instruction-instruction_handler - db 'vpmulld',40h - dw avx_instruction_38-instruction_handler - db 'vpmullw',0D5h - dw avx_pd_instruction-instruction_handler - db 'vpsadbw',0F6h - dw avx_pd_instruction-instruction_handler - db 'vpshufb',0 - dw avx_instruction_38-instruction_handler - db 'vpshufd',66h - dw avx_pshufd_instruction-instruction_handler - db 'vpsignb',8 - dw avx_instruction_38-instruction_handler - db 'vpsignd',0Ah - dw avx_instruction_38-instruction_handler - db 'vpsignw',9 - dw avx_instruction_38-instruction_handler - db 'vpslldq',111b - dw avx_pslldq_instruction-instruction_handler - db 'vpsllvd',47h - dw avx_instruction_38-instruction_handler - db 'vpsllvq',47h - dw avx_instruction_38_w1-instruction_handler - db 'vpsravd',46h - dw avx_instruction_38-instruction_handler - db 'vpsrldq',011b - dw avx_pslldq_instruction-instruction_handler - db 'vpsrlvd',45h - dw avx_instruction_38-instruction_handler - db 'vpsrlvq',45h - dw avx_instruction_38_w1-instruction_handler - db 'vpsubsb',0E8h - dw avx_pd_instruction-instruction_handler - db 'vpsubsw',0E9h - dw avx_pd_instruction-instruction_handler - db 'vshufpd',0C6h - dw avx_pd_instruction_imm8-instruction_handler - db 'vshufps',0C6h - dw avx_ps_instruction_imm8-instruction_handler - db 'vsqrtpd',51h - dw avx_single_source_pd_instruction-instruction_handler - db 'vsqrtps',51h - dw avx_single_source_ps_instruction-instruction_handler - db 'vsqrtsd',51h - dw avx_sd_instruction-instruction_handler - db 'vsqrtss',51h - dw avx_ss_instruction-instruction_handler - db 'vtestpd',0Fh - dw avx_single_source_instruction_38-instruction_handler - db 'vtestps',0Eh - dw avx_single_source_instruction_38-instruction_handler - db 'xsave64',100b - dw fxsave_instruction_64bit-instruction_handler -instructions_8: - db 'addsubpd',0D0h - dw sse_pd_instruction-instruction_handler - db 'addsubps',0D0h - dw cvtpd2dq_instruction-instruction_handler - db 'blendvpd',15h - dw sse4_instruction_38_xmm0-instruction_handler - db 'blendvps',14h - dw sse4_instruction_38_xmm0-instruction_handler - db 'cmpneqpd',4 - dw cmp_pd_instruction-instruction_handler - db 'cmpneqps',4 - dw cmp_ps_instruction-instruction_handler - db 'cmpneqsd',4 - dw cmp_sd_instruction-instruction_handler - db 'cmpneqss',4 - dw cmp_ss_instruction-instruction_handler - db 'cmpnlepd',6 - dw cmp_pd_instruction-instruction_handler - db 'cmpnleps',6 - dw cmp_ps_instruction-instruction_handler - db 'cmpnlesd',6 - dw cmp_sd_instruction-instruction_handler - db 'cmpnless',6 - dw cmp_ss_instruction-instruction_handler - db 'cmpnltpd',5 - dw cmp_pd_instruction-instruction_handler - db 'cmpnltps',5 - dw cmp_ps_instruction-instruction_handler - db 'cmpnltsd',5 - dw cmp_sd_instruction-instruction_handler - db 'cmpnltss',5 - dw cmp_ss_instruction-instruction_handler - db 'cmpordpd',7 - dw cmp_pd_instruction-instruction_handler - db 'cmpordps',7 - dw cmp_ps_instruction-instruction_handler - db 'cmpordsd',7 - dw cmp_sd_instruction-instruction_handler - db 'cmpordss',7 - dw cmp_ss_instruction-instruction_handler - db 'cvtdq2pd',0E6h - dw cvtdq2pd_instruction-instruction_handler - db 'cvtdq2ps',5Bh - dw sse_ps_instruction-instruction_handler - db 'cvtpd2dq',0E6h - dw cvtpd2dq_instruction-instruction_handler - db 'cvtpd2pi',2Dh - dw cvtpd2pi_instruction-instruction_handler - db 'cvtpd2ps',5Ah - dw sse_pd_instruction-instruction_handler - db 'cvtpi2pd',2Ah - dw cvtpi2pd_instruction-instruction_handler - db 'cvtpi2ps',2Ah - dw cvtpi2ps_instruction-instruction_handler - db 'cvtps2dq',5Bh - dw sse_pd_instruction-instruction_handler - db 'cvtps2pd',5Ah - dw cvtps2pd_instruction-instruction_handler - db 'cvtps2pi',2Dh - dw cvtps2pi_instruction-instruction_handler - db 'cvtsd2si',2Dh - dw cvtsd2si_instruction-instruction_handler - db 'cvtsd2ss',5Ah - dw sse_sd_instruction-instruction_handler - db 'cvtsi2sd',2Ah - dw cvtsi2sd_instruction-instruction_handler - db 'cvtsi2ss',2Ah - dw cvtsi2ss_instruction-instruction_handler - db 'cvtss2sd',5Ah - dw sse_ss_instruction-instruction_handler - db 'cvtss2si',2Dh - dw cvtss2si_instruction-instruction_handler - db 'fcmovnbe',0D0h - dw fcomi_instruction-instruction_handler - db 'fnstenvd',6 - dw fldenv_instruction_32bit-instruction_handler - db 'fnstenvw',6 - dw fldenv_instruction_16bit-instruction_handler - db 'fxsave64',0 - dw fxsave_instruction_64bit-instruction_handler - db 'insertps',0 - dw insertps_instruction-instruction_handler - db 'maskmovq',0 - dw maskmovq_instruction-instruction_handler - db 'movmskpd',0 - dw movmskpd_instruction-instruction_handler - db 'movmskps',0 - dw movmskps_instruction-instruction_handler - db 'movntdqa',2Ah - dw movntdqa_instruction-instruction_handler - db 'movshdup',16h - dw movshdup_instruction-instruction_handler - db 'movsldup',12h - dw movshdup_instruction-instruction_handler - db 'packssdw',6Bh - dw basic_mmx_instruction-instruction_handler - db 'packsswb',63h - dw basic_mmx_instruction-instruction_handler - db 'packusdw',2Bh - dw sse4_instruction_38-instruction_handler - db 'packuswb',67h - dw basic_mmx_instruction-instruction_handler - db 'pblendvb',10h - dw sse4_instruction_38_xmm0-instruction_handler - db 'pfrcpit1',0A6h - dw amd3dnow_instruction-instruction_handler - db 'pfrcpit2',0B6h - dw amd3dnow_instruction-instruction_handler - db 'pfrsqit1',0A7h - dw amd3dnow_instruction-instruction_handler - db 'pmovmskb',0D7h - dw pmovmskb_instruction-instruction_handler - db 'pmovsxbd',21h - dw pmovsxbd_instruction-instruction_handler - db 'pmovsxbq',22h - dw pmovsxbq_instruction-instruction_handler - db 'pmovsxbw',20h - dw pmovsxbw_instruction-instruction_handler - db 'pmovsxdq',25h - dw pmovsxdq_instruction-instruction_handler - db 'pmovsxwd',23h - dw pmovsxwd_instruction-instruction_handler - db 'pmovsxwq',24h - dw pmovsxwq_instruction-instruction_handler - db 'pmovzxbd',31h - dw pmovsxbd_instruction-instruction_handler - db 'pmovzxbq',32h - dw pmovsxbq_instruction-instruction_handler - db 'pmovzxbw',30h - dw pmovsxbw_instruction-instruction_handler - db 'pmovzxdq',35h - dw pmovsxdq_instruction-instruction_handler - db 'pmovzxwd',33h - dw pmovsxwd_instruction-instruction_handler - db 'pmovzxwq',34h - dw pmovsxwq_instruction-instruction_handler - db 'pmulhrsw',0Bh - dw ssse3_instruction-instruction_handler - db 'prefetch',0 - dw amd_prefetch_instruction-instruction_handler - db 'rdfsbase',0 - dw rdfsbase_instruction-instruction_handler - db 'rdgsbase',1 - dw rdfsbase_instruction-instruction_handler - db 'sysenter',34h - dw simple_extended_instruction-instruction_handler - db 'sysexitq',35h - dw simple_extended_instruction_64bit-instruction_handler - db 'unpckhpd',15h - dw sse_pd_instruction-instruction_handler - db 'unpckhps',15h - dw sse_ps_instruction-instruction_handler - db 'unpcklpd',14h - dw sse_pd_instruction-instruction_handler - db 'unpcklps',14h - dw sse_ps_instruction-instruction_handler - db 'vblendpd',0Dh - dw avx_instruction_3a_imm8-instruction_handler - db 'vblendps',0Ch - dw avx_instruction_3a_imm8-instruction_handler - db 'vcmpeqpd',0 - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpeqps',0 - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpeqsd',0 - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpeqss',0 - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpgepd',0Dh - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpgeps',0Dh - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpgesd',0Dh - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpgess',0Dh - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpgtpd',0Eh - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpgtps',0Eh - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpgtsd',0Eh - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpgtss',0Eh - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmplepd',2 - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpleps',2 - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmplesd',2 - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpless',2 - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpltpd',1 - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpltps',1 - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpltsd',1 - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpltss',1 - dw avx_cmp_ss_instruction-instruction_handler - db 'vfmaddpd',69h - dw fma4_instruction_p-instruction_handler - db 'vfmaddps',68h - dw fma4_instruction_p-instruction_handler - db 'vfmaddsd',6Bh - dw fma4_instruction_sd-instruction_handler - db 'vfmaddss',6Ah - dw fma4_instruction_ss-instruction_handler - db 'vfmsubpd',6Dh - dw fma4_instruction_p-instruction_handler - db 'vfmsubps',6Ch - dw fma4_instruction_p-instruction_handler - db 'vfmsubsd',6Fh - dw fma4_instruction_sd-instruction_handler - db 'vfmsubss',6Eh - dw fma4_instruction_ss-instruction_handler - db 'vldmxcsr',10b - dw vldmxcsr_instruction-instruction_handler - db 'vmlaunch',0C2h - dw simple_vmx_instruction-instruction_handler - db 'vmovddup',12h - dw avx_movddup_instruction-instruction_handler - db 'vmovhlps',12h - dw avx_movhlps_instruction-instruction_handler - db 'vmovlhps',16h - dw avx_movhlps_instruction-instruction_handler - db 'vmovntdq',0E7h - dw avx_movntpd_instruction-instruction_handler - db 'vmovntpd',2Bh - dw avx_movntpd_instruction-instruction_handler - db 'vmovntps',2Bh - dw avx_movntps_instruction-instruction_handler - db 'vmpsadbw',42h - dw avx_instruction_3a_imm8-instruction_handler - db 'vmresume',0C3h - dw simple_vmx_instruction-instruction_handler - db 'vpaddusb',0DCh - dw avx_pd_instruction-instruction_handler - db 'vpaddusw',0DDh - dw avx_pd_instruction-instruction_handler - db 'vpalignr',0Fh - dw avx_instruction_3a_imm8-instruction_handler - db 'vpblendd',2 - dw avx_instruction_3a_imm8-instruction_handler - db 'vpblendw',0Eh - dw avx_instruction_3a_imm8-instruction_handler - db 'vpcmpeqb',74h - dw avx_pd_instruction-instruction_handler - db 'vpcmpeqd',76h - dw avx_pd_instruction-instruction_handler - db 'vpcmpeqq',29h - dw avx_instruction_38-instruction_handler - db 'vpcmpeqw',75h - dw avx_pd_instruction-instruction_handler - db 'vpcmpgtb',64h - dw avx_pd_instruction-instruction_handler - db 'vpcmpgtd',66h - dw avx_pd_instruction-instruction_handler - db 'vpcmpgtq',37h - dw avx_instruction_38-instruction_handler - db 'vpcmpgtw',65h - dw avx_pd_instruction-instruction_handler - db 'vpcomeqb',4 - dw xop_pcom_b_instruction-instruction_handler - db 'vpcomeqd',4 - dw xop_pcom_d_instruction-instruction_handler - db 'vpcomeqq',4 - dw xop_pcom_q_instruction-instruction_handler - db 'vpcomeqw',4 - dw xop_pcom_w_instruction-instruction_handler - db 'vpcomgeb',3 - dw xop_pcom_b_instruction-instruction_handler - db 'vpcomged',3 - dw xop_pcom_d_instruction-instruction_handler - db 'vpcomgeq',3 - dw xop_pcom_q_instruction-instruction_handler - db 'vpcomgew',3 - dw xop_pcom_w_instruction-instruction_handler - db 'vpcomgtb',2 - dw xop_pcom_b_instruction-instruction_handler - db 'vpcomgtd',2 - dw xop_pcom_d_instruction-instruction_handler - db 'vpcomgtq',2 - dw xop_pcom_q_instruction-instruction_handler - db 'vpcomgtw',2 - dw xop_pcom_w_instruction-instruction_handler - db 'vpcomleb',1 - dw xop_pcom_b_instruction-instruction_handler - db 'vpcomled',1 - dw xop_pcom_d_instruction-instruction_handler - db 'vpcomleq',1 - dw xop_pcom_q_instruction-instruction_handler - db 'vpcomlew',1 - dw xop_pcom_w_instruction-instruction_handler - db 'vpcomltb',0 - dw xop_pcom_b_instruction-instruction_handler - db 'vpcomltd',0 - dw xop_pcom_d_instruction-instruction_handler - db 'vpcomltq',0 - dw xop_pcom_q_instruction-instruction_handler - db 'vpcomltw',0 - dw xop_pcom_w_instruction-instruction_handler - db 'vphaddbd',0C2h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphaddbq',0C3h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphaddbw',0C1h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphadddq',0CBh - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphaddsw',3 - dw avx_instruction_38-instruction_handler - db 'vphaddwd',0C6h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphaddwq',0C7h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphsubbw',0E1h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphsubdq',0E3h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphsubsw',7 - dw avx_instruction_38-instruction_handler - db 'vphsubwd',0E2h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vpmacsdd',9Eh - dw xop_triple_source_128bit_instruction-instruction_handler - db 'vpmacswd',96h - dw xop_triple_source_128bit_instruction-instruction_handler - db 'vpmacsww',95h - dw xop_triple_source_128bit_instruction-instruction_handler - db 'vpmaddwd',0F5h - dw avx_pd_instruction-instruction_handler - db 'vpmulhuw',0E4h - dw avx_pd_instruction-instruction_handler - db 'vpmuludq',0F4h - dw avx_pd_instruction-instruction_handler - db 'vpshufhw',0F3h - dw avx_pshufd_instruction-instruction_handler - db 'vpshuflw',0F2h - dw avx_pshufd_instruction-instruction_handler - db 'vpsubusb',0D8h - dw avx_pd_instruction-instruction_handler - db 'vpsubusw',0D9h - dw avx_pd_instruction-instruction_handler - db 'vroundpd',9 - dw avx_single_source_instruction_3a_imm8-instruction_handler - db 'vroundps',8 - dw avx_single_source_instruction_3a_imm8-instruction_handler - db 'vroundsd',0Bh - dw avx_sd_instruction_3a_imm8-instruction_handler - db 'vroundss',0Ah - dw avx_ss_instruction_3a_imm8-instruction_handler - db 'vrsqrtps',52h - dw avx_single_source_ps_instruction-instruction_handler - db 'vrsqrtss',52h - dw avx_ss_instruction-instruction_handler - db 'vstmxcsr',11b - dw vldmxcsr_instruction-instruction_handler - db 'vucomisd',2Eh - dw avx_comisd_instruction-instruction_handler - db 'vucomiss',2Eh - dw avx_comiss_instruction-instruction_handler - db 'vzeroall',77h - dw vzeroall_instruction-instruction_handler - db 'wrfsbase',2 - dw rdfsbase_instruction-instruction_handler - db 'wrgsbase',3 - dw rdfsbase_instruction-instruction_handler - db 'xacquire',0F2h - dw prefix_instruction-instruction_handler - db 'xrelease',0F3h - dw prefix_instruction-instruction_handler - db 'xrstor64',101b - dw fxsave_instruction_64bit-instruction_handler - db 'xsaveopt',110b - dw fxsave_instruction-instruction_handler -instructions_9: - db 'cmpxchg8b',8 - dw cmpxchgx_instruction-instruction_handler - db 'cvttpd2dq',0E6h - dw sse_pd_instruction-instruction_handler - db 'cvttpd2pi',2Ch - dw cvtpd2pi_instruction-instruction_handler - db 'cvttps2dq',5Bh - dw movshdup_instruction-instruction_handler - db 'cvttps2pi',2Ch - dw cvtps2pi_instruction-instruction_handler - db 'cvttsd2si',2Ch - dw cvtsd2si_instruction-instruction_handler - db 'cvttss2si',2Ch - dw cvtss2si_instruction-instruction_handler - db 'extractps',0 - dw extractps_instruction-instruction_handler - db 'fxrstor64',1 - dw fxsave_instruction_64bit-instruction_handler - db 'pclmulqdq',-1 - dw pclmulqdq_instruction-instruction_handler - db 'pcmpestri',61h - dw sse4_instruction_3a_imm8-instruction_handler - db 'pcmpestrm',60h - dw sse4_instruction_3a_imm8-instruction_handler - db 'pcmpistri',63h - dw sse4_instruction_3a_imm8-instruction_handler - db 'pcmpistrm',62h - dw sse4_instruction_3a_imm8-instruction_handler - db 'pmaddubsw',4 - dw ssse3_instruction-instruction_handler - db 'prefetchw',1 - dw amd_prefetch_instruction-instruction_handler - db 'punpckhbw',68h - dw basic_mmx_instruction-instruction_handler - db 'punpckhdq',6Ah - dw basic_mmx_instruction-instruction_handler - db 'punpckhwd',69h - dw basic_mmx_instruction-instruction_handler - db 'punpcklbw',60h - dw basic_mmx_instruction-instruction_handler - db 'punpckldq',62h - dw basic_mmx_instruction-instruction_handler - db 'punpcklwd',61h - dw basic_mmx_instruction-instruction_handler - db 'vaddsubpd',0D0h - dw avx_pd_instruction-instruction_handler - db 'vaddsubps',0D0h - dw avx_haddps_instruction-instruction_handler - db 'vblendvpd',4Bh - dw avx_triple_source_instruction_3a-instruction_handler - db 'vblendvps',4Ah - dw avx_triple_source_instruction_3a-instruction_handler - db 'vcmpneqpd',4 - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpneqps',4 - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpneqsd',4 - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpneqss',4 - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpngepd',9 - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpngeps',9 - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpngesd',9 - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpngess',9 - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpngtpd',0Ah - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpngtps',0Ah - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpngtsd',0Ah - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpngtss',0Ah - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpnlepd',6 - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpnleps',6 - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpnlesd',6 - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpnless',6 - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpnltpd',5 - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpnltps',5 - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpnltsd',5 - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpnltss',5 - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpordpd',7 - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpordps',7 - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpordsd',7 - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpordss',7 - dw avx_cmp_ss_instruction-instruction_handler - db 'vcvtdq2pd',0E6h - dw avx_cvtdq2pd_instruction-instruction_handler - db 'vcvtdq2ps',5Bh - dw avx_single_source_ps_instruction-instruction_handler - db 'vcvtpd2dq',0E6h - dw avx_cvtpd2dq_instruction-instruction_handler - db 'vcvtpd2ps',5Ah - dw avx_cvtpd2ps_instruction-instruction_handler - db 'vcvtph2ps',13h - dw vcvtph2ps_instruction-instruction_handler - db 'vcvtps2dq',5Bh - dw avx_single_source_pd_instruction-instruction_handler - db 'vcvtps2pd',5Ah - dw avx_cvtps2pd_instruction-instruction_handler - db 'vcvtps2ph',1Dh - dw vcvtps2ph_instruction-instruction_handler - db 'vcvtsd2si',2Dh - dw avx_cvtsd2si_instruction-instruction_handler - db 'vcvtsd2ss',5Ah - dw avx_sd_instruction-instruction_handler - db 'vcvtsi2sd',2Ah - dw avx_cvtsi2sd_instruction-instruction_handler - db 'vcvtsi2ss',2Ah - dw avx_cvtsi2ss_instruction-instruction_handler - db 'vcvtss2sd',5Ah - dw avx_ss_instruction-instruction_handler - db 'vcvtss2si',2Dh - dw avx_cvtss2si_instruction-instruction_handler - db 'vfnmaddpd',79h - dw fma4_instruction_p-instruction_handler - db 'vfnmaddps',78h - dw fma4_instruction_p-instruction_handler - db 'vfnmaddsd',7Bh - dw fma4_instruction_sd-instruction_handler - db 'vfnmaddss',7Ah - dw fma4_instruction_ss-instruction_handler - db 'vfnmsubpd',7Dh - dw fma4_instruction_p-instruction_handler - db 'vfnmsubps',7Ch - dw fma4_instruction_p-instruction_handler - db 'vfnmsubsd',7Fh - dw fma4_instruction_sd-instruction_handler - db 'vfnmsubss',7Eh - dw fma4_instruction_ss-instruction_handler - db 'vinsertps',0 - dw avx_insertps_instruction-instruction_handler - db 'vmovmskpd',0 - dw avx_movmskpd_instruction-instruction_handler - db 'vmovmskps',0 - dw avx_movmskps_instruction-instruction_handler - db 'vmovntdqa',2Ah - dw avx_movntdqa_instruction-instruction_handler - db 'vmovshdup',16h - dw avx_movshdup_instruction-instruction_handler - db 'vmovsldup',12h - dw avx_movshdup_instruction-instruction_handler - db 'vpackssdw',6Bh - dw avx_pd_instruction-instruction_handler - db 'vpacksswb',63h - dw avx_pd_instruction-instruction_handler - db 'vpackusdw',2Bh - dw avx_instruction_38-instruction_handler - db 'vpackuswb',67h - dw avx_pd_instruction-instruction_handler - db 'vpblendvb',4Ch - dw avx_triple_source_instruction_3a-instruction_handler - db 'vpcomequb',4 - dw xop_pcom_ub_instruction-instruction_handler - db 'vpcomequd',4 - dw xop_pcom_ud_instruction-instruction_handler - db 'vpcomequq',4 - dw xop_pcom_uq_instruction-instruction_handler - db 'vpcomequw',4 - dw xop_pcom_uw_instruction-instruction_handler - db 'vpcomgeub',3 - dw xop_pcom_ub_instruction-instruction_handler - db 'vpcomgeud',3 - dw xop_pcom_ud_instruction-instruction_handler - db 'vpcomgeuq',3 - dw xop_pcom_uq_instruction-instruction_handler - db 'vpcomgeuw',3 - dw xop_pcom_uw_instruction-instruction_handler - db 'vpcomgtub',2 - dw xop_pcom_ub_instruction-instruction_handler - db 'vpcomgtud',2 - dw xop_pcom_ud_instruction-instruction_handler - db 'vpcomgtuq',2 - dw xop_pcom_uq_instruction-instruction_handler - db 'vpcomgtuw',2 - dw xop_pcom_uw_instruction-instruction_handler - db 'vpcomleub',1 - dw xop_pcom_ub_instruction-instruction_handler - db 'vpcomleud',1 - dw xop_pcom_ud_instruction-instruction_handler - db 'vpcomleuq',1 - dw xop_pcom_uq_instruction-instruction_handler - db 'vpcomleuw',1 - dw xop_pcom_uw_instruction-instruction_handler - db 'vpcomltub',0 - dw xop_pcom_ub_instruction-instruction_handler - db 'vpcomltud',0 - dw xop_pcom_ud_instruction-instruction_handler - db 'vpcomltuq',0 - dw xop_pcom_uq_instruction-instruction_handler - db 'vpcomltuw',0 - dw xop_pcom_uw_instruction-instruction_handler - db 'vpcomneqb',5 - dw xop_pcom_b_instruction-instruction_handler - db 'vpcomneqd',5 - dw xop_pcom_d_instruction-instruction_handler - db 'vpcomneqq',5 - dw xop_pcom_q_instruction-instruction_handler - db 'vpcomneqw',5 - dw xop_pcom_w_instruction-instruction_handler - db 'vpermilpd',5 - dw avx_permil_instruction-instruction_handler - db 'vpermilps',4 - dw avx_permil_instruction-instruction_handler - db 'vphaddubd',0D2h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphaddubq',0D3h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphaddubw',0D1h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphaddudq',0DBh - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphadduwd',0D6h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vphadduwq',0D7h - dw xop_single_source_128bit_instruction-instruction_handler - db 'vpmacsdqh',9Fh - dw xop_triple_source_128bit_instruction-instruction_handler - db 'vpmacsdql',97h - dw xop_triple_source_128bit_instruction-instruction_handler - db 'vpmacssdd',8Eh - dw xop_triple_source_128bit_instruction-instruction_handler - db 'vpmacsswd',86h - dw xop_triple_source_128bit_instruction-instruction_handler - db 'vpmacssww',85h - dw xop_triple_source_128bit_instruction-instruction_handler - db 'vpmadcswd',0B6h - dw xop_triple_source_128bit_instruction-instruction_handler - db 'vpmovmskb',0D7h - dw avx_pmovmskb_instruction-instruction_handler - db 'vpmovsxbd',21h - dw avx_pmovsxbd_instruction-instruction_handler - db 'vpmovsxbq',22h - dw avx_pmovsxbq_instruction-instruction_handler - db 'vpmovsxbw',20h - dw avx_pmovsxbw_instruction-instruction_handler - db 'vpmovsxdq',25h - dw avx_pmovsxdq_instruction-instruction_handler - db 'vpmovsxwd',23h - dw avx_pmovsxwd_instruction-instruction_handler - db 'vpmovsxwq',24h - dw avx_pmovsxwq_instruction-instruction_handler - db 'vpmovzxbd',31h - dw avx_pmovsxbd_instruction-instruction_handler - db 'vpmovzxbq',32h - dw avx_pmovsxbq_instruction-instruction_handler - db 'vpmovzxbw',30h - dw avx_pmovsxbw_instruction-instruction_handler - db 'vpmovzxdq',35h - dw avx_pmovsxdq_instruction-instruction_handler - db 'vpmovzxwd',33h - dw avx_pmovsxwd_instruction-instruction_handler - db 'vpmovzxwq',34h - dw avx_pmovsxwq_instruction-instruction_handler - db 'vpmulhrsw',0Bh - dw avx_instruction_38-instruction_handler - db 'vunpckhpd',15h - dw avx_pd_instruction-instruction_handler - db 'vunpckhps',15h - dw avx_ps_instruction-instruction_handler - db 'vunpcklpd',14h - dw avx_pd_instruction-instruction_handler - db 'vunpcklps',14h - dw avx_ps_instruction-instruction_handler -instructions_10: - db 'aesdeclast',0DFh - dw sse4_instruction_38-instruction_handler - db 'aesenclast',0DDh - dw sse4_instruction_38-instruction_handler - db 'cmpunordpd',3 - dw cmp_pd_instruction-instruction_handler - db 'cmpunordps',3 - dw cmp_ps_instruction-instruction_handler - db 'cmpunordsd',3 - dw cmp_sd_instruction-instruction_handler - db 'cmpunordss',3 - dw cmp_ss_instruction-instruction_handler - db 'cmpxchg16b',16 - dw cmpxchgx_instruction-instruction_handler - db 'loadall286',5 - dw simple_extended_instruction-instruction_handler - db 'loadall386',7 - dw simple_extended_instruction-instruction_handler - db 'maskmovdqu',0 - dw maskmovdqu_instruction-instruction_handler - db 'phminposuw',41h - dw sse4_instruction_38-instruction_handler - db 'prefetcht0',1 - dw prefetch_instruction-instruction_handler - db 'prefetcht1',2 - dw prefetch_instruction-instruction_handler - db 'prefetcht2',3 - dw prefetch_instruction-instruction_handler - db 'punpckhqdq',6Dh - dw sse_pd_instruction-instruction_handler - db 'punpcklqdq',6Ch - dw sse_pd_instruction-instruction_handler - db 'vcmptruepd',0Fh - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmptrueps',0Fh - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmptruesd',0Fh - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmptruess',0Fh - dw avx_cmp_ss_instruction-instruction_handler - db 'vcvttpd2dq',0E6h - dw avx_cvtpd2ps_instruction-instruction_handler - db 'vcvttps2dq',5Bh - dw avx_cvttps2dq_instruction-instruction_handler - db 'vcvttsd2si',2Ch - dw avx_cvtsd2si_instruction-instruction_handler - db 'vcvttss2si',2Ch - dw avx_cvtss2si_instruction-instruction_handler - db 'vextractps',0 - dw avx_extractps_instruction-instruction_handler - db 'vgatherdpd',92h - dw gather_instruction_pd-instruction_handler - db 'vgatherdps',92h - dw gather_instruction_ps-instruction_handler - db 'vgatherqpd',93h - dw gather_instruction_pd-instruction_handler - db 'vgatherqps',93h - dw gather_instruction_ps-instruction_handler - db 'vmaskmovpd',2Dh - dw avx_maskmov_instruction-instruction_handler - db 'vmaskmovps',2Ch - dw avx_maskmov_instruction-instruction_handler - db 'vpclmulqdq',-1 - dw avx_pclmulqdq_instruction-instruction_handler - db 'vpcmpestri',61h - dw avx_single_source_128bit_instruction_3a_imm8-instruction_handler - db 'vpcmpestrm',60h - dw avx_single_source_128bit_instruction_3a_imm8-instruction_handler - db 'vpcmpistri',63h - dw avx_single_source_128bit_instruction_3a_imm8-instruction_handler - db 'vpcmpistrm',62h - dw avx_single_source_128bit_instruction_3a_imm8-instruction_handler - db 'vpcomnequb',5 - dw xop_pcom_ub_instruction-instruction_handler - db 'vpcomnequd',5 - dw xop_pcom_ud_instruction-instruction_handler - db 'vpcomnequq',5 - dw xop_pcom_uq_instruction-instruction_handler - db 'vpcomnequw',5 - dw xop_pcom_uw_instruction-instruction_handler - db 'vpcomtrueb',7 - dw xop_pcom_b_instruction-instruction_handler - db 'vpcomtrued',7 - dw xop_pcom_d_instruction-instruction_handler - db 'vpcomtrueq',7 - dw xop_pcom_q_instruction-instruction_handler - db 'vpcomtruew',7 - dw xop_pcom_w_instruction-instruction_handler - db 'vperm2f128',6 - dw avx_perm2f128_instruction-instruction_handler - db 'vperm2i128',46h - dw avx_perm2f128_instruction-instruction_handler - db 'vpermil2pd',49h - dw vpermil2_instruction-instruction_handler - db 'vpermil2ps',48h - dw vpermil2_instruction-instruction_handler - db 'vpgatherdd',90h - dw gather_instruction_ps-instruction_handler - db 'vpgatherdq',90h - dw gather_instruction_pd-instruction_handler - db 'vpgatherqd',91h - dw gather_instruction_ps-instruction_handler - db 'vpgatherqq',91h - dw gather_instruction_pd-instruction_handler - db 'vpmacssdqh',8Fh - dw xop_triple_source_128bit_instruction-instruction_handler - db 'vpmacssdql',87h - dw xop_triple_source_128bit_instruction-instruction_handler - db 'vpmadcsswd',0A6h - dw xop_triple_source_128bit_instruction-instruction_handler - db 'vpmaddubsw',4 - dw avx_instruction_38-instruction_handler - db 'vpmaskmovd',8Ch - dw avx_maskmov_instruction-instruction_handler - db 'vpmaskmovq',8Ch - dw avx_maskmov_w1_instruction-instruction_handler - db 'vpunpckhbw',68h - dw avx_pd_instruction-instruction_handler - db 'vpunpckhdq',6Ah - dw avx_pd_instruction-instruction_handler - db 'vpunpckhwd',69h - dw avx_pd_instruction-instruction_handler - db 'vpunpcklbw',60h - dw avx_pd_instruction-instruction_handler - db 'vpunpckldq',62h - dw avx_pd_instruction-instruction_handler - db 'vpunpcklwd',61h - dw avx_pd_instruction-instruction_handler - db 'vzeroupper',77h - dw vzeroupper_instruction-instruction_handler - db 'xsaveopt64',110b - dw fxsave_instruction_64bit-instruction_handler -instructions_11: - db 'pclmulhqhdq',10001b - dw pclmulqdq_instruction-instruction_handler - db 'pclmullqhdq',10000b - dw pclmulqdq_instruction-instruction_handler - db 'prefetchnta',0 - dw prefetch_instruction-instruction_handler - db 'vaesdeclast',0DFh - dw avx_128bit_instruction_38-instruction_handler - db 'vaesenclast',0DDh - dw avx_128bit_instruction_38-instruction_handler - db 'vcmpeq_ospd',10h - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpeq_osps',10h - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpeq_ossd',10h - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpeq_osss',10h - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpeq_uqpd',8 - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpeq_uqps',8 - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpeq_uqsd',8 - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpeq_uqss',8 - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpeq_uspd',18h - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpeq_usps',18h - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpeq_ussd',18h - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpeq_usss',18h - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpfalsepd',0Bh - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpfalseps',0Bh - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpfalsesd',0Bh - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpfalsess',0Bh - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpge_oqpd',1Dh - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpge_oqps',1Dh - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpge_oqsd',1Dh - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpge_oqss',1Dh - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpgt_oqpd',1Eh - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpgt_oqps',1Eh - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpgt_oqsd',1Eh - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpgt_oqss',1Eh - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmple_oqpd',12h - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmple_oqps',12h - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmple_oqsd',12h - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmple_oqss',12h - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmplt_oqpd',11h - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmplt_oqps',11h - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmplt_oqsd',11h - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmplt_oqss',11h - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpord_spd',17h - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpord_sps',17h - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpord_ssd',17h - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpord_sss',17h - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpunordpd',3 - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpunordps',3 - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpunordsd',3 - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpunordss',3 - dw avx_cmp_ss_instruction-instruction_handler - db 'vfmadd132pd',98h - dw fma_instruction_pd-instruction_handler - db 'vfmadd132ps',98h - dw fma_instruction_ps-instruction_handler - db 'vfmadd132sd',99h - dw fma_instruction_sd-instruction_handler - db 'vfmadd132ss',99h - dw fma_instruction_ss-instruction_handler - db 'vfmadd213pd',0A8h - dw fma_instruction_pd-instruction_handler - db 'vfmadd213ps',0A8h - dw fma_instruction_ps-instruction_handler - db 'vfmadd213sd',0A9h - dw fma_instruction_sd-instruction_handler - db 'vfmadd213ss',0A9h - dw fma_instruction_ss-instruction_handler - db 'vfmadd231pd',0B8h - dw fma_instruction_pd-instruction_handler - db 'vfmadd231ps',0B8h - dw fma_instruction_ps-instruction_handler - db 'vfmadd231sd',0B9h - dw fma_instruction_sd-instruction_handler - db 'vfmadd231ss',0B9h - dw fma_instruction_ss-instruction_handler - db 'vfmaddsubpd',5Dh - dw fma4_instruction_p-instruction_handler - db 'vfmaddsubps',5Ch - dw fma4_instruction_p-instruction_handler - db 'vfmsub132pd',9Ah - dw fma_instruction_pd-instruction_handler - db 'vfmsub132ps',9Ah - dw fma_instruction_ps-instruction_handler - db 'vfmsub132sd',9Bh - dw fma_instruction_sd-instruction_handler - db 'vfmsub132ss',9Bh - dw fma_instruction_ss-instruction_handler - db 'vfmsub213pd',0AAh - dw fma_instruction_pd-instruction_handler - db 'vfmsub213ps',0AAh - dw fma_instruction_ps-instruction_handler - db 'vfmsub213sd',0ABh - dw fma_instruction_sd-instruction_handler - db 'vfmsub213ss',0ABh - dw fma_instruction_ss-instruction_handler - db 'vfmsub231pd',0BAh - dw fma_instruction_pd-instruction_handler - db 'vfmsub231ps',0BAh - dw fma_instruction_ps-instruction_handler - db 'vfmsub231sd',0BBh - dw fma_instruction_sd-instruction_handler - db 'vfmsub231ss',0BBh - dw fma_instruction_ss-instruction_handler - db 'vfmsubaddpd',5Fh - dw fma4_instruction_p-instruction_handler - db 'vfmsubaddps',5Eh - dw fma4_instruction_p-instruction_handler - db 'vinsertf128',18h - dw avx_insertf128_instruction-instruction_handler - db 'vinserti128',38h - dw avx_insertf128_instruction-instruction_handler - db 'vmaskmovdqu',0 - dw avx_maskmovdqu_instruction-instruction_handler - db 'vpcomfalseb',6 - dw xop_pcom_b_instruction-instruction_handler - db 'vpcomfalsed',6 - dw xop_pcom_d_instruction-instruction_handler - db 'vpcomfalseq',6 - dw xop_pcom_q_instruction-instruction_handler - db 'vpcomfalsew',6 - dw xop_pcom_w_instruction-instruction_handler - db 'vpcomtrueub',7 - dw xop_pcom_ub_instruction-instruction_handler - db 'vpcomtrueud',7 - dw xop_pcom_ud_instruction-instruction_handler - db 'vpcomtrueuq',7 - dw xop_pcom_uq_instruction-instruction_handler - db 'vpcomtrueuw',7 - dw xop_pcom_uw_instruction-instruction_handler - db 'vphminposuw',41h - dw avx_single_source_instruction_38-instruction_handler - db 'vpunpckhqdq',6Dh - dw avx_pd_instruction-instruction_handler - db 'vpunpcklqdq',6Ch - dw avx_pd_instruction-instruction_handler -instructions_12: - db 'pclmulhqhqdq',10001b - dw pclmulqdq_instruction-instruction_handler - db 'pclmulhqlqdq',1 - dw pclmulqdq_instruction-instruction_handler - db 'pclmullqhqdq',10000b - dw pclmulqdq_instruction-instruction_handler - db 'pclmullqlqdq',0 - dw pclmulqdq_instruction-instruction_handler - db 'vbroadcastsd',19h - dw avx_broadcastsd_instruction-instruction_handler - db 'vbroadcastss',18h - dw avx_broadcastss_instruction-instruction_handler - db 'vcmpneq_oqpd',0Ch - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpneq_oqps',0Ch - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpneq_oqsd',0Ch - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpneq_oqss',0Ch - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpneq_ospd',1Ch - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpneq_osps',1Ch - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpneq_ossd',1Ch - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpneq_osss',1Ch - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpneq_uspd',14h - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpneq_usps',14h - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpneq_ussd',14h - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpneq_usss',14h - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpnge_uqpd',19h - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpnge_uqps',19h - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpnge_uqsd',19h - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpnge_uqss',19h - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpngt_uqpd',1Ah - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpngt_uqps',1Ah - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpngt_uqsd',1Ah - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpngt_uqss',1Ah - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpnle_uqpd',16h - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpnle_uqps',16h - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpnle_uqsd',16h - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpnle_uqss',16h - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpnlt_uqpd',15h - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpnlt_uqps',15h - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpnlt_uqsd',15h - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpnlt_uqss',15h - dw avx_cmp_ss_instruction-instruction_handler - db 'vextractf128',19h - dw avx_extractf128_instruction-instruction_handler - db 'vextracti128',39h - dw avx_extractf128_instruction-instruction_handler - db 'vfnmadd132pd',9Ch - dw fma_instruction_pd-instruction_handler - db 'vfnmadd132ps',9Ch - dw fma_instruction_ps-instruction_handler - db 'vfnmadd132sd',9Dh - dw fma_instruction_sd-instruction_handler - db 'vfnmadd132ss',9Dh - dw fma_instruction_ss-instruction_handler - db 'vfnmadd213pd',0ACh - dw fma_instruction_pd-instruction_handler - db 'vfnmadd213ps',0ACh - dw fma_instruction_ps-instruction_handler - db 'vfnmadd213sd',0ADh - dw fma_instruction_sd-instruction_handler - db 'vfnmadd213ss',0ADh - dw fma_instruction_ss-instruction_handler - db 'vfnmadd231pd',0BCh - dw fma_instruction_pd-instruction_handler - db 'vfnmadd231ps',0BCh - dw fma_instruction_ps-instruction_handler - db 'vfnmadd231sd',0BDh - dw fma_instruction_sd-instruction_handler - db 'vfnmadd231ss',0BDh - dw fma_instruction_ss-instruction_handler - db 'vfnmsub132pd',9Eh - dw fma_instruction_pd-instruction_handler - db 'vfnmsub132ps',9Eh - dw fma_instruction_ps-instruction_handler - db 'vfnmsub132sd',9Fh - dw fma_instruction_sd-instruction_handler - db 'vfnmsub132ss',9Fh - dw fma_instruction_ss-instruction_handler - db 'vfnmsub213pd',0AEh - dw fma_instruction_pd-instruction_handler - db 'vfnmsub213ps',0AEh - dw fma_instruction_ps-instruction_handler - db 'vfnmsub213sd',0AFh - dw fma_instruction_sd-instruction_handler - db 'vfnmsub213ss',0AFh - dw fma_instruction_ss-instruction_handler - db 'vfnmsub231pd',0BEh - dw fma_instruction_pd-instruction_handler - db 'vfnmsub231ps',0BEh - dw fma_instruction_ps-instruction_handler - db 'vfnmsub231sd',0BFh - dw fma_instruction_sd-instruction_handler - db 'vfnmsub231ss',0BFh - dw fma_instruction_ss-instruction_handler - db 'vpbroadcastb',78h - dw avx_pbroadcastb_instruction-instruction_handler - db 'vpbroadcastd',58h - dw avx_pbroadcastd_instruction-instruction_handler - db 'vpbroadcastq',59h - dw avx_pbroadcastq_instruction-instruction_handler - db 'vpbroadcastw',79h - dw avx_pbroadcastw_instruction-instruction_handler - db 'vpclmulhqhdq',10001b - dw avx_pclmulqdq_instruction-instruction_handler - db 'vpclmullqhdq',10000b - dw avx_pclmulqdq_instruction-instruction_handler - db 'vpcomfalseub',6 - dw xop_pcom_ub_instruction-instruction_handler - db 'vpcomfalseud',6 - dw xop_pcom_ud_instruction-instruction_handler - db 'vpcomfalseuq',6 - dw xop_pcom_uq_instruction-instruction_handler - db 'vpcomfalseuw',6 - dw xop_pcom_uw_instruction-instruction_handler - db 'vpermilmo2pd',10b - dw vpermil_2pd_instruction-instruction_handler - db 'vpermilmo2ps',10b - dw vpermil_2ps_instruction-instruction_handler - db 'vpermilmz2pd',11b - dw vpermil_2pd_instruction-instruction_handler - db 'vpermilmz2ps',11b - dw vpermil_2ps_instruction-instruction_handler - db 'vpermiltd2pd',0 - dw vpermil_2pd_instruction-instruction_handler - db 'vpermiltd2ps',0 - dw vpermil_2ps_instruction-instruction_handler -instructions_13: - db 'vcmptrue_uspd',1Fh - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmptrue_usps',1Fh - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmptrue_ussd',1Fh - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmptrue_usss',1Fh - dw avx_cmp_ss_instruction-instruction_handler - db 'vcmpunord_spd',13h - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpunord_sps',13h - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpunord_ssd',13h - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpunord_sss',13h - dw avx_cmp_ss_instruction-instruction_handler - db 'vpclmulhqlqdq',1 - dw avx_pclmulqdq_instruction-instruction_handler - db 'vpclmullqlqdq',0 - dw avx_pclmulqdq_instruction-instruction_handler -instructions_14: - db 'vbroadcastf128',1Ah - dw avx_broadcastf128_instruction-instruction_handler - db 'vbroadcasti128',5Ah - dw avx_broadcastf128_instruction-instruction_handler - db 'vcmpfalse_ospd',1Bh - dw avx_cmp_pd_instruction-instruction_handler - db 'vcmpfalse_osps',1Bh - dw avx_cmp_ps_instruction-instruction_handler - db 'vcmpfalse_ossd',1Bh - dw avx_cmp_sd_instruction-instruction_handler - db 'vcmpfalse_osss',1Bh - dw avx_cmp_ss_instruction-instruction_handler - db 'vfmaddsub132pd',96h - dw fma_instruction_pd-instruction_handler - db 'vfmaddsub132ps',96h - dw fma_instruction_ps-instruction_handler - db 'vfmaddsub213pd',0A6h - dw fma_instruction_pd-instruction_handler - db 'vfmaddsub213ps',0A6h - dw fma_instruction_ps-instruction_handler - db 'vfmaddsub231pd',0B6h - dw fma_instruction_pd-instruction_handler - db 'vfmaddsub231ps',0B6h - dw fma_instruction_ps-instruction_handler - db 'vfmsubadd132pd',97h - dw fma_instruction_pd-instruction_handler - db 'vfmsubadd132ps',97h - dw fma_instruction_ps-instruction_handler - db 'vfmsubadd213pd',0A7h - dw fma_instruction_pd-instruction_handler - db 'vfmsubadd213ps',0A7h - dw fma_instruction_ps-instruction_handler - db 'vfmsubadd231pd',0B7h - dw fma_instruction_pd-instruction_handler - db 'vfmsubadd231ps',0B7h - dw fma_instruction_ps-instruction_handler -instructions_15: - db 'aeskeygenassist',0DFh - dw sse4_instruction_3a_imm8-instruction_handler -instructions_16: - db 'vaeskeygenassist',0DFh - dw avx_single_source_128bit_instruction_3a_imm8-instruction_handler -instructions_end: - -data_directives: - dw data_directives_2-data_directives,(data_directives_3-data_directives_2)/(2+3) - dw data_directives_3-data_directives,(data_directives_4-data_directives_3)/(3+3) - dw data_directives_4-data_directives,(data_directives_end-data_directives_4)/(4+3) - -data_directives_2: - db 'db',1 - dw data_bytes-instruction_handler - db 'dd',4 - dw data_dwords-instruction_handler - db 'df',6 - dw data_pwords-instruction_handler - db 'dp',6 - dw data_pwords-instruction_handler - db 'dq',8 - dw data_qwords-instruction_handler - db 'dt',10 - dw data_twords-instruction_handler - db 'du',2 - dw data_unicode-instruction_handler - db 'dw',2 - dw data_words-instruction_handler - db 'rb',1 - dw reserve_bytes-instruction_handler - db 'rd',4 - dw reserve_dwords-instruction_handler - db 'rf',6 - dw reserve_pwords-instruction_handler - db 'rp',6 - dw reserve_pwords-instruction_handler - db 'rq',8 - dw reserve_qwords-instruction_handler - db 'rt',10 - dw reserve_twords-instruction_handler - db 'rw',2 - dw reserve_words-instruction_handler -data_directives_3: -data_directives_4: - db 'file',1 - dw data_file-instruction_handler -data_directives_end: + +; flat assembler core +; Copyright (c) 1999-2013, Tomasz Grysztar. +; All rights reserved. + +include_variable db 'INCLUDE',0 + +symbol_characters db 27 + db 9,0Ah,0Dh,1Ah,20h,'+-/*=<>()[]{}:,|&~#`;\' + +preprocessor_directives: + db 6,'define' + dw define_symbolic_constant-directive_handler + db 7,'include' + dw include_file-directive_handler + db 3,'irp' + dw irp_directive-directive_handler + db 4,'irps' + dw irps_directive-directive_handler + db 5,'macro' + dw define_macro-directive_handler + db 5,'match' + dw match_directive-directive_handler + db 5,'purge' + dw purge_macro-directive_handler + db 4,'rept' + dw rept_directive-directive_handler + db 7,'restore' + dw restore_equ_constant-directive_handler + db 7,'restruc' + dw purge_struc-directive_handler + db 5,'struc' + dw define_struc-directive_handler + db 0 + +macro_directives: + db 6,'common' + dw common_block-directive_handler + db 7,'forward' + dw forward_block-directive_handler + db 5,'local' + dw local_symbols-directive_handler + db 7,'reverse' + dw reverse_block-directive_handler + db 0 + +operators: + db 1,'+',80h + db 1,'-',81h + db 1,'*',90h + db 1,'/',91h + db 3,'and',0B0h + db 3,'mod',0A0h + db 2,'or',0B1h + db 3,'shl',0C0h + db 3,'shr',0C1h + db 3,'xor',0B2h + db 0 + +single_operand_operators: + db 1,'+',82h + db 1,'-',83h + db 3,'not',0D0h + db 3,'plt',0E1h + db 3,'rva',0E0h + db 0 + +directive_operators: + db 5,'align',8Ch + db 2,'as',86h + db 2,'at',80h + db 7,'defined',88h + db 3,'dup',81h + db 2,'eq',0F0h + db 6,'eqtype',0F7h + db 4,'from',82h + db 2,'in',0F6h + db 2,'on',84h + db 3,'ptr',85h + db 10,'relativeto',0F8h + db 4,'used',89h + db 0 + +address_sizes: + db 4,'byte',1 + db 5,'dword',4 + db 5,'qword',8 + db 4,'word',2 + db 0 + +symbols: + dw symbols_2-symbols,(symbols_3-symbols_2)/(2+2) + dw symbols_3-symbols,(symbols_4-symbols_3)/(3+2) + dw symbols_4-symbols,(symbols_5-symbols_4)/(4+2) + dw symbols_5-symbols,(symbols_6-symbols_5)/(5+2) + dw symbols_6-symbols,(symbols_7-symbols_6)/(6+2) + dw symbols_7-symbols,(symbols_8-symbols_7)/(7+2) + dw symbols_8-symbols,(symbols_9-symbols_8)/(8+2) + dw symbols_9-symbols,(symbols_10-symbols_9)/(9+2) + dw symbols_10-symbols,(symbols_11-symbols_10)/(10+2) + dw symbols_11-symbols,(symbols_end-symbols_11)/(11+2) + +symbols_2: + db 'ah',10h,04h + db 'al',10h,10h + db 'ax',10h,20h + db 'bh',10h,07h + db 'bl',10h,13h + db 'bp',10h,25h + db 'bx',10h,23h + db 'ch',10h,05h + db 'cl',10h,11h + db 'cs',10h,62h + db 'cx',10h,21h + db 'dh',10h,06h + db 'di',10h,27h + db 'dl',10h,12h + db 'ds',10h,64h + db 'dx',10h,22h + db 'es',10h,61h + db 'fs',10h,65h + db 'gs',10h,66h + db 'ms',1Ch,41h + db 'mz',18h,20h + db 'nx',1Bh,83h + db 'pe',18h,30h + db 'r8',10h,88h + db 'r9',10h,89h + db 'si',10h,26h + db 'sp',10h,24h + db 'ss',10h,63h + db 'st',10h,0A0h +symbols_3: + db 'bpl',10h,15h + db 'cr0',10h,50h + db 'cr1',10h,51h + db 'cr2',10h,52h + db 'cr3',10h,53h + db 'cr4',10h,54h + db 'cr5',10h,55h + db 'cr6',10h,56h + db 'cr7',10h,57h + db 'cr8',10h,58h + db 'cr9',10h,59h + db 'dil',10h,17h + db 'dll',1Bh,80h + db 'dr0',10h,70h + db 'dr1',10h,71h + db 'dr2',10h,72h + db 'dr3',10h,73h + db 'dr4',10h,74h + db 'dr5',10h,75h + db 'dr6',10h,76h + db 'dr7',10h,77h + db 'dr8',10h,78h + db 'dr9',10h,79h + db 'eax',10h,40h + db 'ebp',10h,45h + db 'ebx',10h,43h + db 'ecx',10h,41h + db 'edi',10h,47h + db 'edx',10h,42h + db 'efi',1Bh,10 + db 'eip',10h,0F4h + db 'elf',18h,50h + db 'esi',10h,46h + db 'esp',10h,44h + db 'far',12h,3 + db 'gui',1Bh,2 + db 'mm0',10h,0B0h + db 'mm1',10h,0B1h + db 'mm2',10h,0B2h + db 'mm3',10h,0B3h + db 'mm4',10h,0B4h + db 'mm5',10h,0B5h + db 'mm6',10h,0B6h + db 'mm7',10h,0B7h + db 'r10',10h,8Ah + db 'r11',10h,8Bh + db 'r12',10h,8Ch + db 'r13',10h,8Dh + db 'r14',10h,8Eh + db 'r15',10h,8Fh + db 'r8b',10h,18h + db 'r8d',10h,48h + db 'r8l',10h,18h + db 'r8w',10h,28h + db 'r9b',10h,19h + db 'r9d',10h,49h + db 'r9l',10h,19h + db 'r9w',10h,29h + db 'rax',10h,80h + db 'rbp',10h,85h + db 'rbx',10h,83h + db 'rcx',10h,81h + db 'rdi',10h,87h + db 'rdx',10h,82h + db 'rip',10h,0F8h + db 'rsi',10h,86h + db 'rsp',10h,84h + db 'sil',10h,16h + db 'spl',10h,14h + db 'st0',10h,0A0h + db 'st1',10h,0A1h + db 'st2',10h,0A2h + db 'st3',10h,0A3h + db 'st4',10h,0A4h + db 'st5',10h,0A5h + db 'st6',10h,0A6h + db 'st7',10h,0A7h + db 'tr0',10h,90h + db 'tr1',10h,91h + db 'tr2',10h,92h + db 'tr3',10h,93h + db 'tr4',10h,94h + db 'tr5',10h,95h + db 'tr6',10h,96h + db 'tr7',10h,97h + db 'wdm',1Bh,81h +symbols_4: + db 'byte',11h,1 + db 'code',19h,5 + db 'coff',18h,40h + db 'cr10',10h,5Ah + db 'cr11',10h,5Bh + db 'cr12',10h,5Ch + db 'cr13',10h,5Dh + db 'cr14',10h,5Eh + db 'cr15',10h,5Fh + db 'data',19h,6 + db 'dr10',10h,7Ah + db 'dr11',10h,7Bh + db 'dr12',10h,7Ch + db 'dr13',10h,7Dh + db 'dr14',10h,7Eh + db 'dr15',10h,7Fh + db 'ms64',1Ch,49h + db 'near',12h,2 + db 'note',1Eh,4 + db 'pe64',18h,3Ch + db 'r10b',10h,1Ah + db 'r10d',10h,4Ah + db 'r10l',10h,1Ah + db 'r10w',10h,2Ah + db 'r11b',10h,1Bh + db 'r11d',10h,4Bh + db 'r11l',10h,1Bh + db 'r11w',10h,2Bh + db 'r12b',10h,1Ch + db 'r12d',10h,4Ch + db 'r12l',10h,1Ch + db 'r12w',10h,2Ch + db 'r13b',10h,1Dh + db 'r13d',10h,4Dh + db 'r13l',10h,1Dh + db 'r13w',10h,2Dh + db 'r14b',10h,1Eh + db 'r14d',10h,4Eh + db 'r14l',10h,1Eh + db 'r14w',10h,2Eh + db 'r15b',10h,1Fh + db 'r15d',10h,4Fh + db 'r15l',10h,1Fh + db 'r15w',10h,2Fh + db 'word',11h,2 + db 'xmm0',10h,0C0h + db 'xmm1',10h,0C1h + db 'xmm2',10h,0C2h + db 'xmm3',10h,0C3h + db 'xmm4',10h,0C4h + db 'xmm5',10h,0C5h + db 'xmm6',10h,0C6h + db 'xmm7',10h,0C7h + db 'xmm8',10h,0C8h + db 'xmm9',10h,0C9h + db 'ymm0',10h,0D0h + db 'ymm1',10h,0D1h + db 'ymm2',10h,0D2h + db 'ymm3',10h,0D3h + db 'ymm4',10h,0D4h + db 'ymm5',10h,0D5h + db 'ymm6',10h,0D6h + db 'ymm7',10h,0D7h + db 'ymm8',10h,0D8h + db 'ymm9',10h,0D9h +symbols_5: + db 'dword',11h,4 + db 'elf64',18h,58h + db 'fword',11h,6 + db 'large',1Bh,82h + db 'pword',11h,6 + db 'qword',11h,8 + db 'short',12h,1 + db 'tbyte',11h,0Ah + db 'tword',11h,0Ah + db 'use16',13h,16 + db 'use32',13h,32 + db 'use64',13h,64 + db 'xmm10',10h,0CAh + db 'xmm11',10h,0CBh + db 'xmm12',10h,0CCh + db 'xmm13',10h,0CDh + db 'xmm14',10h,0CEh + db 'xmm15',10h,0CFh + db 'xword',11h,16 + db 'ymm10',10h,0DAh + db 'ymm11',10h,0DBh + db 'ymm12',10h,0DCh + db 'ymm13',10h,0DDh + db 'ymm14',10h,0DEh + db 'ymm15',10h,0DFh + db 'yword',11h,32 +symbols_6: + db 'binary',18h,10h + db 'dqword',11h,16 + db 'export',1Ah,0 + db 'fixups',1Ah,5 + db 'import',1Ah,1 + db 'native',1Bh,1 + db 'qqword',11h,32 + db 'static',1Dh,1 +symbols_7: + db 'console',1Bh,3 + db 'dynamic',1Eh,2 + db 'efiboot',1Bh,11 +symbols_8: + db 'linkinfo',19h,9 + db 'readable',19h,30 + db 'resource',1Ah,2 + db 'writable',19h,31 +symbols_9: + db 'shareable',19h,28 + db 'writeable',19h,31 +symbols_10: + db 'efiruntime',1Bh,12 + db 'executable',19h,29 + db 'linkremove',19h,11 +symbols_11: + db 'discardable',19h,25 + db 'interpreter',1Eh,3 + db 'notpageable',19h,27 +symbols_end: + +instructions: + dw instructions_2-instructions,(instructions_3-instructions_2)/(2+3) + dw instructions_3-instructions,(instructions_4-instructions_3)/(3+3) + dw instructions_4-instructions,(instructions_5-instructions_4)/(4+3) + dw instructions_5-instructions,(instructions_6-instructions_5)/(5+3) + dw instructions_6-instructions,(instructions_7-instructions_6)/(6+3) + dw instructions_7-instructions,(instructions_8-instructions_7)/(7+3) + dw instructions_8-instructions,(instructions_9-instructions_8)/(8+3) + dw instructions_9-instructions,(instructions_10-instructions_9)/(9+3) + dw instructions_10-instructions,(instructions_11-instructions_10)/(10+3) + dw instructions_11-instructions,(instructions_12-instructions_11)/(11+3) + dw instructions_12-instructions,(instructions_13-instructions_12)/(12+3) + dw instructions_13-instructions,(instructions_14-instructions_13)/(13+3) + dw instructions_14-instructions,(instructions_15-instructions_14)/(14+3) + dw instructions_15-instructions,(instructions_16-instructions_15)/(15+3) + dw instructions_16-instructions,(instructions_end-instructions_16)/(16+3) + +instructions_2: + db 'bt',4 + dw bt_instruction-instruction_handler + db 'if',0 + dw if_directive-instruction_handler + db 'in',0 + dw in_instruction-instruction_handler + db 'ja',77h + dw conditional_jump-instruction_handler + db 'jb',72h + dw conditional_jump-instruction_handler + db 'jc',72h + dw conditional_jump-instruction_handler + db 'je',74h + dw conditional_jump-instruction_handler + db 'jg',7Fh + dw conditional_jump-instruction_handler + db 'jl',7Ch + dw conditional_jump-instruction_handler + db 'jo',70h + dw conditional_jump-instruction_handler + db 'jp',7Ah + dw conditional_jump-instruction_handler + db 'js',78h + dw conditional_jump-instruction_handler + db 'jz',74h + dw conditional_jump-instruction_handler + db 'or',08h + dw basic_instruction-instruction_handler +instructions_3: + db 'aaa',37h + dw simple_instruction_except64-instruction_handler + db 'aad',0D5h + dw aa_instruction-instruction_handler + db 'aam',0D4h + dw aa_instruction-instruction_handler + db 'aas',3Fh + dw simple_instruction_except64-instruction_handler + db 'adc',10h + dw basic_instruction-instruction_handler + db 'add',00h + dw basic_instruction-instruction_handler + db 'and',20h + dw basic_instruction-instruction_handler + db 'bsf',0BCh + dw bs_instruction-instruction_handler + db 'bsr',0BDh + dw bs_instruction-instruction_handler + db 'btc',7 + dw bt_instruction-instruction_handler + db 'btr',6 + dw bt_instruction-instruction_handler + db 'bts',5 + dw bt_instruction-instruction_handler + db 'cbw',98h + dw simple_instruction_16bit-instruction_handler + db 'cdq',99h + dw simple_instruction_32bit-instruction_handler + db 'clc',0F8h + dw simple_instruction-instruction_handler + db 'cld',0FCh + dw simple_instruction-instruction_handler + db 'cli',0FAh + dw simple_instruction-instruction_handler + db 'cmc',0F5h + dw simple_instruction-instruction_handler + db 'cmp',38h + dw basic_instruction-instruction_handler + db 'cqo',99h + dw simple_instruction_64bit-instruction_handler + db 'cwd',99h + dw simple_instruction_16bit-instruction_handler + db 'daa',27h + dw simple_instruction_except64-instruction_handler + db 'das',2Fh + dw simple_instruction_except64-instruction_handler + db 'dec',1 + dw inc_instruction-instruction_handler + db 'div',6 + dw single_operand_instruction-instruction_handler + db 'end',0 + dw end_directive-instruction_handler + db 'err',0 + dw err_directive-instruction_handler + db 'fld',0 + dw fld_instruction-instruction_handler + db 'fst',2 + dw fld_instruction-instruction_handler + db 'hlt',0F4h + dw simple_instruction-instruction_handler + db 'inc',0 + dw inc_instruction-instruction_handler + db 'ins',6Ch + dw ins_instruction-instruction_handler + db 'int',0CDh + dw int_instruction-instruction_handler + db 'jae',73h + dw conditional_jump-instruction_handler + db 'jbe',76h + dw conditional_jump-instruction_handler + db 'jge',7Dh + dw conditional_jump-instruction_handler + db 'jle',7Eh + dw conditional_jump-instruction_handler + db 'jmp',0 + dw jmp_instruction-instruction_handler + db 'jna',76h + dw conditional_jump-instruction_handler + db 'jnb',73h + dw conditional_jump-instruction_handler + db 'jnc',73h + dw conditional_jump-instruction_handler + db 'jne',75h + dw conditional_jump-instruction_handler + db 'jng',7Eh + dw conditional_jump-instruction_handler + db 'jnl',7Dh + dw conditional_jump-instruction_handler + db 'jno',71h + dw conditional_jump-instruction_handler + db 'jnp',7Bh + dw conditional_jump-instruction_handler + db 'jns',79h + dw conditional_jump-instruction_handler + db 'jnz',75h + dw conditional_jump-instruction_handler + db 'jpe',7Ah + dw conditional_jump-instruction_handler + db 'jpo',7Bh + dw conditional_jump-instruction_handler + db 'lar',2 + dw lar_instruction-instruction_handler + db 'lds',3 + dw ls_instruction-instruction_handler + db 'lea',0 + dw lea_instruction-instruction_handler + db 'les',0 + dw ls_instruction-instruction_handler + db 'lfs',4 + dw ls_instruction-instruction_handler + db 'lgs',5 + dw ls_instruction-instruction_handler + db 'lsl',3 + dw lar_instruction-instruction_handler + db 'lss',2 + dw ls_instruction-instruction_handler + db 'ltr',3 + dw pm_word_instruction-instruction_handler + db 'mov',0 + dw mov_instruction-instruction_handler + db 'mul',4 + dw single_operand_instruction-instruction_handler + db 'neg',3 + dw single_operand_instruction-instruction_handler + db 'nop',90h + dw nop_instruction-instruction_handler + db 'not',2 + dw single_operand_instruction-instruction_handler + db 'org',0 + dw org_directive-instruction_handler + db 'out',0 + dw out_instruction-instruction_handler + db 'pop',0 + dw pop_instruction-instruction_handler + db 'por',0EBh + dw basic_mmx_instruction-instruction_handler + db 'rcl',2 + dw sh_instruction-instruction_handler + db 'rcr',3 + dw sh_instruction-instruction_handler + db 'rep',0F3h + dw prefix_instruction-instruction_handler + db 'ret',0C2h + dw ret_instruction-instruction_handler + db 'rol',0 + dw sh_instruction-instruction_handler + db 'ror',1 + dw sh_instruction-instruction_handler + db 'rsm',0AAh + dw simple_extended_instruction-instruction_handler + db 'sal',4 + dw sh_instruction-instruction_handler + db 'sar',7 + dw sh_instruction-instruction_handler + db 'sbb',18h + dw basic_instruction-instruction_handler + db 'shl',4 + dw sh_instruction-instruction_handler + db 'shr',5 + dw sh_instruction-instruction_handler + db 'stc',0F9h + dw simple_instruction-instruction_handler + db 'std',0FDh + dw simple_instruction-instruction_handler + db 'sti',0FBh + dw simple_instruction-instruction_handler + db 'str',1 + dw pm_store_word_instruction-instruction_handler + db 'sub',28h + dw basic_instruction-instruction_handler + db 'ud2',0Bh + dw simple_extended_instruction-instruction_handler + db 'xor',30h + dw basic_instruction-instruction_handler +instructions_4: + db 'adcx',66h + dw adx_instruction-instruction_handler + db 'adox',0F3h + dw adx_instruction-instruction_handler + db 'andn',0F2h + dw andn_instruction-instruction_handler + db 'arpl',0 + dw arpl_instruction-instruction_handler + db 'blci',26h + dw tbm_instruction-instruction_handler + db 'blcs',13h + dw tbm_instruction-instruction_handler + db 'blsi',3 + dw bmi_instruction-instruction_handler + db 'blsr',1 + dw bmi_instruction-instruction_handler + db 'bzhi',0F5h + dw bzhi_instruction-instruction_handler + db 'call',0 + dw call_instruction-instruction_handler + db 'cdqe',98h + dw simple_instruction_64bit-instruction_handler + db 'clac',0CAh + dw simple_vmx_instruction-instruction_handler + db 'clgi',0DDh + dw simple_vmx_instruction-instruction_handler + db 'clts',6 + dw simple_extended_instruction-instruction_handler + db 'cmps',0A6h + dw cmps_instruction-instruction_handler + db 'cwde',98h + dw simple_instruction_32bit-instruction_handler + db 'data',0 + dw data_directive-instruction_handler + db 'dppd',41h + dw sse4_instruction_3a_imm8-instruction_handler + db 'dpps',40h + dw sse4_instruction_3a_imm8-instruction_handler + db 'else',0 + dw else_directive-instruction_handler + db 'emms',77h + dw simple_extended_instruction-instruction_handler + db 'fabs',100001b + dw simple_fpu_instruction-instruction_handler + db 'fadd',0 + dw basic_fpu_instruction-instruction_handler + db 'fbld',4 + dw fbld_instruction-instruction_handler + db 'fchs',100000b + dw simple_fpu_instruction-instruction_handler + db 'fcom',2 + dw basic_fpu_instruction-instruction_handler + db 'fcos',111111b + dw simple_fpu_instruction-instruction_handler + db 'fdiv',6 + dw basic_fpu_instruction-instruction_handler + db 'feni',0E0h + dw finit_instruction-instruction_handler + db 'fild',0 + dw fild_instruction-instruction_handler + db 'fist',2 + dw fild_instruction-instruction_handler + db 'fld1',101000b + dw simple_fpu_instruction-instruction_handler + db 'fldz',101110b + dw simple_fpu_instruction-instruction_handler + db 'fmul',1 + dw basic_fpu_instruction-instruction_handler + db 'fnop',010000b + dw simple_fpu_instruction-instruction_handler + db 'fsin',111110b + dw simple_fpu_instruction-instruction_handler + db 'fstp',3 + dw fld_instruction-instruction_handler + db 'fsub',4 + dw basic_fpu_instruction-instruction_handler + db 'ftst',100100b + dw simple_fpu_instruction-instruction_handler + db 'fxam',100101b + dw simple_fpu_instruction-instruction_handler + db 'fxch',0 + dw fxch_instruction-instruction_handler + db 'heap',0 + dw heap_directive-instruction_handler + db 'idiv',7 + dw single_operand_instruction-instruction_handler + db 'imul',0 + dw imul_instruction-instruction_handler + db 'insb',6Ch + dw simple_instruction-instruction_handler + db 'insd',6Dh + dw simple_instruction_32bit-instruction_handler + db 'insw',6Dh + dw simple_instruction_16bit-instruction_handler + db 'int1',0F1h + dw simple_instruction-instruction_handler + db 'int3',0CCh + dw simple_instruction-instruction_handler + db 'into',0CEh + dw simple_instruction_except64-instruction_handler + db 'invd',8 + dw simple_extended_instruction-instruction_handler + db 'iret',0CFh + dw iret_instruction-instruction_handler + db 'jcxz',0E3h + dw loop_instruction_16bit-instruction_handler + db 'jnae',72h + dw conditional_jump-instruction_handler + db 'jnbe',77h + dw conditional_jump-instruction_handler + db 'jnge',7Ch + dw conditional_jump-instruction_handler + db 'jnle',7Fh + dw conditional_jump-instruction_handler + db 'lahf',9Fh + dw simple_instruction-instruction_handler + db 'lgdt',2 + dw lgdt_instruction-instruction_handler + db 'lidt',3 + dw lgdt_instruction-instruction_handler + db 'lldt',2 + dw pm_word_instruction-instruction_handler + db 'lmsw',16h + dw pm_word_instruction-instruction_handler + db 'load',0 + dw load_directive-instruction_handler + db 'lock',0F0h + dw prefix_instruction-instruction_handler + db 'lods',0ACh + dw lods_instruction-instruction_handler + db 'loop',0E2h + dw loop_instruction-instruction_handler + db 'movd',0 + dw movd_instruction-instruction_handler + db 'movq',0 + dw movq_instruction-instruction_handler + db 'movs',0A4h + dw movs_instruction-instruction_handler + db 'mulx',0F6h + dw pdep_instruction-instruction_handler + db 'orpd',56h + dw sse_pd_instruction-instruction_handler + db 'orps',56h + dw sse_ps_instruction-instruction_handler + db 'outs',6Eh + dw outs_instruction-instruction_handler + db 'pand',0DBh + dw basic_mmx_instruction-instruction_handler + db 'pdep',0F5h + dw pdep_instruction-instruction_handler + db 'pext',0F5h + dw pext_instruction-instruction_handler + db 'popa',61h + dw simple_instruction_except64-instruction_handler + db 'popd',4 + dw pop_instruction-instruction_handler + db 'popf',9Dh + dw simple_instruction-instruction_handler + db 'popq',8 + dw pop_instruction-instruction_handler + db 'popw',2 + dw pop_instruction-instruction_handler + db 'push',0 + dw push_instruction-instruction_handler + db 'pxor',0EFh + dw basic_mmx_instruction-instruction_handler + db 'repe',0F3h + dw prefix_instruction-instruction_handler + db 'repz',0F3h + dw prefix_instruction-instruction_handler + db 'retd',0C2h + dw ret_instruction_32bit_except64-instruction_handler + db 'retf',0CAh + dw retf_instruction-instruction_handler + db 'retn',0C2h + dw ret_instruction-instruction_handler + db 'retq',0C2h + dw ret_instruction_only64-instruction_handler + db 'retw',0C2h + dw ret_instruction_16bit-instruction_handler + db 'rorx',0F0h + dw rorx_instruction-instruction_handler + db 'sahf',9Eh + dw simple_instruction-instruction_handler + db 'salc',0D6h + dw simple_instruction_except64-instruction_handler + db 'sarx',0F7h + dw sarx_instruction-instruction_handler + db 'scas',0AEh + dw stos_instruction-instruction_handler + db 'seta',97h + dw set_instruction-instruction_handler + db 'setb',92h + dw set_instruction-instruction_handler + db 'setc',92h + dw set_instruction-instruction_handler + db 'sete',94h + dw set_instruction-instruction_handler + db 'setg',9Fh + dw set_instruction-instruction_handler + db 'setl',9Ch + dw set_instruction-instruction_handler + db 'seto',90h + dw set_instruction-instruction_handler + db 'setp',9Ah + dw set_instruction-instruction_handler + db 'sets',98h + dw set_instruction-instruction_handler + db 'setz',94h + dw set_instruction-instruction_handler + db 'sgdt',0 + dw lgdt_instruction-instruction_handler + db 'shld',0A4h + dw shd_instruction-instruction_handler + db 'shlx',0F7h + dw shlx_instruction-instruction_handler + db 'shrd',0ACh + dw shd_instruction-instruction_handler + db 'shrx',0F7h + dw shrx_instruction-instruction_handler + db 'sidt',1 + dw lgdt_instruction-instruction_handler + db 'sldt',0 + dw pm_store_word_instruction-instruction_handler + db 'smsw',14h + dw pm_store_word_instruction-instruction_handler + db 'stac',0CBh + dw simple_vmx_instruction-instruction_handler + db 'stgi',0DCh + dw simple_vmx_instruction-instruction_handler + db 'stos',0AAh + dw stos_instruction-instruction_handler + db 'test',0 + dw test_instruction-instruction_handler + db 'verr',4 + dw pm_word_instruction-instruction_handler + db 'verw',5 + dw pm_word_instruction-instruction_handler + db 'vpor',0EBh + dw avx_pd_instruction-instruction_handler + db 'wait',9Bh + dw simple_instruction-instruction_handler + db 'xadd',0C0h + dw basic_486_instruction-instruction_handler + db 'xchg',0 + dw xchg_instruction-instruction_handler + db 'xend',0D5h + dw simple_vmx_instruction-instruction_handler + db 'xlat',0D7h + dw xlat_instruction-instruction_handler +instructions_5: + db 'addpd',58h + dw sse_pd_instruction-instruction_handler + db 'addps',58h + dw sse_ps_instruction-instruction_handler + db 'addsd',58h + dw sse_sd_instruction-instruction_handler + db 'addss',58h + dw sse_ss_instruction-instruction_handler + db 'align',0 + dw align_directive-instruction_handler + db 'andpd',54h + dw sse_pd_instruction-instruction_handler + db 'andps',54h + dw sse_ps_instruction-instruction_handler + db 'bextr',0F7h + dw bextr_instruction-instruction_handler + db 'blcic',15h + dw tbm_instruction-instruction_handler + db 'blsic',16h + dw tbm_instruction-instruction_handler + db 'bound',0 + dw bound_instruction-instruction_handler + db 'break',0 + dw break_directive-instruction_handler + db 'bswap',0 + dw bswap_instruction-instruction_handler + db 'cmova',47h + dw bs_instruction-instruction_handler + db 'cmovb',42h + dw bs_instruction-instruction_handler + db 'cmovc',42h + dw bs_instruction-instruction_handler + db 'cmove',44h + dw bs_instruction-instruction_handler + db 'cmovg',4Fh + dw bs_instruction-instruction_handler + db 'cmovl',4Ch + dw bs_instruction-instruction_handler + db 'cmovo',40h + dw bs_instruction-instruction_handler + db 'cmovp',4Ah + dw bs_instruction-instruction_handler + db 'cmovs',48h + dw bs_instruction-instruction_handler + db 'cmovz',44h + dw bs_instruction-instruction_handler + db 'cmppd',-1 + dw cmp_pd_instruction-instruction_handler + db 'cmpps',-1 + dw cmp_ps_instruction-instruction_handler + db 'cmpsb',0A6h + dw simple_instruction-instruction_handler + db 'cmpsd',-1 + dw cmpsd_instruction-instruction_handler + db 'cmpsq',0A7h + dw simple_instruction_64bit-instruction_handler + db 'cmpss',-1 + dw cmp_ss_instruction-instruction_handler + db 'cmpsw',0A7h + dw simple_instruction_16bit-instruction_handler + db 'cpuid',0A2h + dw simple_extended_instruction-instruction_handler + db 'crc32',0 + dw crc32_instruction-instruction_handler + db 'divpd',5Eh + dw sse_pd_instruction-instruction_handler + db 'divps',5Eh + dw sse_ps_instruction-instruction_handler + db 'divsd',5Eh + dw sse_sd_instruction-instruction_handler + db 'divss',5Eh + dw sse_ss_instruction-instruction_handler + db 'enter',0 + dw enter_instruction-instruction_handler + db 'entry',0 + dw entry_directive-instruction_handler + db 'extrn',0 + dw extrn_directive-instruction_handler + db 'extrq',0 + dw extrq_instruction-instruction_handler + db 'f2xm1',110000b + dw simple_fpu_instruction-instruction_handler + db 'faddp',0 + dw faddp_instruction-instruction_handler + db 'fbstp',6 + dw fbld_instruction-instruction_handler + db 'fclex',0E2h + dw finit_instruction-instruction_handler + db 'fcomi',0F0h + dw fcomi_instruction-instruction_handler + db 'fcomp',3 + dw basic_fpu_instruction-instruction_handler + db 'fdisi',0E1h + dw finit_instruction-instruction_handler + db 'fdivp',7 + dw faddp_instruction-instruction_handler + db 'fdivr',7 + dw basic_fpu_instruction-instruction_handler + db 'femms',0Eh + dw simple_extended_instruction-instruction_handler + db 'ffree',0 + dw ffree_instruction-instruction_handler + db 'fiadd',0 + dw fi_instruction-instruction_handler + db 'ficom',2 + dw fi_instruction-instruction_handler + db 'fidiv',6 + dw fi_instruction-instruction_handler + db 'fimul',1 + dw fi_instruction-instruction_handler + db 'finit',0E3h + dw finit_instruction-instruction_handler + db 'fistp',3 + dw fild_instruction-instruction_handler + db 'fisub',4 + dw fi_instruction-instruction_handler + db 'fldcw',5 + dw fldcw_instruction-instruction_handler + db 'fldpi',101011b + dw simple_fpu_instruction-instruction_handler + db 'fmulp',1 + dw faddp_instruction-instruction_handler + db 'fneni',0E0h + dw fninit_instruction-instruction_handler + db 'fprem',111000b + dw simple_fpu_instruction-instruction_handler + db 'fptan',110010b + dw simple_fpu_instruction-instruction_handler + db 'fsave',6 + dw fsave_instruction-instruction_handler + db 'fsqrt',111010b + dw simple_fpu_instruction-instruction_handler + db 'fstcw',7 + dw fstcw_instruction-instruction_handler + db 'fstsw',0 + dw fstsw_instruction-instruction_handler + db 'fsubp',5 + dw faddp_instruction-instruction_handler + db 'fsubr',5 + dw basic_fpu_instruction-instruction_handler + db 'fucom',4 + dw ffree_instruction-instruction_handler + db 'fwait',9Bh + dw simple_instruction-instruction_handler + db 'fyl2x',110001b + dw simple_fpu_instruction-instruction_handler + db 'icebp',0F1h + dw simple_instruction-instruction_handler + db 'iretd',0CFh + dw simple_instruction_32bit-instruction_handler + db 'iretq',0CFh + dw simple_instruction_64bit-instruction_handler + db 'iretw',0CFh + dw simple_instruction_16bit-instruction_handler + db 'jecxz',0E3h + dw loop_instruction_32bit-instruction_handler + db 'jrcxz',0E3h + dw loop_instruction_64bit-instruction_handler + db 'label',0 + dw label_directive-instruction_handler + db 'lddqu',0 + dw lddqu_instruction-instruction_handler + db 'leave',0C9h + dw simple_instruction-instruction_handler + db 'lodsb',0ACh + dw simple_instruction-instruction_handler + db 'lodsd',0ADh + dw simple_instruction_32bit-instruction_handler + db 'lodsq',0ADh + dw simple_instruction_64bit-instruction_handler + db 'lodsw',0ADh + dw simple_instruction_16bit-instruction_handler + db 'loopd',0E2h + dw loop_instruction_32bit-instruction_handler + db 'loope',0E1h + dw loop_instruction-instruction_handler + db 'loopq',0E2h + dw loop_instruction_64bit-instruction_handler + db 'loopw',0E2h + dw loop_instruction_16bit-instruction_handler + db 'loopz',0E1h + dw loop_instruction-instruction_handler + db 'lzcnt',0BDh + dw popcnt_instruction-instruction_handler + db 'maxpd',5Fh + dw sse_pd_instruction-instruction_handler + db 'maxps',5Fh + dw sse_ps_instruction-instruction_handler + db 'maxsd',5Fh + dw sse_sd_instruction-instruction_handler + db 'maxss',5Fh + dw sse_ss_instruction-instruction_handler + db 'minpd',5Dh + dw sse_pd_instruction-instruction_handler + db 'minps',5Dh + dw sse_ps_instruction-instruction_handler + db 'minsd',5Dh + dw sse_sd_instruction-instruction_handler + db 'minss',5Dh + dw sse_ss_instruction-instruction_handler + db 'movbe',0F0h + dw movbe_instruction-instruction_handler + db 'movsb',0A4h + dw simple_instruction-instruction_handler + db 'movsd',0 + dw movsd_instruction-instruction_handler + db 'movsq',0A5h + dw simple_instruction_64bit-instruction_handler + db 'movss',0 + dw movss_instruction-instruction_handler + db 'movsw',0A5h + dw simple_instruction_16bit-instruction_handler + db 'movsx',0BEh + dw movx_instruction-instruction_handler + db 'movzx',0B6h + dw movx_instruction-instruction_handler + db 'mulpd',59h + dw sse_pd_instruction-instruction_handler + db 'mulps',59h + dw sse_ps_instruction-instruction_handler + db 'mulsd',59h + dw sse_sd_instruction-instruction_handler + db 'mulss',59h + dw sse_ss_instruction-instruction_handler + db 'mwait',0C9h + dw monitor_instruction-instruction_handler + db 'outsb',6Eh + dw simple_instruction-instruction_handler + db 'outsd',6Fh + dw simple_instruction_32bit-instruction_handler + db 'outsw',6Fh + dw simple_instruction_16bit-instruction_handler + db 'pabsb',1Ch + dw ssse3_instruction-instruction_handler + db 'pabsd',1Eh + dw ssse3_instruction-instruction_handler + db 'pabsw',1Dh + dw ssse3_instruction-instruction_handler + db 'paddb',0FCh + dw basic_mmx_instruction-instruction_handler + db 'paddd',0FEh + dw basic_mmx_instruction-instruction_handler + db 'paddq',0D4h + dw basic_mmx_instruction-instruction_handler + db 'paddw',0FDh + dw basic_mmx_instruction-instruction_handler + db 'pandn',0DFh + dw basic_mmx_instruction-instruction_handler + db 'pause',0 + dw pause_instruction-instruction_handler + db 'pavgb',0E0h + dw basic_mmx_instruction-instruction_handler + db 'pavgw',0E3h + dw basic_mmx_instruction-instruction_handler + db 'pf2id',1Dh + dw amd3dnow_instruction-instruction_handler + db 'pf2iw',1Ch + dw amd3dnow_instruction-instruction_handler + db 'pfacc',0AEh + dw amd3dnow_instruction-instruction_handler + db 'pfadd',9Eh + dw amd3dnow_instruction-instruction_handler + db 'pfmax',0A4h + dw amd3dnow_instruction-instruction_handler + db 'pfmin',94h + dw amd3dnow_instruction-instruction_handler + db 'pfmul',0B4h + dw amd3dnow_instruction-instruction_handler + db 'pfrcp',96h + dw amd3dnow_instruction-instruction_handler + db 'pfsub',9Ah + dw amd3dnow_instruction-instruction_handler + db 'pi2fd',0Dh + dw amd3dnow_instruction-instruction_handler + db 'pi2fw',0Ch + dw amd3dnow_instruction-instruction_handler + db 'popad',61h + dw simple_instruction_32bit_except64-instruction_handler + db 'popaw',61h + dw simple_instruction_16bit_except64-instruction_handler + db 'popfd',9Dh + dw simple_instruction_32bit_except64-instruction_handler + db 'popfq',9Dh + dw simple_instruction_only64-instruction_handler + db 'popfw',9Dh + dw simple_instruction_16bit-instruction_handler + db 'pslld',0F2h + dw mmx_bit_shift_instruction-instruction_handler + db 'psllq',0F3h + dw mmx_bit_shift_instruction-instruction_handler + db 'psllw',0F1h + dw mmx_bit_shift_instruction-instruction_handler + db 'psrad',0E2h + dw mmx_bit_shift_instruction-instruction_handler + db 'psraw',0E1h + dw mmx_bit_shift_instruction-instruction_handler + db 'psrld',0D2h + dw mmx_bit_shift_instruction-instruction_handler + db 'psrlq',0D3h + dw mmx_bit_shift_instruction-instruction_handler + db 'psrlw',0D1h + dw mmx_bit_shift_instruction-instruction_handler + db 'psubb',0F8h + dw basic_mmx_instruction-instruction_handler + db 'psubd',0FAh + dw basic_mmx_instruction-instruction_handler + db 'psubq',0FBh + dw basic_mmx_instruction-instruction_handler + db 'psubw',0F9h + dw basic_mmx_instruction-instruction_handler + db 'ptest',17h + dw sse4_instruction_38-instruction_handler + db 'pusha',60h + dw simple_instruction_except64-instruction_handler + db 'pushd',4 + dw push_instruction-instruction_handler + db 'pushf',9Ch + dw simple_instruction-instruction_handler + db 'pushq',8 + dw push_instruction-instruction_handler + db 'pushw',2 + dw push_instruction-instruction_handler + db 'rcpps',53h + dw sse_ps_instruction-instruction_handler + db 'rcpss',53h + dw sse_ss_instruction-instruction_handler + db 'rdmsr',32h + dw simple_extended_instruction-instruction_handler + db 'rdpmc',33h + dw simple_extended_instruction-instruction_handler + db 'rdtsc',31h + dw simple_extended_instruction-instruction_handler + db 'repne',0F2h + dw prefix_instruction-instruction_handler + db 'repnz',0F2h + dw prefix_instruction-instruction_handler + db 'retfd',0CAh + dw ret_instruction_32bit-instruction_handler + db 'retfq',0CAh + dw ret_instruction_64bit-instruction_handler + db 'retfw',0CAh + dw ret_instruction_16bit-instruction_handler + db 'retnd',0C2h + dw ret_instruction_32bit_except64-instruction_handler + db 'retnq',0C2h + dw ret_instruction_only64-instruction_handler + db 'retnw',0C2h + dw ret_instruction_16bit-instruction_handler + db 'scasb',0AEh + dw simple_instruction-instruction_handler + db 'scasd',0AFh + dw simple_instruction_32bit-instruction_handler + db 'scasq',0AFh + dw simple_instruction_64bit-instruction_handler + db 'scasw',0AFh + dw simple_instruction_16bit-instruction_handler + db 'setae',93h + dw set_instruction-instruction_handler + db 'setbe',96h + dw set_instruction-instruction_handler + db 'setge',9Dh + dw set_instruction-instruction_handler + db 'setle',9Eh + dw set_instruction-instruction_handler + db 'setna',96h + dw set_instruction-instruction_handler + db 'setnb',93h + dw set_instruction-instruction_handler + db 'setnc',93h + dw set_instruction-instruction_handler + db 'setne',95h + dw set_instruction-instruction_handler + db 'setng',9Eh + dw set_instruction-instruction_handler + db 'setnl',9Dh + dw set_instruction-instruction_handler + db 'setno',91h + dw set_instruction-instruction_handler + db 'setnp',9Bh + dw set_instruction-instruction_handler + db 'setns',99h + dw set_instruction-instruction_handler + db 'setnz',95h + dw set_instruction-instruction_handler + db 'setpe',9Ah + dw set_instruction-instruction_handler + db 'setpo',9Bh + dw set_instruction-instruction_handler + db 'stack',0 + dw stack_directive-instruction_handler + db 'store',0 + dw store_directive-instruction_handler + db 'stosb',0AAh + dw simple_instruction-instruction_handler + db 'stosd',0ABh + dw simple_instruction_32bit-instruction_handler + db 'stosq',0ABh + dw simple_instruction_64bit-instruction_handler + db 'stosw',0ABh + dw simple_instruction_16bit-instruction_handler + db 'subpd',5Ch + dw sse_pd_instruction-instruction_handler + db 'subps',5Ch + dw sse_ps_instruction-instruction_handler + db 'subsd',5Ch + dw sse_sd_instruction-instruction_handler + db 'subss',5Ch + dw sse_ss_instruction-instruction_handler + db 'times',0 + dw times_directive-instruction_handler + db 'tzcnt',0BCh + dw popcnt_instruction-instruction_handler + db 'tzmsk',14h + dw tbm_instruction-instruction_handler + db 'vdppd',41h + dw avx_128bit_instruction_3a_imm8-instruction_handler + db 'vdpps',40h + dw avx_instruction_3a_imm8-instruction_handler + db 'vmovd',0 + dw avx_movd_instruction-instruction_handler + db 'vmovq',0 + dw avx_movq_instruction-instruction_handler + db 'vmrun',0D8h + dw simple_svm_instruction-instruction_handler + db 'vmxon',6 + dw vmxon_instruction-instruction_handler + db 'vorpd',56h + dw avx_pd_instruction-instruction_handler + db 'vorps',56h + dw avx_ps_instruction-instruction_handler + db 'vpand',0DBh + dw avx_pd_instruction-instruction_handler + db 'vpxor',0EFh + dw avx_pd_instruction-instruction_handler + db 'while',0 + dw while_directive-instruction_handler + db 'wrmsr',30h + dw simple_extended_instruction-instruction_handler + db 'xlatb',0D7h + dw simple_instruction-instruction_handler + db 'xorpd',57h + dw sse_pd_instruction-instruction_handler + db 'xorps',57h + dw sse_ps_instruction-instruction_handler + db 'xsave',100b + dw fxsave_instruction-instruction_handler + db 'xtest',0D6h + dw simple_vmx_instruction-instruction_handler +instructions_6: + db 'aesdec',0DEh + dw sse4_instruction_38-instruction_handler + db 'aesenc',0DCh + dw sse4_instruction_38-instruction_handler + db 'aesimc',0DBh + dw sse4_instruction_38-instruction_handler + db 'andnpd',55h + dw sse_pd_instruction-instruction_handler + db 'andnps',55h + dw sse_ps_instruction-instruction_handler + db 'assert',0 + dw assert_directive-instruction_handler + db 'blcmsk',21h + dw tbm_instruction-instruction_handler + db 'blsmsk',2 + dw bmi_instruction-instruction_handler + db 'cmovae',43h + dw bs_instruction-instruction_handler + db 'cmovbe',46h + dw bs_instruction-instruction_handler + db 'cmovge',4Dh + dw bs_instruction-instruction_handler + db 'cmovle',4Eh + dw bs_instruction-instruction_handler + db 'cmovna',46h + dw bs_instruction-instruction_handler + db 'cmovnb',43h + dw bs_instruction-instruction_handler + db 'cmovnc',43h + dw bs_instruction-instruction_handler + db 'cmovne',45h + dw bs_instruction-instruction_handler + db 'cmovng',4Eh + dw bs_instruction-instruction_handler + db 'cmovnl',4Dh + dw bs_instruction-instruction_handler + db 'cmovno',41h + dw bs_instruction-instruction_handler + db 'cmovnp',4Bh + dw bs_instruction-instruction_handler + db 'cmovns',49h + dw bs_instruction-instruction_handler + db 'cmovnz',45h + dw bs_instruction-instruction_handler + db 'cmovpe',4Ah + dw bs_instruction-instruction_handler + db 'cmovpo',4Bh + dw bs_instruction-instruction_handler + db 'comisd',2Fh + dw comisd_instruction-instruction_handler + db 'comiss',2Fh + dw comiss_instruction-instruction_handler + db 'fcmovb',0C0h + dw fcmov_instruction-instruction_handler + db 'fcmove',0C8h + dw fcmov_instruction-instruction_handler + db 'fcmovu',0D8h + dw fcmov_instruction-instruction_handler + db 'fcomip',0F0h + dw fcomip_instruction-instruction_handler + db 'fcompp',0 + dw fcompp_instruction-instruction_handler + db 'fdivrp',6 + dw faddp_instruction-instruction_handler + db 'ffreep',0 + dw ffreep_instruction-instruction_handler + db 'ficomp',3 + dw fi_instruction-instruction_handler + db 'fidivr',7 + dw fi_instruction-instruction_handler + db 'fisttp',1 + dw fild_instruction-instruction_handler + db 'fisubr',5 + dw fi_instruction-instruction_handler + db 'fldenv',4 + dw fldenv_instruction-instruction_handler + db 'fldl2e',101010b + dw simple_fpu_instruction-instruction_handler + db 'fldl2t',101001b + dw simple_fpu_instruction-instruction_handler + db 'fldlg2',101100b + dw simple_fpu_instruction-instruction_handler + db 'fldln2',101101b + dw simple_fpu_instruction-instruction_handler + db 'fnclex',0E2h + dw fninit_instruction-instruction_handler + db 'fndisi',0E1h + dw fninit_instruction-instruction_handler + db 'fninit',0E3h + dw fninit_instruction-instruction_handler + db 'fnsave',6 + dw fnsave_instruction-instruction_handler + db 'fnstcw',7 + dw fldcw_instruction-instruction_handler + db 'fnstsw',0 + dw fnstsw_instruction-instruction_handler + db 'format',0 + dw format_directive-instruction_handler + db 'fpatan',110011b + dw simple_fpu_instruction-instruction_handler + db 'fprem1',110101b + dw simple_fpu_instruction-instruction_handler + db 'frstor',4 + dw fnsave_instruction-instruction_handler + db 'frstpm',0E5h + dw fninit_instruction-instruction_handler + db 'fsaved',6 + dw fsave_instruction_32bit-instruction_handler + db 'fsavew',6 + dw fsave_instruction_16bit-instruction_handler + db 'fscale',111101b + dw simple_fpu_instruction-instruction_handler + db 'fsetpm',0E4h + dw fninit_instruction-instruction_handler + db 'fstenv',6 + dw fstenv_instruction-instruction_handler + db 'fsubrp',4 + dw faddp_instruction-instruction_handler + db 'fucomi',0E8h + dw fcomi_instruction-instruction_handler + db 'fucomp',5 + dw ffree_instruction-instruction_handler + db 'fxsave',0 + dw fxsave_instruction-instruction_handler + db 'getsec',37h + dw simple_extended_instruction-instruction_handler + db 'haddpd',07Ch + dw sse_pd_instruction-instruction_handler + db 'haddps',07Ch + dw cvtpd2dq_instruction-instruction_handler + db 'hsubpd',07Dh + dw sse_pd_instruction-instruction_handler + db 'hsubps',07Dh + dw cvtpd2dq_instruction-instruction_handler + db 'invept',80h + dw vmx_inv_instruction-instruction_handler + db 'invlpg',0 + dw invlpg_instruction-instruction_handler + db 'lfence',0E8h + dw fence_instruction-instruction_handler + db 'llwpcb',0 + dw llwpcb_instruction-instruction_handler + db 'looped',0E1h + dw loop_instruction_32bit-instruction_handler + db 'loopeq',0E1h + dw loop_instruction_64bit-instruction_handler + db 'loopew',0E1h + dw loop_instruction_16bit-instruction_handler + db 'loopne',0E0h + dw loop_instruction-instruction_handler + db 'loopnz',0E0h + dw loop_instruction-instruction_handler + db 'loopzd',0E1h + dw loop_instruction_32bit-instruction_handler + db 'loopzq',0E1h + dw loop_instruction_64bit-instruction_handler + db 'loopzw',0E1h + dw loop_instruction_16bit-instruction_handler + db 'lwpins',0 + dw lwpins_instruction-instruction_handler + db 'lwpval',1 + dw lwpins_instruction-instruction_handler + db 'mfence',0F0h + dw fence_instruction-instruction_handler + db 'movapd',28h + dw movpd_instruction-instruction_handler + db 'movaps',28h + dw movps_instruction-instruction_handler + db 'movdqa',66h + dw movdq_instruction-instruction_handler + db 'movdqu',0F3h + dw movdq_instruction-instruction_handler + db 'movhpd',16h + dw movlpd_instruction-instruction_handler + db 'movhps',16h + dw movlps_instruction-instruction_handler + db 'movlpd',12h + dw movlpd_instruction-instruction_handler + db 'movlps',12h + dw movlps_instruction-instruction_handler + db 'movnti',0C3h + dw movnti_instruction-instruction_handler + db 'movntq',0E7h + dw movntq_instruction-instruction_handler + db 'movsxd',63h + dw movsxd_instruction-instruction_handler + db 'movupd',10h + dw movpd_instruction-instruction_handler + db 'movups',10h + dw movps_instruction-instruction_handler + db 'paddsb',0ECh + dw basic_mmx_instruction-instruction_handler + db 'paddsw',0EDh + dw basic_mmx_instruction-instruction_handler + db 'pextrb',14h + dw pextrb_instruction-instruction_handler + db 'pextrd',16h + dw pextrd_instruction-instruction_handler + db 'pextrq',16h + dw pextrq_instruction-instruction_handler + db 'pextrw',15h + dw pextrw_instruction-instruction_handler + db 'pfnacc',8Ah + dw amd3dnow_instruction-instruction_handler + db 'pfsubr',0AAh + dw amd3dnow_instruction-instruction_handler + db 'phaddd',2 + dw ssse3_instruction-instruction_handler + db 'phaddw',1 + dw ssse3_instruction-instruction_handler + db 'phsubd',6 + dw ssse3_instruction-instruction_handler + db 'phsubw',5 + dw ssse3_instruction-instruction_handler + db 'pinsrb',20h + dw pinsrb_instruction-instruction_handler + db 'pinsrd',22h + dw pinsrd_instruction-instruction_handler + db 'pinsrq',22h + dw pinsrq_instruction-instruction_handler + db 'pinsrw',0C4h + dw pinsrw_instruction-instruction_handler + db 'pmaxsb',3Ch + dw sse4_instruction_38-instruction_handler + db 'pmaxsd',3Dh + dw sse4_instruction_38-instruction_handler + db 'pmaxsw',0EEh + dw basic_mmx_instruction-instruction_handler + db 'pmaxub',0DEh + dw basic_mmx_instruction-instruction_handler + db 'pmaxud',3Fh + dw sse4_instruction_38-instruction_handler + db 'pmaxuw',3Eh + dw sse4_instruction_38-instruction_handler + db 'pminsb',38h + dw sse4_instruction_38-instruction_handler + db 'pminsd',39h + dw sse4_instruction_38-instruction_handler + db 'pminsw',0EAh + dw basic_mmx_instruction-instruction_handler + db 'pminub',0DAh + dw basic_mmx_instruction-instruction_handler + db 'pminud',3Bh + dw sse4_instruction_38-instruction_handler + db 'pminuw',3Ah + dw sse4_instruction_38-instruction_handler + db 'pmuldq',28h + dw sse4_instruction_38-instruction_handler + db 'pmulhw',0E5h + dw basic_mmx_instruction-instruction_handler + db 'pmulld',40h + dw sse4_instruction_38-instruction_handler + db 'pmullw',0D5h + dw basic_mmx_instruction-instruction_handler + db 'popcnt',0B8h + dw popcnt_instruction-instruction_handler + db 'psadbw',0F6h + dw basic_mmx_instruction-instruction_handler + db 'pshufb',0 + dw ssse3_instruction-instruction_handler + db 'pshufd',66h + dw pshufd_instruction-instruction_handler + db 'pshufw',0 + dw pshufw_instruction-instruction_handler + db 'psignb',8 + dw ssse3_instruction-instruction_handler + db 'psignd',0Ah + dw ssse3_instruction-instruction_handler + db 'psignw',9 + dw ssse3_instruction-instruction_handler + db 'pslldq',111b + dw pslldq_instruction-instruction_handler + db 'psrldq',011b + dw pslldq_instruction-instruction_handler + db 'psubsb',0E8h + dw basic_mmx_instruction-instruction_handler + db 'psubsw',0E9h + dw basic_mmx_instruction-instruction_handler + db 'pswapd',0BBh + dw amd3dnow_instruction-instruction_handler + db 'public',0 + dw public_directive-instruction_handler + db 'pushad',60h + dw simple_instruction_32bit_except64-instruction_handler + db 'pushaw',60h + dw simple_instruction_16bit_except64-instruction_handler + db 'pushfd',9Ch + dw simple_instruction_32bit_except64-instruction_handler + db 'pushfq',9Ch + dw simple_instruction_only64-instruction_handler + db 'pushfw',9Ch + dw simple_instruction_16bit-instruction_handler + db 'rdmsrq',32h + dw simple_extended_instruction_64bit-instruction_handler + db 'rdrand',110b + dw rdrand_instruction-instruction_handler + db 'rdseed',111b + dw rdrand_instruction-instruction_handler + db 'rdtscp',1 + dw rdtscp_instruction-instruction_handler + db 'repeat',0 + dw repeat_directive-instruction_handler + db 'setalc',0D6h + dw simple_instruction_except64-instruction_handler + db 'setnae',92h + dw set_instruction-instruction_handler + db 'setnbe',97h + dw set_instruction-instruction_handler + db 'setnge',9Ch + dw set_instruction-instruction_handler + db 'setnle',9Fh + dw set_instruction-instruction_handler + db 'sfence',0F8h + dw fence_instruction-instruction_handler + db 'shufpd',0C6h + dw sse_pd_instruction_imm8-instruction_handler + db 'shufps',0C6h + dw sse_ps_instruction_imm8-instruction_handler + db 'skinit',0 + dw skinit_instruction-instruction_handler + db 'slwpcb',1 + dw llwpcb_instruction-instruction_handler + db 'sqrtpd',51h + dw sse_pd_instruction-instruction_handler + db 'sqrtps',51h + dw sse_ps_instruction-instruction_handler + db 'sqrtsd',51h + dw sse_sd_instruction-instruction_handler + db 'sqrtss',51h + dw sse_ss_instruction-instruction_handler + db 'swapgs',0 + dw swapgs_instruction-instruction_handler + db 'sysret',07h + dw simple_extended_instruction-instruction_handler + db 't1mskc',17h + dw tbm_instruction-instruction_handler + db 'vaddpd',58h + dw avx_pd_instruction-instruction_handler + db 'vaddps',58h + dw avx_ps_instruction-instruction_handler + db 'vaddsd',58h + dw avx_sd_instruction-instruction_handler + db 'vaddss',58h + dw avx_ss_instruction-instruction_handler + db 'vandpd',54h + dw avx_pd_instruction-instruction_handler + db 'vandps',54h + dw avx_ps_instruction-instruction_handler + db 'vcmppd',-1 + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpps',-1 + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpsd',-1 + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpss',-1 + dw avx_cmp_ss_instruction-instruction_handler + db 'vdivpd',5Eh + dw avx_pd_instruction-instruction_handler + db 'vdivps',5Eh + dw avx_ps_instruction-instruction_handler + db 'vdivsd',5Eh + dw avx_sd_instruction-instruction_handler + db 'vdivss',5Eh + dw avx_ss_instruction-instruction_handler + db 'vlddqu',0F0h + dw avx_lddqu_instruction-instruction_handler + db 'vmaxpd',5Fh + dw avx_pd_instruction-instruction_handler + db 'vmaxps',5Fh + dw avx_ps_instruction-instruction_handler + db 'vmaxsd',5Fh + dw avx_sd_instruction-instruction_handler + db 'vmaxss',5Fh + dw avx_ss_instruction-instruction_handler + db 'vmcall',0C1h + dw simple_vmx_instruction-instruction_handler + db 'vminpd',5Dh + dw avx_pd_instruction-instruction_handler + db 'vminps',5Dh + dw avx_ps_instruction-instruction_handler + db 'vminsd',5Dh + dw avx_sd_instruction-instruction_handler + db 'vminss',5Dh + dw avx_ss_instruction-instruction_handler + db 'vmload',0DAh + dw simple_svm_instruction-instruction_handler + db 'vmovsd',0 + dw avx_movsd_instruction-instruction_handler + db 'vmovss',0 + dw avx_movss_instruction-instruction_handler + db 'vmread',0 + dw vmread_instruction-instruction_handler + db 'vmsave',0DBh + dw simple_svm_instruction-instruction_handler + db 'vmulpd',59h + dw avx_pd_instruction-instruction_handler + db 'vmulps',59h + dw avx_ps_instruction-instruction_handler + db 'vmulsd',59h + dw avx_sd_instruction-instruction_handler + db 'vmulss',59h + dw avx_ss_instruction-instruction_handler + db 'vmxoff',0C4h + dw simple_vmx_instruction-instruction_handler + db 'vpabsb',1Ch + dw avx_single_source_instruction_38-instruction_handler + db 'vpabsd',1Eh + dw avx_single_source_instruction_38-instruction_handler + db 'vpabsw',1Dh + dw avx_single_source_instruction_38-instruction_handler + db 'vpaddb',0FCh + dw avx_pd_instruction-instruction_handler + db 'vpaddd',0FEh + dw avx_pd_instruction-instruction_handler + db 'vpaddq',0D4h + dw avx_pd_instruction-instruction_handler + db 'vpaddw',0FDh + dw avx_pd_instruction-instruction_handler + db 'vpandn',0DFh + dw avx_pd_instruction-instruction_handler + db 'vpavgb',0E0h + dw avx_pd_instruction-instruction_handler + db 'vpavgw',0E3h + dw avx_pd_instruction-instruction_handler + db 'vpcmov',0A2h + dw vpcmov_instruction-instruction_handler + db 'vpcomb',-1 + dw xop_pcom_b_instruction-instruction_handler + db 'vpcomd',-1 + dw xop_pcom_d_instruction-instruction_handler + db 'vpcomq',-1 + dw xop_pcom_q_instruction-instruction_handler + db 'vpcomw',-1 + dw xop_pcom_w_instruction-instruction_handler + db 'vpermd',36h + dw avx_permd_instruction-instruction_handler + db 'vpermq',0 + dw avx_permq_instruction-instruction_handler + db 'vpperm',0A3h + dw xop_128bit_instruction-instruction_handler + db 'vprotb',90h + dw xop_shift_instruction-instruction_handler + db 'vprotd',92h + dw xop_shift_instruction-instruction_handler + db 'vprotq',93h + dw xop_shift_instruction-instruction_handler + db 'vprotw',91h + dw xop_shift_instruction-instruction_handler + db 'vpshab',98h + dw xop_shift_instruction-instruction_handler + db 'vpshad',9Ah + dw xop_shift_instruction-instruction_handler + db 'vpshaq',9Bh + dw xop_shift_instruction-instruction_handler + db 'vpshaw',99h + dw xop_shift_instruction-instruction_handler + db 'vpshlb',94h + dw xop_shift_instruction-instruction_handler + db 'vpshld',96h + dw xop_shift_instruction-instruction_handler + db 'vpshlq',97h + dw xop_shift_instruction-instruction_handler + db 'vpshlw',95h + dw xop_shift_instruction-instruction_handler + db 'vpslld',0F2h + dw avx_bit_shift_instruction-instruction_handler + db 'vpsllq',0F3h + dw avx_bit_shift_instruction-instruction_handler + db 'vpsllw',0F1h + dw avx_bit_shift_instruction-instruction_handler + db 'vpsrad',0E2h + dw avx_bit_shift_instruction-instruction_handler + db 'vpsraw',0E1h + dw avx_bit_shift_instruction-instruction_handler + db 'vpsrld',0D2h + dw avx_bit_shift_instruction-instruction_handler + db 'vpsrlq',0D3h + dw avx_bit_shift_instruction-instruction_handler + db 'vpsrlw',0D1h + dw avx_bit_shift_instruction-instruction_handler + db 'vpsubb',0F8h + dw avx_pd_instruction-instruction_handler + db 'vpsubd',0FAh + dw avx_pd_instruction-instruction_handler + db 'vpsubq',0FBh + dw avx_pd_instruction-instruction_handler + db 'vpsubw',0F9h + dw avx_pd_instruction-instruction_handler + db 'vptest',17h + dw avx_single_source_instruction_38-instruction_handler + db 'vrcpps',53h + dw avx_single_source_ps_instruction-instruction_handler + db 'vrcpss',53h + dw avx_ss_instruction-instruction_handler + db 'vsubpd',5Ch + dw avx_pd_instruction-instruction_handler + db 'vsubps',5Ch + dw avx_ps_instruction-instruction_handler + db 'vsubsd',5Ch + dw avx_sd_instruction-instruction_handler + db 'vsubss',5Ch + dw avx_ss_instruction-instruction_handler + db 'vxorpd',57h + dw avx_pd_instruction-instruction_handler + db 'vxorps',57h + dw avx_ps_instruction-instruction_handler + db 'wbinvd',9 + dw simple_extended_instruction-instruction_handler + db 'wrmsrq',30h + dw simple_extended_instruction_64bit-instruction_handler + db 'xabort',0 + dw xabort_instruction-instruction_handler + db 'xbegin',0 + dw xbegin_instruction-instruction_handler + db 'xgetbv',0D0h + dw simple_vmx_instruction-instruction_handler + db 'xrstor',101b + dw fxsave_instruction-instruction_handler + db 'xsetbv',0D1h + dw simple_vmx_instruction-instruction_handler +instructions_7: + db 'blcfill',11h + dw tbm_instruction-instruction_handler + db 'blendpd',0Dh + dw sse4_instruction_3a_imm8-instruction_handler + db 'blendps',0Ch + dw sse4_instruction_3a_imm8-instruction_handler + db 'blsfill',12h + dw tbm_instruction-instruction_handler + db 'clflush',111b + dw fxsave_instruction-instruction_handler + db 'cmovnae',42h + dw bs_instruction-instruction_handler + db 'cmovnbe',47h + dw bs_instruction-instruction_handler + db 'cmovnge',4Ch + dw bs_instruction-instruction_handler + db 'cmovnle',4Fh + dw bs_instruction-instruction_handler + db 'cmpeqpd',0 + dw cmp_pd_instruction-instruction_handler + db 'cmpeqps',0 + dw cmp_ps_instruction-instruction_handler + db 'cmpeqsd',0 + dw cmp_sd_instruction-instruction_handler + db 'cmpeqss',0 + dw cmp_ss_instruction-instruction_handler + db 'cmplepd',2 + dw cmp_pd_instruction-instruction_handler + db 'cmpleps',2 + dw cmp_ps_instruction-instruction_handler + db 'cmplesd',2 + dw cmp_sd_instruction-instruction_handler + db 'cmpless',2 + dw cmp_ss_instruction-instruction_handler + db 'cmpltpd',1 + dw cmp_pd_instruction-instruction_handler + db 'cmpltps',1 + dw cmp_ps_instruction-instruction_handler + db 'cmpltsd',1 + dw cmp_sd_instruction-instruction_handler + db 'cmpltss',1 + dw cmp_ss_instruction-instruction_handler + db 'cmpxchg',0B0h + dw basic_486_instruction-instruction_handler + db 'display',0 + dw display_directive-instruction_handler + db 'fcmovbe',0D0h + dw fcmov_instruction-instruction_handler + db 'fcmovnb',0C0h + dw fcomi_instruction-instruction_handler + db 'fcmovne',0C8h + dw fcomi_instruction-instruction_handler + db 'fcmovnu',0D8h + dw fcomi_instruction-instruction_handler + db 'fdecstp',110110b + dw simple_fpu_instruction-instruction_handler + db 'fincstp',110111b + dw simple_fpu_instruction-instruction_handler + db 'fldenvd',4 + dw fldenv_instruction_32bit-instruction_handler + db 'fldenvw',4 + dw fldenv_instruction_16bit-instruction_handler + db 'fnsaved',6 + dw fnsave_instruction_32bit-instruction_handler + db 'fnsavew',6 + dw fnsave_instruction_16bit-instruction_handler + db 'fnstenv',6 + dw fldenv_instruction-instruction_handler + db 'frndint',111100b + dw simple_fpu_instruction-instruction_handler + db 'frstord',4 + dw fnsave_instruction_32bit-instruction_handler + db 'frstorw',4 + dw fnsave_instruction_16bit-instruction_handler + db 'fsincos',111011b + dw simple_fpu_instruction-instruction_handler + db 'fstenvd',6 + dw fstenv_instruction_32bit-instruction_handler + db 'fstenvw',6 + dw fstenv_instruction_16bit-instruction_handler + db 'fucomip',0E8h + dw fcomip_instruction-instruction_handler + db 'fucompp',0 + dw fucompp_instruction-instruction_handler + db 'fxrstor',1 + dw fxsave_instruction-instruction_handler + db 'fxtract',110100b + dw simple_fpu_instruction-instruction_handler + db 'fyl2xp1',111001b + dw simple_fpu_instruction-instruction_handler + db 'insertq',0 + dw insertq_instruction-instruction_handler + db 'invlpga',0DFh + dw invlpga_instruction-instruction_handler + db 'invpcid',82h + dw vmx_inv_instruction-instruction_handler + db 'invvpid',81h + dw vmx_inv_instruction-instruction_handler + db 'ldmxcsr',10b + dw fxsave_instruction-instruction_handler + db 'loopned',0E0h + dw loop_instruction_32bit-instruction_handler + db 'loopneq',0E0h + dw loop_instruction_64bit-instruction_handler + db 'loopnew',0E0h + dw loop_instruction_16bit-instruction_handler + db 'loopnzd',0E0h + dw loop_instruction_32bit-instruction_handler + db 'loopnzq',0E0h + dw loop_instruction_64bit-instruction_handler + db 'loopnzw',0E0h + dw loop_instruction_16bit-instruction_handler + db 'monitor',0C8h + dw monitor_instruction-instruction_handler + db 'movddup',12h + dw sse_sd_instruction-instruction_handler + db 'movdq2q',0 + dw movdq2q_instruction-instruction_handler + db 'movhlps',12h + dw movhlps_instruction-instruction_handler + db 'movlhps',16h + dw movhlps_instruction-instruction_handler + db 'movntdq',0E7h + dw movntpd_instruction-instruction_handler + db 'movntpd',2Bh + dw movntpd_instruction-instruction_handler + db 'movntps',2Bh + dw movntps_instruction-instruction_handler + db 'movntsd',2Bh + dw movntsd_instruction-instruction_handler + db 'movntss',2Bh + dw movntss_instruction-instruction_handler + db 'movq2dq',0 + dw movq2dq_instruction-instruction_handler + db 'mpsadbw',42h + dw sse4_instruction_3a_imm8-instruction_handler + db 'paddusb',0DCh + dw basic_mmx_instruction-instruction_handler + db 'paddusw',0DDh + dw basic_mmx_instruction-instruction_handler + db 'palignr',0 + dw palignr_instruction-instruction_handler + db 'pavgusb',0BFh + dw amd3dnow_instruction-instruction_handler + db 'pblendw',0Eh + dw sse4_instruction_3a_imm8-instruction_handler + db 'pcmpeqb',74h + dw basic_mmx_instruction-instruction_handler + db 'pcmpeqd',76h + dw basic_mmx_instruction-instruction_handler + db 'pcmpeqq',29h + dw sse4_instruction_38-instruction_handler + db 'pcmpeqw',75h + dw basic_mmx_instruction-instruction_handler + db 'pcmpgtb',64h + dw basic_mmx_instruction-instruction_handler + db 'pcmpgtd',66h + dw basic_mmx_instruction-instruction_handler + db 'pcmpgtq',37h + dw sse4_instruction_38-instruction_handler + db 'pcmpgtw',65h + dw basic_mmx_instruction-instruction_handler + db 'pfcmpeq',0B0h + dw amd3dnow_instruction-instruction_handler + db 'pfcmpge',90h + dw amd3dnow_instruction-instruction_handler + db 'pfcmpgt',0A0h + dw amd3dnow_instruction-instruction_handler + db 'pfpnacc',8Eh + dw amd3dnow_instruction-instruction_handler + db 'pfrsqrt',97h + dw amd3dnow_instruction-instruction_handler + db 'phaddsw',3 + dw ssse3_instruction-instruction_handler + db 'phsubsw',7 + dw ssse3_instruction-instruction_handler + db 'pmaddwd',0F5h + dw basic_mmx_instruction-instruction_handler + db 'pmulhrw',0B7h + dw amd3dnow_instruction-instruction_handler + db 'pmulhuw',0E4h + dw basic_mmx_instruction-instruction_handler + db 'pmuludq',0F4h + dw basic_mmx_instruction-instruction_handler + db 'pshufhw',0F3h + dw pshufd_instruction-instruction_handler + db 'pshuflw',0F2h + dw pshufd_instruction-instruction_handler + db 'psubusb',0D8h + dw basic_mmx_instruction-instruction_handler + db 'psubusw',0D9h + dw basic_mmx_instruction-instruction_handler + db 'roundpd',9 + dw sse4_instruction_3a_imm8-instruction_handler + db 'roundps',8 + dw sse4_instruction_3a_imm8-instruction_handler + db 'roundsd',0Bh + dw sse4_sd_instruction_3a_imm8-instruction_handler + db 'roundss',0Ah + dw sse4_ss_instruction_3a_imm8-instruction_handler + db 'rsqrtps',52h + dw sse_ps_instruction-instruction_handler + db 'rsqrtss',52h + dw sse_ss_instruction-instruction_handler + db 'section',0 + dw section_directive-instruction_handler + db 'segment',0 + dw segment_directive-instruction_handler + db 'stmxcsr',11b + dw fxsave_instruction-instruction_handler + db 'syscall',05h + dw simple_extended_instruction-instruction_handler + db 'sysexit',35h + dw simple_extended_instruction-instruction_handler + db 'sysretq',07h + dw simple_extended_instruction_64bit-instruction_handler + db 'ucomisd',2Eh + dw comisd_instruction-instruction_handler + db 'ucomiss',2Eh + dw comiss_instruction-instruction_handler + db 'vaesdec',0DEh + dw avx_128bit_instruction_38-instruction_handler + db 'vaesenc',0DCh + dw avx_128bit_instruction_38-instruction_handler + db 'vaesimc',0DBh + dw avx_single_source_128bit_instruction_38-instruction_handler + db 'vandnpd',55h + dw avx_pd_instruction-instruction_handler + db 'vandnps',55h + dw avx_ps_instruction-instruction_handler + db 'vcomisd',2Fh + dw avx_comisd_instruction-instruction_handler + db 'vcomiss',2Fh + dw avx_comiss_instruction-instruction_handler + db 'vfrczpd',81h + dw xop_single_source_instruction-instruction_handler + db 'vfrczps',80h + dw xop_single_source_instruction-instruction_handler + db 'vfrczsd',83h + dw xop_single_source_sd_instruction-instruction_handler + db 'vfrczss',82h + dw xop_single_source_ss_instruction-instruction_handler + db 'vhaddpd',07Ch + dw avx_pd_instruction-instruction_handler + db 'vhaddps',07Ch + dw avx_haddps_instruction-instruction_handler + db 'vhsubpd',07Dh + dw avx_pd_instruction-instruction_handler + db 'vhsubps',07Dh + dw avx_haddps_instruction-instruction_handler + db 'virtual',0 + dw virtual_directive-instruction_handler + db 'vmclear',6 + dw vmclear_instruction-instruction_handler + db 'vmmcall',0D9h + dw simple_vmx_instruction-instruction_handler + db 'vmovapd',28h + dw avx_movpd_instruction-instruction_handler + db 'vmovaps',28h + dw avx_movps_instruction-instruction_handler + db 'vmovdqa',6Fh + dw avx_movpd_instruction-instruction_handler + db 'vmovdqu',6Fh + dw avx_movdqu_instruction-instruction_handler + db 'vmovhpd',16h + dw avx_movlpd_instruction-instruction_handler + db 'vmovhps',16h + dw avx_movlps_instruction-instruction_handler + db 'vmovlpd',12h + dw avx_movlpd_instruction-instruction_handler + db 'vmovlps',12h + dw avx_movlps_instruction-instruction_handler + db 'vmovupd',10h + dw avx_movpd_instruction-instruction_handler + db 'vmovups',10h + dw avx_movps_instruction-instruction_handler + db 'vmptrld',6 + dw vmx_instruction-instruction_handler + db 'vmptrst',7 + dw vmx_instruction-instruction_handler + db 'vmwrite',0 + dw vmwrite_instruction-instruction_handler + db 'vpaddsb',0ECh + dw avx_pd_instruction-instruction_handler + db 'vpaddsw',0EDh + dw avx_pd_instruction-instruction_handler + db 'vpcomub',-1 + dw xop_pcom_ub_instruction-instruction_handler + db 'vpcomud',-1 + dw xop_pcom_ud_instruction-instruction_handler + db 'vpcomuq',-1 + dw xop_pcom_uq_instruction-instruction_handler + db 'vpcomuw',-1 + dw xop_pcom_uw_instruction-instruction_handler + db 'vpermpd',1 + dw avx_permq_instruction-instruction_handler + db 'vpermps',16h + dw avx_permd_instruction-instruction_handler + db 'vpextrb',14h + dw avx_pextrb_instruction-instruction_handler + db 'vpextrd',16h + dw avx_pextrd_instruction-instruction_handler + db 'vpextrq',16h + dw avx_pextrq_instruction-instruction_handler + db 'vpextrw',15h + dw avx_pextrw_instruction-instruction_handler + db 'vphaddd',2 + dw avx_instruction_38-instruction_handler + db 'vphaddw',1 + dw avx_instruction_38-instruction_handler + db 'vphsubd',6 + dw avx_instruction_38-instruction_handler + db 'vphsubw',5 + dw avx_instruction_38-instruction_handler + db 'vpinsrb',20h + dw avx_pinsrb_instruction-instruction_handler + db 'vpinsrd',22h + dw avx_pinsrd_instruction-instruction_handler + db 'vpinsrq',22h + dw avx_pinsrq_instruction-instruction_handler + db 'vpinsrw',0C4h + dw avx_pinsrw_instruction-instruction_handler + db 'vpmaxsb',3Ch + dw avx_instruction_38-instruction_handler + db 'vpmaxsd',3Dh + dw avx_instruction_38-instruction_handler + db 'vpmaxsw',0EEh + dw avx_pd_instruction-instruction_handler + db 'vpmaxub',0DEh + dw avx_pd_instruction-instruction_handler + db 'vpmaxud',3Fh + dw avx_instruction_38-instruction_handler + db 'vpmaxuw',3Eh + dw avx_instruction_38-instruction_handler + db 'vpminsb',38h + dw avx_instruction_38-instruction_handler + db 'vpminsd',39h + dw avx_instruction_38-instruction_handler + db 'vpminsw',0EAh + dw avx_pd_instruction-instruction_handler + db 'vpminub',0DAh + dw avx_pd_instruction-instruction_handler + db 'vpminud',3Bh + dw avx_instruction_38-instruction_handler + db 'vpminuw',3Ah + dw avx_instruction_38-instruction_handler + db 'vpmuldq',28h + dw avx_instruction_38-instruction_handler + db 'vpmulhw',0E5h + dw avx_pd_instruction-instruction_handler + db 'vpmulld',40h + dw avx_instruction_38-instruction_handler + db 'vpmullw',0D5h + dw avx_pd_instruction-instruction_handler + db 'vpsadbw',0F6h + dw avx_pd_instruction-instruction_handler + db 'vpshufb',0 + dw avx_instruction_38-instruction_handler + db 'vpshufd',66h + dw avx_pshufd_instruction-instruction_handler + db 'vpsignb',8 + dw avx_instruction_38-instruction_handler + db 'vpsignd',0Ah + dw avx_instruction_38-instruction_handler + db 'vpsignw',9 + dw avx_instruction_38-instruction_handler + db 'vpslldq',111b + dw avx_pslldq_instruction-instruction_handler + db 'vpsllvd',47h + dw avx_instruction_38-instruction_handler + db 'vpsllvq',47h + dw avx_instruction_38_w1-instruction_handler + db 'vpsravd',46h + dw avx_instruction_38-instruction_handler + db 'vpsrldq',011b + dw avx_pslldq_instruction-instruction_handler + db 'vpsrlvd',45h + dw avx_instruction_38-instruction_handler + db 'vpsrlvq',45h + dw avx_instruction_38_w1-instruction_handler + db 'vpsubsb',0E8h + dw avx_pd_instruction-instruction_handler + db 'vpsubsw',0E9h + dw avx_pd_instruction-instruction_handler + db 'vshufpd',0C6h + dw avx_pd_instruction_imm8-instruction_handler + db 'vshufps',0C6h + dw avx_ps_instruction_imm8-instruction_handler + db 'vsqrtpd',51h + dw avx_single_source_pd_instruction-instruction_handler + db 'vsqrtps',51h + dw avx_single_source_ps_instruction-instruction_handler + db 'vsqrtsd',51h + dw avx_sd_instruction-instruction_handler + db 'vsqrtss',51h + dw avx_ss_instruction-instruction_handler + db 'vtestpd',0Fh + dw avx_single_source_instruction_38-instruction_handler + db 'vtestps',0Eh + dw avx_single_source_instruction_38-instruction_handler + db 'xsave64',100b + dw fxsave_instruction_64bit-instruction_handler +instructions_8: + db 'addsubpd',0D0h + dw sse_pd_instruction-instruction_handler + db 'addsubps',0D0h + dw cvtpd2dq_instruction-instruction_handler + db 'blendvpd',15h + dw sse4_instruction_38_xmm0-instruction_handler + db 'blendvps',14h + dw sse4_instruction_38_xmm0-instruction_handler + db 'cmpneqpd',4 + dw cmp_pd_instruction-instruction_handler + db 'cmpneqps',4 + dw cmp_ps_instruction-instruction_handler + db 'cmpneqsd',4 + dw cmp_sd_instruction-instruction_handler + db 'cmpneqss',4 + dw cmp_ss_instruction-instruction_handler + db 'cmpnlepd',6 + dw cmp_pd_instruction-instruction_handler + db 'cmpnleps',6 + dw cmp_ps_instruction-instruction_handler + db 'cmpnlesd',6 + dw cmp_sd_instruction-instruction_handler + db 'cmpnless',6 + dw cmp_ss_instruction-instruction_handler + db 'cmpnltpd',5 + dw cmp_pd_instruction-instruction_handler + db 'cmpnltps',5 + dw cmp_ps_instruction-instruction_handler + db 'cmpnltsd',5 + dw cmp_sd_instruction-instruction_handler + db 'cmpnltss',5 + dw cmp_ss_instruction-instruction_handler + db 'cmpordpd',7 + dw cmp_pd_instruction-instruction_handler + db 'cmpordps',7 + dw cmp_ps_instruction-instruction_handler + db 'cmpordsd',7 + dw cmp_sd_instruction-instruction_handler + db 'cmpordss',7 + dw cmp_ss_instruction-instruction_handler + db 'cvtdq2pd',0E6h + dw cvtdq2pd_instruction-instruction_handler + db 'cvtdq2ps',5Bh + dw sse_ps_instruction-instruction_handler + db 'cvtpd2dq',0E6h + dw cvtpd2dq_instruction-instruction_handler + db 'cvtpd2pi',2Dh + dw cvtpd2pi_instruction-instruction_handler + db 'cvtpd2ps',5Ah + dw sse_pd_instruction-instruction_handler + db 'cvtpi2pd',2Ah + dw cvtpi2pd_instruction-instruction_handler + db 'cvtpi2ps',2Ah + dw cvtpi2ps_instruction-instruction_handler + db 'cvtps2dq',5Bh + dw sse_pd_instruction-instruction_handler + db 'cvtps2pd',5Ah + dw cvtps2pd_instruction-instruction_handler + db 'cvtps2pi',2Dh + dw cvtps2pi_instruction-instruction_handler + db 'cvtsd2si',2Dh + dw cvtsd2si_instruction-instruction_handler + db 'cvtsd2ss',5Ah + dw sse_sd_instruction-instruction_handler + db 'cvtsi2sd',2Ah + dw cvtsi2sd_instruction-instruction_handler + db 'cvtsi2ss',2Ah + dw cvtsi2ss_instruction-instruction_handler + db 'cvtss2sd',5Ah + dw sse_ss_instruction-instruction_handler + db 'cvtss2si',2Dh + dw cvtss2si_instruction-instruction_handler + db 'fcmovnbe',0D0h + dw fcomi_instruction-instruction_handler + db 'fnstenvd',6 + dw fldenv_instruction_32bit-instruction_handler + db 'fnstenvw',6 + dw fldenv_instruction_16bit-instruction_handler + db 'fxsave64',0 + dw fxsave_instruction_64bit-instruction_handler + db 'insertps',0 + dw insertps_instruction-instruction_handler + db 'maskmovq',0 + dw maskmovq_instruction-instruction_handler + db 'movmskpd',0 + dw movmskpd_instruction-instruction_handler + db 'movmskps',0 + dw movmskps_instruction-instruction_handler + db 'movntdqa',2Ah + dw movntdqa_instruction-instruction_handler + db 'movshdup',16h + dw movshdup_instruction-instruction_handler + db 'movsldup',12h + dw movshdup_instruction-instruction_handler + db 'packssdw',6Bh + dw basic_mmx_instruction-instruction_handler + db 'packsswb',63h + dw basic_mmx_instruction-instruction_handler + db 'packusdw',2Bh + dw sse4_instruction_38-instruction_handler + db 'packuswb',67h + dw basic_mmx_instruction-instruction_handler + db 'pblendvb',10h + dw sse4_instruction_38_xmm0-instruction_handler + db 'pfrcpit1',0A6h + dw amd3dnow_instruction-instruction_handler + db 'pfrcpit2',0B6h + dw amd3dnow_instruction-instruction_handler + db 'pfrsqit1',0A7h + dw amd3dnow_instruction-instruction_handler + db 'pmovmskb',0D7h + dw pmovmskb_instruction-instruction_handler + db 'pmovsxbd',21h + dw pmovsxbd_instruction-instruction_handler + db 'pmovsxbq',22h + dw pmovsxbq_instruction-instruction_handler + db 'pmovsxbw',20h + dw pmovsxbw_instruction-instruction_handler + db 'pmovsxdq',25h + dw pmovsxdq_instruction-instruction_handler + db 'pmovsxwd',23h + dw pmovsxwd_instruction-instruction_handler + db 'pmovsxwq',24h + dw pmovsxwq_instruction-instruction_handler + db 'pmovzxbd',31h + dw pmovsxbd_instruction-instruction_handler + db 'pmovzxbq',32h + dw pmovsxbq_instruction-instruction_handler + db 'pmovzxbw',30h + dw pmovsxbw_instruction-instruction_handler + db 'pmovzxdq',35h + dw pmovsxdq_instruction-instruction_handler + db 'pmovzxwd',33h + dw pmovsxwd_instruction-instruction_handler + db 'pmovzxwq',34h + dw pmovsxwq_instruction-instruction_handler + db 'pmulhrsw',0Bh + dw ssse3_instruction-instruction_handler + db 'prefetch',0 + dw amd_prefetch_instruction-instruction_handler + db 'rdfsbase',0 + dw rdfsbase_instruction-instruction_handler + db 'rdgsbase',1 + dw rdfsbase_instruction-instruction_handler + db 'sysenter',34h + dw simple_extended_instruction-instruction_handler + db 'sysexitq',35h + dw simple_extended_instruction_64bit-instruction_handler + db 'unpckhpd',15h + dw sse_pd_instruction-instruction_handler + db 'unpckhps',15h + dw sse_ps_instruction-instruction_handler + db 'unpcklpd',14h + dw sse_pd_instruction-instruction_handler + db 'unpcklps',14h + dw sse_ps_instruction-instruction_handler + db 'vblendpd',0Dh + dw avx_instruction_3a_imm8-instruction_handler + db 'vblendps',0Ch + dw avx_instruction_3a_imm8-instruction_handler + db 'vcmpeqpd',0 + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpeqps',0 + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpeqsd',0 + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpeqss',0 + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpgepd',0Dh + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpgeps',0Dh + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpgesd',0Dh + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpgess',0Dh + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpgtpd',0Eh + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpgtps',0Eh + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpgtsd',0Eh + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpgtss',0Eh + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmplepd',2 + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpleps',2 + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmplesd',2 + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpless',2 + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpltpd',1 + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpltps',1 + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpltsd',1 + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpltss',1 + dw avx_cmp_ss_instruction-instruction_handler + db 'vfmaddpd',69h + dw fma4_instruction_p-instruction_handler + db 'vfmaddps',68h + dw fma4_instruction_p-instruction_handler + db 'vfmaddsd',6Bh + dw fma4_instruction_sd-instruction_handler + db 'vfmaddss',6Ah + dw fma4_instruction_ss-instruction_handler + db 'vfmsubpd',6Dh + dw fma4_instruction_p-instruction_handler + db 'vfmsubps',6Ch + dw fma4_instruction_p-instruction_handler + db 'vfmsubsd',6Fh + dw fma4_instruction_sd-instruction_handler + db 'vfmsubss',6Eh + dw fma4_instruction_ss-instruction_handler + db 'vldmxcsr',10b + dw vldmxcsr_instruction-instruction_handler + db 'vmlaunch',0C2h + dw simple_vmx_instruction-instruction_handler + db 'vmovddup',12h + dw avx_movddup_instruction-instruction_handler + db 'vmovhlps',12h + dw avx_movhlps_instruction-instruction_handler + db 'vmovlhps',16h + dw avx_movhlps_instruction-instruction_handler + db 'vmovntdq',0E7h + dw avx_movntpd_instruction-instruction_handler + db 'vmovntpd',2Bh + dw avx_movntpd_instruction-instruction_handler + db 'vmovntps',2Bh + dw avx_movntps_instruction-instruction_handler + db 'vmpsadbw',42h + dw avx_instruction_3a_imm8-instruction_handler + db 'vmresume',0C3h + dw simple_vmx_instruction-instruction_handler + db 'vpaddusb',0DCh + dw avx_pd_instruction-instruction_handler + db 'vpaddusw',0DDh + dw avx_pd_instruction-instruction_handler + db 'vpalignr',0Fh + dw avx_instruction_3a_imm8-instruction_handler + db 'vpblendd',2 + dw avx_instruction_3a_imm8-instruction_handler + db 'vpblendw',0Eh + dw avx_instruction_3a_imm8-instruction_handler + db 'vpcmpeqb',74h + dw avx_pd_instruction-instruction_handler + db 'vpcmpeqd',76h + dw avx_pd_instruction-instruction_handler + db 'vpcmpeqq',29h + dw avx_instruction_38-instruction_handler + db 'vpcmpeqw',75h + dw avx_pd_instruction-instruction_handler + db 'vpcmpgtb',64h + dw avx_pd_instruction-instruction_handler + db 'vpcmpgtd',66h + dw avx_pd_instruction-instruction_handler + db 'vpcmpgtq',37h + dw avx_instruction_38-instruction_handler + db 'vpcmpgtw',65h + dw avx_pd_instruction-instruction_handler + db 'vpcomeqb',4 + dw xop_pcom_b_instruction-instruction_handler + db 'vpcomeqd',4 + dw xop_pcom_d_instruction-instruction_handler + db 'vpcomeqq',4 + dw xop_pcom_q_instruction-instruction_handler + db 'vpcomeqw',4 + dw xop_pcom_w_instruction-instruction_handler + db 'vpcomgeb',3 + dw xop_pcom_b_instruction-instruction_handler + db 'vpcomged',3 + dw xop_pcom_d_instruction-instruction_handler + db 'vpcomgeq',3 + dw xop_pcom_q_instruction-instruction_handler + db 'vpcomgew',3 + dw xop_pcom_w_instruction-instruction_handler + db 'vpcomgtb',2 + dw xop_pcom_b_instruction-instruction_handler + db 'vpcomgtd',2 + dw xop_pcom_d_instruction-instruction_handler + db 'vpcomgtq',2 + dw xop_pcom_q_instruction-instruction_handler + db 'vpcomgtw',2 + dw xop_pcom_w_instruction-instruction_handler + db 'vpcomleb',1 + dw xop_pcom_b_instruction-instruction_handler + db 'vpcomled',1 + dw xop_pcom_d_instruction-instruction_handler + db 'vpcomleq',1 + dw xop_pcom_q_instruction-instruction_handler + db 'vpcomlew',1 + dw xop_pcom_w_instruction-instruction_handler + db 'vpcomltb',0 + dw xop_pcom_b_instruction-instruction_handler + db 'vpcomltd',0 + dw xop_pcom_d_instruction-instruction_handler + db 'vpcomltq',0 + dw xop_pcom_q_instruction-instruction_handler + db 'vpcomltw',0 + dw xop_pcom_w_instruction-instruction_handler + db 'vphaddbd',0C2h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphaddbq',0C3h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphaddbw',0C1h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphadddq',0CBh + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphaddsw',3 + dw avx_instruction_38-instruction_handler + db 'vphaddwd',0C6h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphaddwq',0C7h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphsubbw',0E1h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphsubdq',0E3h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphsubsw',7 + dw avx_instruction_38-instruction_handler + db 'vphsubwd',0E2h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vpmacsdd',9Eh + dw xop_triple_source_128bit_instruction-instruction_handler + db 'vpmacswd',96h + dw xop_triple_source_128bit_instruction-instruction_handler + db 'vpmacsww',95h + dw xop_triple_source_128bit_instruction-instruction_handler + db 'vpmaddwd',0F5h + dw avx_pd_instruction-instruction_handler + db 'vpmulhuw',0E4h + dw avx_pd_instruction-instruction_handler + db 'vpmuludq',0F4h + dw avx_pd_instruction-instruction_handler + db 'vpshufhw',0F3h + dw avx_pshufd_instruction-instruction_handler + db 'vpshuflw',0F2h + dw avx_pshufd_instruction-instruction_handler + db 'vpsubusb',0D8h + dw avx_pd_instruction-instruction_handler + db 'vpsubusw',0D9h + dw avx_pd_instruction-instruction_handler + db 'vroundpd',9 + dw avx_single_source_instruction_3a_imm8-instruction_handler + db 'vroundps',8 + dw avx_single_source_instruction_3a_imm8-instruction_handler + db 'vroundsd',0Bh + dw avx_sd_instruction_3a_imm8-instruction_handler + db 'vroundss',0Ah + dw avx_ss_instruction_3a_imm8-instruction_handler + db 'vrsqrtps',52h + dw avx_single_source_ps_instruction-instruction_handler + db 'vrsqrtss',52h + dw avx_ss_instruction-instruction_handler + db 'vstmxcsr',11b + dw vldmxcsr_instruction-instruction_handler + db 'vucomisd',2Eh + dw avx_comisd_instruction-instruction_handler + db 'vucomiss',2Eh + dw avx_comiss_instruction-instruction_handler + db 'vzeroall',77h + dw vzeroall_instruction-instruction_handler + db 'wrfsbase',2 + dw rdfsbase_instruction-instruction_handler + db 'wrgsbase',3 + dw rdfsbase_instruction-instruction_handler + db 'xacquire',0F2h + dw prefix_instruction-instruction_handler + db 'xrelease',0F3h + dw prefix_instruction-instruction_handler + db 'xrstor64',101b + dw fxsave_instruction_64bit-instruction_handler + db 'xsaveopt',110b + dw fxsave_instruction-instruction_handler +instructions_9: + db 'cmpxchg8b',8 + dw cmpxchgx_instruction-instruction_handler + db 'cvttpd2dq',0E6h + dw sse_pd_instruction-instruction_handler + db 'cvttpd2pi',2Ch + dw cvtpd2pi_instruction-instruction_handler + db 'cvttps2dq',5Bh + dw movshdup_instruction-instruction_handler + db 'cvttps2pi',2Ch + dw cvtps2pi_instruction-instruction_handler + db 'cvttsd2si',2Ch + dw cvtsd2si_instruction-instruction_handler + db 'cvttss2si',2Ch + dw cvtss2si_instruction-instruction_handler + db 'extractps',0 + dw extractps_instruction-instruction_handler + db 'fxrstor64',1 + dw fxsave_instruction_64bit-instruction_handler + db 'pclmulqdq',-1 + dw pclmulqdq_instruction-instruction_handler + db 'pcmpestri',61h + dw sse4_instruction_3a_imm8-instruction_handler + db 'pcmpestrm',60h + dw sse4_instruction_3a_imm8-instruction_handler + db 'pcmpistri',63h + dw sse4_instruction_3a_imm8-instruction_handler + db 'pcmpistrm',62h + dw sse4_instruction_3a_imm8-instruction_handler + db 'pmaddubsw',4 + dw ssse3_instruction-instruction_handler + db 'prefetchw',1 + dw amd_prefetch_instruction-instruction_handler + db 'punpckhbw',68h + dw basic_mmx_instruction-instruction_handler + db 'punpckhdq',6Ah + dw basic_mmx_instruction-instruction_handler + db 'punpckhwd',69h + dw basic_mmx_instruction-instruction_handler + db 'punpcklbw',60h + dw basic_mmx_instruction-instruction_handler + db 'punpckldq',62h + dw basic_mmx_instruction-instruction_handler + db 'punpcklwd',61h + dw basic_mmx_instruction-instruction_handler + db 'vaddsubpd',0D0h + dw avx_pd_instruction-instruction_handler + db 'vaddsubps',0D0h + dw avx_haddps_instruction-instruction_handler + db 'vblendvpd',4Bh + dw avx_triple_source_instruction_3a-instruction_handler + db 'vblendvps',4Ah + dw avx_triple_source_instruction_3a-instruction_handler + db 'vcmpneqpd',4 + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpneqps',4 + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpneqsd',4 + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpneqss',4 + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpngepd',9 + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpngeps',9 + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpngesd',9 + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpngess',9 + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpngtpd',0Ah + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpngtps',0Ah + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpngtsd',0Ah + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpngtss',0Ah + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpnlepd',6 + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpnleps',6 + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpnlesd',6 + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpnless',6 + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpnltpd',5 + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpnltps',5 + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpnltsd',5 + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpnltss',5 + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpordpd',7 + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpordps',7 + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpordsd',7 + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpordss',7 + dw avx_cmp_ss_instruction-instruction_handler + db 'vcvtdq2pd',0E6h + dw avx_cvtdq2pd_instruction-instruction_handler + db 'vcvtdq2ps',5Bh + dw avx_single_source_ps_instruction-instruction_handler + db 'vcvtpd2dq',0E6h + dw avx_cvtpd2dq_instruction-instruction_handler + db 'vcvtpd2ps',5Ah + dw avx_cvtpd2ps_instruction-instruction_handler + db 'vcvtph2ps',13h + dw vcvtph2ps_instruction-instruction_handler + db 'vcvtps2dq',5Bh + dw avx_single_source_pd_instruction-instruction_handler + db 'vcvtps2pd',5Ah + dw avx_cvtps2pd_instruction-instruction_handler + db 'vcvtps2ph',1Dh + dw vcvtps2ph_instruction-instruction_handler + db 'vcvtsd2si',2Dh + dw avx_cvtsd2si_instruction-instruction_handler + db 'vcvtsd2ss',5Ah + dw avx_sd_instruction-instruction_handler + db 'vcvtsi2sd',2Ah + dw avx_cvtsi2sd_instruction-instruction_handler + db 'vcvtsi2ss',2Ah + dw avx_cvtsi2ss_instruction-instruction_handler + db 'vcvtss2sd',5Ah + dw avx_ss_instruction-instruction_handler + db 'vcvtss2si',2Dh + dw avx_cvtss2si_instruction-instruction_handler + db 'vfnmaddpd',79h + dw fma4_instruction_p-instruction_handler + db 'vfnmaddps',78h + dw fma4_instruction_p-instruction_handler + db 'vfnmaddsd',7Bh + dw fma4_instruction_sd-instruction_handler + db 'vfnmaddss',7Ah + dw fma4_instruction_ss-instruction_handler + db 'vfnmsubpd',7Dh + dw fma4_instruction_p-instruction_handler + db 'vfnmsubps',7Ch + dw fma4_instruction_p-instruction_handler + db 'vfnmsubsd',7Fh + dw fma4_instruction_sd-instruction_handler + db 'vfnmsubss',7Eh + dw fma4_instruction_ss-instruction_handler + db 'vinsertps',0 + dw avx_insertps_instruction-instruction_handler + db 'vmovmskpd',0 + dw avx_movmskpd_instruction-instruction_handler + db 'vmovmskps',0 + dw avx_movmskps_instruction-instruction_handler + db 'vmovntdqa',2Ah + dw avx_movntdqa_instruction-instruction_handler + db 'vmovshdup',16h + dw avx_movshdup_instruction-instruction_handler + db 'vmovsldup',12h + dw avx_movshdup_instruction-instruction_handler + db 'vpackssdw',6Bh + dw avx_pd_instruction-instruction_handler + db 'vpacksswb',63h + dw avx_pd_instruction-instruction_handler + db 'vpackusdw',2Bh + dw avx_instruction_38-instruction_handler + db 'vpackuswb',67h + dw avx_pd_instruction-instruction_handler + db 'vpblendvb',4Ch + dw avx_triple_source_instruction_3a-instruction_handler + db 'vpcomequb',4 + dw xop_pcom_ub_instruction-instruction_handler + db 'vpcomequd',4 + dw xop_pcom_ud_instruction-instruction_handler + db 'vpcomequq',4 + dw xop_pcom_uq_instruction-instruction_handler + db 'vpcomequw',4 + dw xop_pcom_uw_instruction-instruction_handler + db 'vpcomgeub',3 + dw xop_pcom_ub_instruction-instruction_handler + db 'vpcomgeud',3 + dw xop_pcom_ud_instruction-instruction_handler + db 'vpcomgeuq',3 + dw xop_pcom_uq_instruction-instruction_handler + db 'vpcomgeuw',3 + dw xop_pcom_uw_instruction-instruction_handler + db 'vpcomgtub',2 + dw xop_pcom_ub_instruction-instruction_handler + db 'vpcomgtud',2 + dw xop_pcom_ud_instruction-instruction_handler + db 'vpcomgtuq',2 + dw xop_pcom_uq_instruction-instruction_handler + db 'vpcomgtuw',2 + dw xop_pcom_uw_instruction-instruction_handler + db 'vpcomleub',1 + dw xop_pcom_ub_instruction-instruction_handler + db 'vpcomleud',1 + dw xop_pcom_ud_instruction-instruction_handler + db 'vpcomleuq',1 + dw xop_pcom_uq_instruction-instruction_handler + db 'vpcomleuw',1 + dw xop_pcom_uw_instruction-instruction_handler + db 'vpcomltub',0 + dw xop_pcom_ub_instruction-instruction_handler + db 'vpcomltud',0 + dw xop_pcom_ud_instruction-instruction_handler + db 'vpcomltuq',0 + dw xop_pcom_uq_instruction-instruction_handler + db 'vpcomltuw',0 + dw xop_pcom_uw_instruction-instruction_handler + db 'vpcomneqb',5 + dw xop_pcom_b_instruction-instruction_handler + db 'vpcomneqd',5 + dw xop_pcom_d_instruction-instruction_handler + db 'vpcomneqq',5 + dw xop_pcom_q_instruction-instruction_handler + db 'vpcomneqw',5 + dw xop_pcom_w_instruction-instruction_handler + db 'vpermilpd',5 + dw avx_permil_instruction-instruction_handler + db 'vpermilps',4 + dw avx_permil_instruction-instruction_handler + db 'vphaddubd',0D2h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphaddubq',0D3h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphaddubw',0D1h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphaddudq',0DBh + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphadduwd',0D6h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vphadduwq',0D7h + dw xop_single_source_128bit_instruction-instruction_handler + db 'vpmacsdqh',9Fh + dw xop_triple_source_128bit_instruction-instruction_handler + db 'vpmacsdql',97h + dw xop_triple_source_128bit_instruction-instruction_handler + db 'vpmacssdd',8Eh + dw xop_triple_source_128bit_instruction-instruction_handler + db 'vpmacsswd',86h + dw xop_triple_source_128bit_instruction-instruction_handler + db 'vpmacssww',85h + dw xop_triple_source_128bit_instruction-instruction_handler + db 'vpmadcswd',0B6h + dw xop_triple_source_128bit_instruction-instruction_handler + db 'vpmovmskb',0D7h + dw avx_pmovmskb_instruction-instruction_handler + db 'vpmovsxbd',21h + dw avx_pmovsxbd_instruction-instruction_handler + db 'vpmovsxbq',22h + dw avx_pmovsxbq_instruction-instruction_handler + db 'vpmovsxbw',20h + dw avx_pmovsxbw_instruction-instruction_handler + db 'vpmovsxdq',25h + dw avx_pmovsxdq_instruction-instruction_handler + db 'vpmovsxwd',23h + dw avx_pmovsxwd_instruction-instruction_handler + db 'vpmovsxwq',24h + dw avx_pmovsxwq_instruction-instruction_handler + db 'vpmovzxbd',31h + dw avx_pmovsxbd_instruction-instruction_handler + db 'vpmovzxbq',32h + dw avx_pmovsxbq_instruction-instruction_handler + db 'vpmovzxbw',30h + dw avx_pmovsxbw_instruction-instruction_handler + db 'vpmovzxdq',35h + dw avx_pmovsxdq_instruction-instruction_handler + db 'vpmovzxwd',33h + dw avx_pmovsxwd_instruction-instruction_handler + db 'vpmovzxwq',34h + dw avx_pmovsxwq_instruction-instruction_handler + db 'vpmulhrsw',0Bh + dw avx_instruction_38-instruction_handler + db 'vunpckhpd',15h + dw avx_pd_instruction-instruction_handler + db 'vunpckhps',15h + dw avx_ps_instruction-instruction_handler + db 'vunpcklpd',14h + dw avx_pd_instruction-instruction_handler + db 'vunpcklps',14h + dw avx_ps_instruction-instruction_handler +instructions_10: + db 'aesdeclast',0DFh + dw sse4_instruction_38-instruction_handler + db 'aesenclast',0DDh + dw sse4_instruction_38-instruction_handler + db 'cmpunordpd',3 + dw cmp_pd_instruction-instruction_handler + db 'cmpunordps',3 + dw cmp_ps_instruction-instruction_handler + db 'cmpunordsd',3 + dw cmp_sd_instruction-instruction_handler + db 'cmpunordss',3 + dw cmp_ss_instruction-instruction_handler + db 'cmpxchg16b',16 + dw cmpxchgx_instruction-instruction_handler + db 'loadall286',5 + dw simple_extended_instruction-instruction_handler + db 'loadall386',7 + dw simple_extended_instruction-instruction_handler + db 'maskmovdqu',0 + dw maskmovdqu_instruction-instruction_handler + db 'phminposuw',41h + dw sse4_instruction_38-instruction_handler + db 'prefetcht0',1 + dw prefetch_instruction-instruction_handler + db 'prefetcht1',2 + dw prefetch_instruction-instruction_handler + db 'prefetcht2',3 + dw prefetch_instruction-instruction_handler + db 'punpckhqdq',6Dh + dw sse_pd_instruction-instruction_handler + db 'punpcklqdq',6Ch + dw sse_pd_instruction-instruction_handler + db 'vcmptruepd',0Fh + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmptrueps',0Fh + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmptruesd',0Fh + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmptruess',0Fh + dw avx_cmp_ss_instruction-instruction_handler + db 'vcvttpd2dq',0E6h + dw avx_cvtpd2ps_instruction-instruction_handler + db 'vcvttps2dq',5Bh + dw avx_cvttps2dq_instruction-instruction_handler + db 'vcvttsd2si',2Ch + dw avx_cvtsd2si_instruction-instruction_handler + db 'vcvttss2si',2Ch + dw avx_cvtss2si_instruction-instruction_handler + db 'vextractps',0 + dw avx_extractps_instruction-instruction_handler + db 'vgatherdpd',92h + dw gather_instruction_pd-instruction_handler + db 'vgatherdps',92h + dw gather_instruction_ps-instruction_handler + db 'vgatherqpd',93h + dw gather_instruction_pd-instruction_handler + db 'vgatherqps',93h + dw gather_instruction_ps-instruction_handler + db 'vmaskmovpd',2Dh + dw avx_maskmov_instruction-instruction_handler + db 'vmaskmovps',2Ch + dw avx_maskmov_instruction-instruction_handler + db 'vpclmulqdq',-1 + dw avx_pclmulqdq_instruction-instruction_handler + db 'vpcmpestri',61h + dw avx_single_source_128bit_instruction_3a_imm8-instruction_handler + db 'vpcmpestrm',60h + dw avx_single_source_128bit_instruction_3a_imm8-instruction_handler + db 'vpcmpistri',63h + dw avx_single_source_128bit_instruction_3a_imm8-instruction_handler + db 'vpcmpistrm',62h + dw avx_single_source_128bit_instruction_3a_imm8-instruction_handler + db 'vpcomnequb',5 + dw xop_pcom_ub_instruction-instruction_handler + db 'vpcomnequd',5 + dw xop_pcom_ud_instruction-instruction_handler + db 'vpcomnequq',5 + dw xop_pcom_uq_instruction-instruction_handler + db 'vpcomnequw',5 + dw xop_pcom_uw_instruction-instruction_handler + db 'vpcomtrueb',7 + dw xop_pcom_b_instruction-instruction_handler + db 'vpcomtrued',7 + dw xop_pcom_d_instruction-instruction_handler + db 'vpcomtrueq',7 + dw xop_pcom_q_instruction-instruction_handler + db 'vpcomtruew',7 + dw xop_pcom_w_instruction-instruction_handler + db 'vperm2f128',6 + dw avx_perm2f128_instruction-instruction_handler + db 'vperm2i128',46h + dw avx_perm2f128_instruction-instruction_handler + db 'vpermil2pd',49h + dw vpermil2_instruction-instruction_handler + db 'vpermil2ps',48h + dw vpermil2_instruction-instruction_handler + db 'vpgatherdd',90h + dw gather_instruction_ps-instruction_handler + db 'vpgatherdq',90h + dw gather_instruction_pd-instruction_handler + db 'vpgatherqd',91h + dw gather_instruction_ps-instruction_handler + db 'vpgatherqq',91h + dw gather_instruction_pd-instruction_handler + db 'vpmacssdqh',8Fh + dw xop_triple_source_128bit_instruction-instruction_handler + db 'vpmacssdql',87h + dw xop_triple_source_128bit_instruction-instruction_handler + db 'vpmadcsswd',0A6h + dw xop_triple_source_128bit_instruction-instruction_handler + db 'vpmaddubsw',4 + dw avx_instruction_38-instruction_handler + db 'vpmaskmovd',8Ch + dw avx_maskmov_instruction-instruction_handler + db 'vpmaskmovq',8Ch + dw avx_maskmov_w1_instruction-instruction_handler + db 'vpunpckhbw',68h + dw avx_pd_instruction-instruction_handler + db 'vpunpckhdq',6Ah + dw avx_pd_instruction-instruction_handler + db 'vpunpckhwd',69h + dw avx_pd_instruction-instruction_handler + db 'vpunpcklbw',60h + dw avx_pd_instruction-instruction_handler + db 'vpunpckldq',62h + dw avx_pd_instruction-instruction_handler + db 'vpunpcklwd',61h + dw avx_pd_instruction-instruction_handler + db 'vzeroupper',77h + dw vzeroupper_instruction-instruction_handler + db 'xsaveopt64',110b + dw fxsave_instruction_64bit-instruction_handler +instructions_11: + db 'pclmulhqhdq',10001b + dw pclmulqdq_instruction-instruction_handler + db 'pclmullqhdq',10000b + dw pclmulqdq_instruction-instruction_handler + db 'prefetchnta',0 + dw prefetch_instruction-instruction_handler + db 'vaesdeclast',0DFh + dw avx_128bit_instruction_38-instruction_handler + db 'vaesenclast',0DDh + dw avx_128bit_instruction_38-instruction_handler + db 'vcmpeq_ospd',10h + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpeq_osps',10h + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpeq_ossd',10h + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpeq_osss',10h + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpeq_uqpd',8 + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpeq_uqps',8 + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpeq_uqsd',8 + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpeq_uqss',8 + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpeq_uspd',18h + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpeq_usps',18h + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpeq_ussd',18h + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpeq_usss',18h + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpfalsepd',0Bh + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpfalseps',0Bh + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpfalsesd',0Bh + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpfalsess',0Bh + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpge_oqpd',1Dh + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpge_oqps',1Dh + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpge_oqsd',1Dh + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpge_oqss',1Dh + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpgt_oqpd',1Eh + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpgt_oqps',1Eh + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpgt_oqsd',1Eh + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpgt_oqss',1Eh + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmple_oqpd',12h + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmple_oqps',12h + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmple_oqsd',12h + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmple_oqss',12h + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmplt_oqpd',11h + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmplt_oqps',11h + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmplt_oqsd',11h + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmplt_oqss',11h + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpord_spd',17h + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpord_sps',17h + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpord_ssd',17h + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpord_sss',17h + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpunordpd',3 + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpunordps',3 + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpunordsd',3 + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpunordss',3 + dw avx_cmp_ss_instruction-instruction_handler + db 'vfmadd132pd',98h + dw fma_instruction_pd-instruction_handler + db 'vfmadd132ps',98h + dw fma_instruction_ps-instruction_handler + db 'vfmadd132sd',99h + dw fma_instruction_sd-instruction_handler + db 'vfmadd132ss',99h + dw fma_instruction_ss-instruction_handler + db 'vfmadd213pd',0A8h + dw fma_instruction_pd-instruction_handler + db 'vfmadd213ps',0A8h + dw fma_instruction_ps-instruction_handler + db 'vfmadd213sd',0A9h + dw fma_instruction_sd-instruction_handler + db 'vfmadd213ss',0A9h + dw fma_instruction_ss-instruction_handler + db 'vfmadd231pd',0B8h + dw fma_instruction_pd-instruction_handler + db 'vfmadd231ps',0B8h + dw fma_instruction_ps-instruction_handler + db 'vfmadd231sd',0B9h + dw fma_instruction_sd-instruction_handler + db 'vfmadd231ss',0B9h + dw fma_instruction_ss-instruction_handler + db 'vfmaddsubpd',5Dh + dw fma4_instruction_p-instruction_handler + db 'vfmaddsubps',5Ch + dw fma4_instruction_p-instruction_handler + db 'vfmsub132pd',9Ah + dw fma_instruction_pd-instruction_handler + db 'vfmsub132ps',9Ah + dw fma_instruction_ps-instruction_handler + db 'vfmsub132sd',9Bh + dw fma_instruction_sd-instruction_handler + db 'vfmsub132ss',9Bh + dw fma_instruction_ss-instruction_handler + db 'vfmsub213pd',0AAh + dw fma_instruction_pd-instruction_handler + db 'vfmsub213ps',0AAh + dw fma_instruction_ps-instruction_handler + db 'vfmsub213sd',0ABh + dw fma_instruction_sd-instruction_handler + db 'vfmsub213ss',0ABh + dw fma_instruction_ss-instruction_handler + db 'vfmsub231pd',0BAh + dw fma_instruction_pd-instruction_handler + db 'vfmsub231ps',0BAh + dw fma_instruction_ps-instruction_handler + db 'vfmsub231sd',0BBh + dw fma_instruction_sd-instruction_handler + db 'vfmsub231ss',0BBh + dw fma_instruction_ss-instruction_handler + db 'vfmsubaddpd',5Fh + dw fma4_instruction_p-instruction_handler + db 'vfmsubaddps',5Eh + dw fma4_instruction_p-instruction_handler + db 'vinsertf128',18h + dw avx_insertf128_instruction-instruction_handler + db 'vinserti128',38h + dw avx_insertf128_instruction-instruction_handler + db 'vmaskmovdqu',0 + dw avx_maskmovdqu_instruction-instruction_handler + db 'vpcomfalseb',6 + dw xop_pcom_b_instruction-instruction_handler + db 'vpcomfalsed',6 + dw xop_pcom_d_instruction-instruction_handler + db 'vpcomfalseq',6 + dw xop_pcom_q_instruction-instruction_handler + db 'vpcomfalsew',6 + dw xop_pcom_w_instruction-instruction_handler + db 'vpcomtrueub',7 + dw xop_pcom_ub_instruction-instruction_handler + db 'vpcomtrueud',7 + dw xop_pcom_ud_instruction-instruction_handler + db 'vpcomtrueuq',7 + dw xop_pcom_uq_instruction-instruction_handler + db 'vpcomtrueuw',7 + dw xop_pcom_uw_instruction-instruction_handler + db 'vphminposuw',41h + dw avx_single_source_instruction_38-instruction_handler + db 'vpunpckhqdq',6Dh + dw avx_pd_instruction-instruction_handler + db 'vpunpcklqdq',6Ch + dw avx_pd_instruction-instruction_handler +instructions_12: + db 'pclmulhqhqdq',10001b + dw pclmulqdq_instruction-instruction_handler + db 'pclmulhqlqdq',1 + dw pclmulqdq_instruction-instruction_handler + db 'pclmullqhqdq',10000b + dw pclmulqdq_instruction-instruction_handler + db 'pclmullqlqdq',0 + dw pclmulqdq_instruction-instruction_handler + db 'vbroadcastsd',19h + dw avx_broadcastsd_instruction-instruction_handler + db 'vbroadcastss',18h + dw avx_broadcastss_instruction-instruction_handler + db 'vcmpneq_oqpd',0Ch + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpneq_oqps',0Ch + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpneq_oqsd',0Ch + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpneq_oqss',0Ch + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpneq_ospd',1Ch + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpneq_osps',1Ch + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpneq_ossd',1Ch + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpneq_osss',1Ch + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpneq_uspd',14h + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpneq_usps',14h + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpneq_ussd',14h + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpneq_usss',14h + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpnge_uqpd',19h + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpnge_uqps',19h + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpnge_uqsd',19h + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpnge_uqss',19h + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpngt_uqpd',1Ah + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpngt_uqps',1Ah + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpngt_uqsd',1Ah + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpngt_uqss',1Ah + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpnle_uqpd',16h + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpnle_uqps',16h + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpnle_uqsd',16h + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpnle_uqss',16h + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpnlt_uqpd',15h + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpnlt_uqps',15h + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpnlt_uqsd',15h + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpnlt_uqss',15h + dw avx_cmp_ss_instruction-instruction_handler + db 'vextractf128',19h + dw avx_extractf128_instruction-instruction_handler + db 'vextracti128',39h + dw avx_extractf128_instruction-instruction_handler + db 'vfnmadd132pd',9Ch + dw fma_instruction_pd-instruction_handler + db 'vfnmadd132ps',9Ch + dw fma_instruction_ps-instruction_handler + db 'vfnmadd132sd',9Dh + dw fma_instruction_sd-instruction_handler + db 'vfnmadd132ss',9Dh + dw fma_instruction_ss-instruction_handler + db 'vfnmadd213pd',0ACh + dw fma_instruction_pd-instruction_handler + db 'vfnmadd213ps',0ACh + dw fma_instruction_ps-instruction_handler + db 'vfnmadd213sd',0ADh + dw fma_instruction_sd-instruction_handler + db 'vfnmadd213ss',0ADh + dw fma_instruction_ss-instruction_handler + db 'vfnmadd231pd',0BCh + dw fma_instruction_pd-instruction_handler + db 'vfnmadd231ps',0BCh + dw fma_instruction_ps-instruction_handler + db 'vfnmadd231sd',0BDh + dw fma_instruction_sd-instruction_handler + db 'vfnmadd231ss',0BDh + dw fma_instruction_ss-instruction_handler + db 'vfnmsub132pd',9Eh + dw fma_instruction_pd-instruction_handler + db 'vfnmsub132ps',9Eh + dw fma_instruction_ps-instruction_handler + db 'vfnmsub132sd',9Fh + dw fma_instruction_sd-instruction_handler + db 'vfnmsub132ss',9Fh + dw fma_instruction_ss-instruction_handler + db 'vfnmsub213pd',0AEh + dw fma_instruction_pd-instruction_handler + db 'vfnmsub213ps',0AEh + dw fma_instruction_ps-instruction_handler + db 'vfnmsub213sd',0AFh + dw fma_instruction_sd-instruction_handler + db 'vfnmsub213ss',0AFh + dw fma_instruction_ss-instruction_handler + db 'vfnmsub231pd',0BEh + dw fma_instruction_pd-instruction_handler + db 'vfnmsub231ps',0BEh + dw fma_instruction_ps-instruction_handler + db 'vfnmsub231sd',0BFh + dw fma_instruction_sd-instruction_handler + db 'vfnmsub231ss',0BFh + dw fma_instruction_ss-instruction_handler + db 'vpbroadcastb',78h + dw avx_pbroadcastb_instruction-instruction_handler + db 'vpbroadcastd',58h + dw avx_pbroadcastd_instruction-instruction_handler + db 'vpbroadcastq',59h + dw avx_pbroadcastq_instruction-instruction_handler + db 'vpbroadcastw',79h + dw avx_pbroadcastw_instruction-instruction_handler + db 'vpclmulhqhdq',10001b + dw avx_pclmulqdq_instruction-instruction_handler + db 'vpclmullqhdq',10000b + dw avx_pclmulqdq_instruction-instruction_handler + db 'vpcomfalseub',6 + dw xop_pcom_ub_instruction-instruction_handler + db 'vpcomfalseud',6 + dw xop_pcom_ud_instruction-instruction_handler + db 'vpcomfalseuq',6 + dw xop_pcom_uq_instruction-instruction_handler + db 'vpcomfalseuw',6 + dw xop_pcom_uw_instruction-instruction_handler + db 'vpermilmo2pd',10b + dw vpermil_2pd_instruction-instruction_handler + db 'vpermilmo2ps',10b + dw vpermil_2ps_instruction-instruction_handler + db 'vpermilmz2pd',11b + dw vpermil_2pd_instruction-instruction_handler + db 'vpermilmz2ps',11b + dw vpermil_2ps_instruction-instruction_handler + db 'vpermiltd2pd',0 + dw vpermil_2pd_instruction-instruction_handler + db 'vpermiltd2ps',0 + dw vpermil_2ps_instruction-instruction_handler +instructions_13: + db 'vcmptrue_uspd',1Fh + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmptrue_usps',1Fh + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmptrue_ussd',1Fh + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmptrue_usss',1Fh + dw avx_cmp_ss_instruction-instruction_handler + db 'vcmpunord_spd',13h + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpunord_sps',13h + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpunord_ssd',13h + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpunord_sss',13h + dw avx_cmp_ss_instruction-instruction_handler + db 'vpclmulhqlqdq',1 + dw avx_pclmulqdq_instruction-instruction_handler + db 'vpclmullqlqdq',0 + dw avx_pclmulqdq_instruction-instruction_handler +instructions_14: + db 'vbroadcastf128',1Ah + dw avx_broadcastf128_instruction-instruction_handler + db 'vbroadcasti128',5Ah + dw avx_broadcastf128_instruction-instruction_handler + db 'vcmpfalse_ospd',1Bh + dw avx_cmp_pd_instruction-instruction_handler + db 'vcmpfalse_osps',1Bh + dw avx_cmp_ps_instruction-instruction_handler + db 'vcmpfalse_ossd',1Bh + dw avx_cmp_sd_instruction-instruction_handler + db 'vcmpfalse_osss',1Bh + dw avx_cmp_ss_instruction-instruction_handler + db 'vfmaddsub132pd',96h + dw fma_instruction_pd-instruction_handler + db 'vfmaddsub132ps',96h + dw fma_instruction_ps-instruction_handler + db 'vfmaddsub213pd',0A6h + dw fma_instruction_pd-instruction_handler + db 'vfmaddsub213ps',0A6h + dw fma_instruction_ps-instruction_handler + db 'vfmaddsub231pd',0B6h + dw fma_instruction_pd-instruction_handler + db 'vfmaddsub231ps',0B6h + dw fma_instruction_ps-instruction_handler + db 'vfmsubadd132pd',97h + dw fma_instruction_pd-instruction_handler + db 'vfmsubadd132ps',97h + dw fma_instruction_ps-instruction_handler + db 'vfmsubadd213pd',0A7h + dw fma_instruction_pd-instruction_handler + db 'vfmsubadd213ps',0A7h + dw fma_instruction_ps-instruction_handler + db 'vfmsubadd231pd',0B7h + dw fma_instruction_pd-instruction_handler + db 'vfmsubadd231ps',0B7h + dw fma_instruction_ps-instruction_handler +instructions_15: + db 'aeskeygenassist',0DFh + dw sse4_instruction_3a_imm8-instruction_handler +instructions_16: + db 'vaeskeygenassist',0DFh + dw avx_single_source_128bit_instruction_3a_imm8-instruction_handler +instructions_end: + +data_directives: + dw data_directives_2-data_directives,(data_directives_3-data_directives_2)/(2+3) + dw data_directives_3-data_directives,(data_directives_4-data_directives_3)/(3+3) + dw data_directives_4-data_directives,(data_directives_end-data_directives_4)/(4+3) + +data_directives_2: + db 'db',1 + dw data_bytes-instruction_handler + db 'dd',4 + dw data_dwords-instruction_handler + db 'df',6 + dw data_pwords-instruction_handler + db 'dp',6 + dw data_pwords-instruction_handler + db 'dq',8 + dw data_qwords-instruction_handler + db 'dt',10 + dw data_twords-instruction_handler + db 'du',2 + dw data_unicode-instruction_handler + db 'dw',2 + dw data_words-instruction_handler + db 'rb',1 + dw reserve_bytes-instruction_handler + db 'rd',4 + dw reserve_dwords-instruction_handler + db 'rf',6 + dw reserve_pwords-instruction_handler + db 'rp',6 + dw reserve_pwords-instruction_handler + db 'rq',8 + dw reserve_qwords-instruction_handler + db 'rt',10 + dw reserve_twords-instruction_handler + db 'rw',2 + dw reserve_words-instruction_handler +data_directives_3: +data_directives_4: + db 'file',1 + dw data_file-instruction_handler +data_directives_end: diff --git a/programs/develop/fasm/trunk/variable.inc b/programs/develop/fasm/trunk/variable.inc index 70c802e3b..85ff146c3 100644 --- a/programs/develop/fasm/trunk/variable.inc +++ b/programs/develop/fasm/trunk/variable.inc @@ -1,6 +1,6 @@ ; flat assembler core variables -; Copyright (c) 1999-2012, Tomasz Grysztar. +; Copyright (c) 1999-2013, Tomasz Grysztar. ; All rights reserved. ; Variables which have to be set up by interface: @@ -50,10 +50,7 @@ labels_list dd ? label_hash dd ? label_leaf dd ? hash_tree dd ? -org_origin dq ? -org_registers dd ? -org_symbol dd ? -org_start dd ? +addressing_space dd ? undefined_data_start dd ? undefined_data_end dd ? counter dd ? @@ -61,7 +58,7 @@ counter_limit dd ? error_info dd ? error_line dd ? error dd ? -display_buffer dd ? +tagged_blocks dd ? structures_buffer dd ? number_start dd ? current_offset dd ? @@ -131,16 +128,15 @@ compare_type db ? logical_value_wrapping db ? next_pass_needed db ? output_format db ? -labels_type db ? code_type db ? -virtual_data db ? -org_origin_sign db ? adjustment_sign db ? macro_status db ? default_argument_value db ? prefixed_instruction db ? formatter_symbols_allowed db ? +free_address_range db ? + characters rb 100h converted rb 100h diff --git a/programs/develop/fasm/trunk/version.inc b/programs/develop/fasm/trunk/version.inc index 18fd49c9d..a5d278c76 100644 --- a/programs/develop/fasm/trunk/version.inc +++ b/programs/develop/fasm/trunk/version.inc @@ -1,6 +1,6 @@ -; flat assembler version 1.70 -; Copyright (c) 1999-2012, Tomasz Grysztar. +; flat assembler version 1.71 +; Copyright (c) 1999-2013, Tomasz Grysztar. ; All rights reserved. ; ; This programs is free for commercial and non-commercial use as long as @@ -33,7 +33,7 @@ ; cannot simply be copied and put under another distribution licence ; (including the GNU Public Licence). -VERSION_STRING equ "1.70.03" +VERSION_STRING equ "1.71.13" VERSION_MAJOR = 1 -VERSION_MINOR = 70 +VERSION_MINOR = 71 diff --git a/programs/develop/fasm/trunk/x86_64.inc b/programs/develop/fasm/trunk/x86_64.inc index bc7954eef..7e0ca9185 100644 --- a/programs/develop/fasm/trunk/x86_64.inc +++ b/programs/develop/fasm/trunk/x86_64.inc @@ -1,6 +1,6 @@ ; flat assembler core -; Copyright (c) 1999-2012, Tomasz Grysztar. +; Copyright (c) 1999-2013, Tomasz Grysztar. ; All rights reserved. simple_instruction_except64: @@ -2989,6 +2989,7 @@ jmp_instruction: jmp instruction_assembled calculate_jump_offset: add edi,2 + mov ebp,[addressing_space] call calculate_relative_offset sub edi,2 ret @@ -5982,6 +5983,27 @@ movbe_instruction: mov al,[operand_size] call operand_autodetect jmp instruction_ready +adx_instruction: + mov [base_code],0Fh + mov [extended_code],38h + mov [supplemental_code],0F6h + mov [operand_prefix],al + call get_reg_mem + jc adx_reg_reg + mov al,[operand_size] + cmp al,4 + je instruction_ready + cmp al,8 + jne invalid_operand_size + call operand_64bit + jmp instruction_ready + adx_reg_reg: + cmp ah,4 + je nomem_instruction_ready + cmp ah,8 + jne invalid_operand_size + call operand_64bit + jmp nomem_instruction_ready simple_vmx_instruction: mov ah,al @@ -6251,6 +6273,7 @@ xbegin_instruction: xbegin_16bit: call get_address_word_value add edi,4 + mov ebp,[addressing_space] call calculate_relative_offset sub edi,4 shl eax,16 @@ -6264,6 +6287,7 @@ xbegin_instruction: call get_address_qword_value xbegin_address_ok: add edi,5 + mov ebp,[addressing_space] call calculate_relative_offset sub edi,5 mov edx,eax @@ -6383,6 +6407,7 @@ get_jump_operator: get_address: mov [segment_register],0 mov [address_size],0 + mov [free_address_range],0 mov al,[code_type] shr al,3 mov [value_size],al @@ -6422,6 +6447,7 @@ get_address: mov edx,[address_symbol] mov [symbol_identifier],edx mov edx,[address_high] + mov ebp,[addressing_space] call calculate_relative_offset mov [address_high],edx cdq diff --git a/programs/proc32.inc b/programs/proc32.inc index aa3ffc970..762826cbb 100644 --- a/programs/proc32.inc +++ b/programs/proc32.inc @@ -55,11 +55,15 @@ macro proc [args] ; define procedure prologue@proc equ prologuedef macro prologuedef procname,flag,parmbytes,localbytes,reglist - { if parmbytes | localbytes + { local loc + loc = (localbytes+3) and (not 3) + parmbase@proc equ ebp+8 + localbase@proc equ ebp-loc + if parmbytes | localbytes push ebp mov ebp,esp if localbytes - sub esp,localbytes + sub esp,loc end if end if irps reg, reglist \{ push reg \} } @@ -77,6 +81,8 @@ macro epiloguedef procname,flag,parmbytes,localbytes,reglist retn parmbytes end if } +close@proc equ + macro define@proc name,statement { local params,flag,regs,parmbytes,localbytes,current if used name @@ -91,22 +97,22 @@ macro define@proc name,statement flag = 10001b \} match =params, params \{ params equ statement flag = 0 \} - virtual at ebp+8 match =uses reglist=,args, params \{ regs equ reglist params equ args \} match =regs =uses reglist, regs params \{ regs equ reglist params equ \} match =regs, regs \{ regs equ \} + match prologue:reglist, prologue@proc: \{ prologue name,flag,parmbytes,localbytes,reglist \} + virtual at parmbase@proc match =,args, params \{ defargs@proc args \} match =args@proc args, args@proc params \{ defargs@proc args \} - parmbytes = $ - (ebp+8) + parmbytes = $-(parmbase@proc) end virtual name # % = parmbytes/4 all@vars equ current = 0 - match prologue:reglist, prologue@proc: \{ prologue name,flag,parmbytes,localbytes,reglist \} macro locals - \{ virtual at ebp-localbytes+current + \{ virtual at localbase@proc+current macro label def \\{ match . type,def> \\\{ deflocal@proc .,label, - \\\{ epilogue name,flag,parmbytes,localbytes,reglist \\\} \\} \} - macro finish@proc \{ localbytes = (((current-1) shr 2)+1) shl 2 - end if \} } + match , operand \\{ match epilogue:reglist, epilogue@proc: \\\{ epilogue name,flag,parmbytes,localbytes,reglist \\\} \\} \} + macro finish@proc + \{ localbytes = current + match close:reglist, close@proc: \\{ close name,flag,parmbytes,localbytes,reglist \\} + end if \} } macro defargs@proc [arg] { common @@ -143,7 +150,9 @@ macro defargs@proc [arg] \{ current@arg equ argname label ..arg type argname equ ..arg - if dqword eq type + if qqword eq type + dd ?,?,?,?,?,?,?,? + else if dqword eq type dd ?,?,?,? else if tbyte eq type dd ?,?,? @@ -163,17 +172,19 @@ macro defargs@proc [arg] common end if } +macro deflocal@proc name,def,[val] { name def val } + macro deflocal@proc name,def,[val] { common match vars, all@vars \{ all@vars equ all@vars, \} all@vars equ all@vars name forward local ..var,..tmp - match =label,def \{ ..tmp equ \} - match tmp,..tmp \{ ..var def val \} - match ,..tmp \{ label ..var val \} + ..var def val match =?, val \{ ..tmp equ \} - match any =dup (=?), val \{ ..tmp equ \} + match any =?, val \{ ..tmp equ \} + match any (=?), val \{ ..tmp equ \} + match =label, def \{ ..tmp equ \} match tmp : value, ..tmp : val \{ tmp: end virtual initlocal@proc ..var,def value @@ -181,6 +192,8 @@ macro deflocal@proc name,def,[val] common match first rest, ..var, \{ name equ first \} } +struc label type { label . type } + macro initlocal@proc name,def { virtual at name def @@ -238,8 +251,17 @@ macro local [var] match =TBYTE, vartype \\{ varname rt count restore done@local \\} match =DQWORD, vartype \\{ label varname dqword - rq count+count + rq count*2 restore done@local \\} + match =QQWORD, vartype \\{ label varname qqword + rq count*4 + restore done@local \\} + match =XWORD, vartype \\{ label varname xword + rq count*2 + restore done@local \\} + match =YWORD, vartype \\{ label varname yword + rq count*4 + restore done@local \\} match , done@local \\{ virtual varname vartype end virtual @@ -261,6 +283,15 @@ macro local [var] match =DQWORD, vartype \\{ label varname dqword dq ?,? restore done@local \\} + match =QQWORD, vartype \\{ label varname qqword + dq ?,?,?,? + restore done@local \\} + match =XWORD, vartype \\{ label varname xword + dq ?,? + restore done@local \\} + match =YWORD, vartype \\{ label varname yword + dq ?,?,?,? + restore done@local \\} match , done@local \\{ varname vartype restore done@local \\} \} match ,done@local diff --git a/programs/struct.inc b/programs/struct.inc index 947a84e89..789dd1797 100644 --- a/programs/struct.inc +++ b/programs/struct.inc @@ -2,53 +2,79 @@ ; Macroinstructions for defining data structures macro struct name - { fields@struct equ name + { virtual at 0 + fields@struct equ name match child parent, name \{ fields@struct equ child,fields@\#parent \} sub@struct equ - struc db [val] \{ \common fields@struct equ fields@struct,.,db, \} - struc dw [val] \{ \common fields@struct equ fields@struct,.,dw, \} - struc du [val] \{ \common fields@struct equ fields@struct,.,du, \} - struc dd [val] \{ \common fields@struct equ fields@struct,.,dd, \} - struc dp [val] \{ \common fields@struct equ fields@struct,.,dp, \} - struc dq [val] \{ \common fields@struct equ fields@struct,.,dq, \} - struc dt [val] \{ \common fields@struct equ fields@struct,.,dt, \} - struc rb count \{ fields@struct equ fields@struct,.,db,count dup (?) \} - struc rw count \{ fields@struct equ fields@struct,.,dw,count dup (?) \} - struc rd count \{ fields@struct equ fields@struct,.,dd,count dup (?) \} - struc rp count \{ fields@struct equ fields@struct,.,dp,count dup (?) \} - struc rq count \{ fields@struct equ fields@struct,.,dq,count dup (?) \} - struc rt count \{ fields@struct equ fields@struct,.,dt,count dup (?) \} + struc db [val] \{ \common define field@struct .,db, + fields@struct equ fields@struct,field@struct \} + struc dw [val] \{ \common define field@struct .,dw, + fields@struct equ fields@struct,field@struct \} + struc du [val] \{ \common define field@struct .,du, + fields@struct equ fields@struct,field@struct \} + struc dd [val] \{ \common define field@struct .,dd, + fields@struct equ fields@struct,field@struct \} + struc dp [val] \{ \common define field@struct .,dp, + fields@struct equ fields@struct,field@struct \} + struc dq [val] \{ \common define field@struct .,dq, + fields@struct equ fields@struct,field@struct \} + struc dt [val] \{ \common define field@struct .,dt, + fields@struct equ fields@struct,field@struct \} + struc rb count \{ define field@struct .,db,count dup (?) + fields@struct equ fields@struct,field@struct \} + struc rw count \{ define field@struct .,dw,count dup (?) + fields@struct equ fields@struct,field@struct \} + struc rd count \{ define field@struct .,dd,count dup (?) + fields@struct equ fields@struct,field@struct \} + struc rp count \{ define field@struct .,dp,count dup (?) + fields@struct equ fields@struct,field@struct \} + struc rq count \{ define field@struct .,dq,count dup (?) + fields@struct equ fields@struct,field@struct \} + struc rt count \{ define field@struct .,dt,count dup (?) + fields@struct equ fields@struct,field@struct \} macro db [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,db, \} + define field@struct anonymous,db, + fields@struct equ fields@struct,field@struct \} macro dw [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,dw, \} + define field@struct anonymous,dw, + fields@struct equ fields@struct,field@struct \} macro du [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,du, \} + define field@struct anonymous,du, + fields@struct equ fields@struct,field@struct \} macro dd [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,dd, \} + define field@struct anonymous,dd, + fields@struct equ fields@struct,field@struct \} macro dp [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,dp, \} + define field@struct anonymous,dp, + fields@struct equ fields@struct,field@struct \} macro dq [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,dq, \} + define field@struct anonymous,dq, + fields@struct equ fields@struct,field@struct \} macro dt [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,dt, \} + define field@struct anonymous,dt, + fields@struct equ fields@struct,field@struct \} macro rb count \{ \local anonymous - fields@struct equ fields@struct,anonymous,db,count dup (?) \} + define field@struct anonymous,db,count dup (?) + fields@struct equ fields@struct,field@struct \} macro rw count \{ \local anonymous - fields@struct equ fields@struct,anonymous,dw,count dup (?) \} + define field@struct anonymous,dw,count dup (?) + fields@struct equ fields@struct,field@struct \} macro rd count \{ \local anonymous - fields@struct equ fields@struct,anonymous,dd,count dup (?) \} + define field@struct anonymous,dd,count dup (?) + fields@struct equ fields@struct,field@struct \} macro rp count \{ \local anonymous - fields@struct equ fields@struct,anonymous,dp,count dup (?) \} + define field@struct anonymous,dp,count dup (?) + fields@struct equ fields@struct,field@struct \} macro rq count \{ \local anonymous - fields@struct equ fields@struct,anonymous,dq,count dup (?) \} + define field@struct anonymous,dq,count dup (?) + fields@struct equ fields@struct,field@struct \} macro rt count \{ \local anonymous - fields@struct equ fields@struct,anonymous,dt,count dup (?) \} + define field@struct anonymous,dt,count dup (?) + fields@struct equ fields@struct,field@struct \} macro union \{ fields@struct equ fields@struct,,union,< sub@struct equ union \} macro struct \{ fields@struct equ fields@struct,,substruct,< - sub@struct equ substruct \} - virtual at 0 } + sub@struct equ substruct \} } macro ends { match , sub@struct \{ restruc db,dw,du,dd,dp,dq,dt @@ -56,19 +82,19 @@ macro ends purge db,dw,du,dd,dp,dq,dt purge rb,rw,rd,rp,rq,rt purge union,struct + match name tail,fields@struct, \\{ if $ + display 'Error: definition of ',\\`name,' contains illegal instructions.',0Dh,0Ah + err + end if \\} match name=,fields,fields@struct \\{ fields@struct equ make@struct name,fields - fields@\\#name equ fields \\} + define fields@\\#name fields \\} end virtual \} match any, sub@struct \{ fields@struct equ fields@struct> \} restore sub@struct } macro make@struct name,[field,type,def] { common - if $ - display 'Error: definition of ',`name,' contains illegal instructions.',0Dh,0Ah - err - end if local define define equ name forward @@ -81,6 +107,14 @@ macro make@struct name,[field,type,def] macro define@struct name,[field,type,def] { common + virtual + db `name + load initial@struct byte from 0 + if initial@struct = '.' + display 'Error: name of structure should not begin with a dot.',0Dh,0Ah + err + end if + end virtual local list list equ forward @@ -88,6 +122,7 @@ macro define@struct name,[field,type,def] name#field type def sizeof.#name#field = $ - name#field else + label name#.#type rb sizeof.#type end if local value @@ -97,14 +132,28 @@ macro define@struct name,[field,type,def] sizeof.#name = $ restruc name match values, list \{ - struc name value \\{ + struc name value \\{ \\local \\..base match any, fields@struct \\\{ fields@struct equ fields@struct,.,name, \\\} - match , fields@struct \\\{ label . + match , fields@struct \\\{ label \\..base forward match , value \\\\{ field type def \\\\} match any, value \\\\{ field type value + if ~ field eq . + rb sizeof.#name#field - ($-field) + end if \\\\} + common label . at \\..base \\\} + \\} + macro name value \\{ + match any, fields@struct \\\{ \\\local anonymous + fields@struct equ fields@struct,anonymous,name, \\\} + match , fields@struct \\\{ + forward + match , value \\\\{ type def \\\\} + match any, value \\\\{ \\\\local ..field + ..field = $ + type value if ~ field eq . - rb sizeof.#name#field - ($-field) + rb sizeof.#name#field - ($-..field) end if \\\\} common \\\} \\} \} } @@ -116,7 +165,7 @@ macro enable@substruct \forward \local sub match , field \\{ match any, type \\\{ enable@substruct - make@substruct type,name,sub def + make@substruct type,parent,sub def purge make@substruct define equ define,.,sub, \\\} \\} match any, field \\{ define equ define,.\#field,type, \\} @@ -127,21 +176,28 @@ enable@substruct macro define@union parent,name,[field,type,def] { common - virtual at 0 + virtual at parent#.#name forward if ~ field eq . - virtual at 0 + virtual at parent#.#name parent#field type def sizeof.#parent#field = $ - parent#field end virtual - if sizeof.#parent#field > $ - rb sizeof.#parent#field - $ + if sizeof.#parent#field > $ - parent#.#name + rb sizeof.#parent#field - ($ - parent#.#name) + end if + else + virtual at parent#.#name + label parent#.#type + type def + end virtual + label name#.#type at parent#.#name + if sizeof.#type > $ - parent#.#name + rb sizeof.#type - ($ - parent#.#name) end if - else if sizeof.#type > $ - rb sizeof.#type - $ end if common - sizeof.#name = $ + sizeof.#name = $ - parent#.#name end virtual struc name [value] \{ \common label .\#name @@ -153,21 +209,23 @@ macro define@union parent,name,[field,type,def] match , last@union \\{ match , value \\\{ field type def \\\} match any, value \\\{ field type value \\\} \\} last@union equ field - common rb sizeof.#name - ($ - .\#name) \} } + common rb sizeof.#name - ($ - .\#name) \} + macro name [value] \{ \common \local ..anonymous + ..anonymous name value \} } macro define@substruct parent,name,[field,type,def] { common - virtual at 0 + virtual at parent#.#name forward if ~ field eq . parent#field type def sizeof.#parent#field = $ - parent#field else + label parent#.#type rb sizeof.#type end if - local value common - sizeof.#name = $ + sizeof.#name = $ - parent#.#name end virtual struc name value \{ label .\#name @@ -177,4 +235,6 @@ macro define@substruct parent,name,[field,type,def] if ~ field eq . rb sizeof.#parent#field - ($-field) end if \\} - common \} } + common \} + macro name value \{ \local ..anonymous + ..anonymous name \} }