forked from KolibriOS/kolibrios
fasm: the program updated to 1.70.01
tested with the kernel and several applications sorry for previous ugly commit git-svn-id: svn://kolibrios.org@2665 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
96a29bfdda
commit
73798864bd
@ -2,46 +2,26 @@
|
||||
Visit http://flatassembler.net/ for more information.
|
||||
|
||||
|
||||
version 1.69.11 (Dec 19, 2009)
|
||||
version 1.70.01 (Apr 30, 2012)
|
||||
|
||||
[+] Allowed syntax of "pmovmskb" with 64-bit register destination in long mode.
|
||||
|
||||
[-] The code generated for "call eax" instruction was missing prefix in 16-bit
|
||||
mode - fixed.
|
||||
[-] Corrected a recently introduced bug that caused some incorrect
|
||||
address expressions to cause an error prematurely during the
|
||||
parsing stage.
|
||||
|
||||
|
||||
version 1.69.10 (Oct 28, 2009)
|
||||
version 1.70 (Apr 17, 2012)
|
||||
|
||||
[-] Fixed long mode opcode generator to allow absolute addresses to be
|
||||
generated with "qword" keyword inside square brackets.
|
||||
[+] Added support for AVX, AVX2, AES, CLMUL, FMA, RDRAND, FSGSBASE, F16C,
|
||||
FMA4, XOP, MOVBE, BMI, TBM, INVPCID, HLE and RTM instruction sets.
|
||||
|
||||
[+] Added half-precision floating point values support.
|
||||
|
||||
version 1.69.09 (Oct 20, 2009)
|
||||
[+] Extended the syntax of "rept" directive to allow numerical expressions
|
||||
to be calculated by preprocessor in its arguments.
|
||||
|
||||
[-] Fixed a crash during the symbolic information generation when a "static"
|
||||
symbol was encountered.
|
||||
[+] Added "large" and "NX" settings from PE format.
|
||||
|
||||
|
||||
version 1.69.08 (Oct 04, 2009)
|
||||
|
||||
[-] Minor bugfixes.
|
||||
|
||||
|
||||
version 1.69.07 (Oct 03, 2009)
|
||||
|
||||
[-] Corrected encoding of "extrq" intruction for some cases.
|
||||
|
||||
|
||||
version 1.69.06 (Sep 29, 2009)
|
||||
|
||||
[-] The prefix 67h for "jecxz" and "loopd" instructions in 64-bit mode wasn't
|
||||
correctly generated - fixed.
|
||||
|
||||
[-] It's no longer possible to define two special segments of the same type
|
||||
in ELF executables.
|
||||
|
||||
|
||||
version 1.69.05 (Sep 14, 2009)
|
||||
[+] Allowed PE fixups to be resolved anywhere in the generated executable.
|
||||
|
||||
[+] Allowed to specify branding value (use 3 for Linux) after the
|
||||
"format ELF executable" setting.
|
||||
@ -49,38 +29,42 @@ version 1.69.05 (Sep 14, 2009)
|
||||
[+] Added "intepreter", "dynamic" and "note" keywords for creation of
|
||||
special segments in ELF executables.
|
||||
|
||||
[-] Fixed long mode opcode generator to allow absolute addresses to be
|
||||
generated with "qword" keyword inside square brackets.
|
||||
|
||||
version 1.69.04 (Sep 7, 2009)
|
||||
[-] Disallowed negative immediates with "int", "enter", "ret" instructions.
|
||||
|
||||
[-] Fixed a bug with REX prefix generation with address of type "rX+rsp".
|
||||
[+] Allowed symbolic information dump file to be created even in case of error.
|
||||
In such case it contains only the preprocessed source that can be extracted
|
||||
with PREPSRC tool. If error occured during preprocessing, only the source up
|
||||
to the point of error is provided.
|
||||
|
||||
[+] Added symbol references table to symbolic dump file.
|
||||
|
||||
version 1.69.03 (Aug 03, 2009)
|
||||
[-] Corrected the "defined" and "used" flags in the symbols dump to reflect the
|
||||
state from the final assembly pass.
|
||||
|
||||
[+] Allowed simplified syntax for "monitor", "mwait", "blendvps", "blendvpd" and
|
||||
"pblendvb" instructions.
|
||||
[+] Added "assert" directive.
|
||||
|
||||
[-] Formatter symbols like "PE" or "readable" are now recognized only in the
|
||||
context of formatter directives, and thus are no longer disallowed as
|
||||
labels.
|
||||
|
||||
version 1.69.02 (Jul 04, 2009)
|
||||
[+] Macroinstruction argument now can have default value, defined with "="
|
||||
symbol followed by value after the argument name in definition.
|
||||
|
||||
[-] Minor bugfixes.
|
||||
[+] Added "relativeto" operator, which can be used in logical expressions
|
||||
to test whether two values differ only by a constant and not relocatable
|
||||
amount.
|
||||
|
||||
|
||||
version 1.69.01 (Jul 01, 2009)
|
||||
|
||||
[+] Added "movbe" instruction.
|
||||
|
||||
[-] "extractps" no longer generates the double 66h prefix.
|
||||
|
||||
|
||||
version 1.69.00 (Jun 23, 2009)
|
||||
|
||||
[+] Extended the syntax of "rept" directive to allow numerical expressions
|
||||
to be calculated by preprocessor in its arguments.
|
||||
|
||||
[-] The code of assembler (but not data) has been made position-independent, and
|
||||
this allowed to use code segmentation in DOS unREAL mode, so the code is
|
||||
no longer limited to 64 kilobytes.
|
||||
[-] Revised the expression calculator, it now is able to correctly perform
|
||||
calculations in signed and unsigned ranges in full 64-bit. This fixes
|
||||
a number of issues - the overflow will now be correctly detected for
|
||||
64-bit values in cases, where previous versions could not distinguish
|
||||
whether it was an overflow or not. The effect of these corrections is
|
||||
that "dq" directive will now behave consistently with behavior of the
|
||||
data directives for smaller sizes, and the same applies to all the
|
||||
places where "qword" size for value is used.
|
||||
|
||||
|
||||
version 1.68 (Jun 13, 2009)
|
||||
|
@ -35,6 +35,8 @@ 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
|
||||
@ -169,6 +171,8 @@ assemble_line:
|
||||
mov [prefixed_instruction],0
|
||||
cmp [symbols_file],0
|
||||
je continue_line
|
||||
cmp [next_pass_needed],0
|
||||
jne continue_line
|
||||
mov ebx,[display_buffer]
|
||||
mov dword [ebx-4],1
|
||||
mov dword [ebx-8],1Ch
|
||||
@ -185,6 +189,11 @@ assemble_line:
|
||||
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
|
||||
@ -199,24 +208,39 @@ assemble_line:
|
||||
je reserved_word_used_as_symbol
|
||||
mov ebx,eax
|
||||
lods byte [esi]
|
||||
mov cl,al
|
||||
mov [label_size],al
|
||||
call make_label
|
||||
jmp continue_line
|
||||
make_label:
|
||||
mov eax,edi
|
||||
xor edx,edx
|
||||
xor cl,cl
|
||||
sub eax,dword [org_origin]
|
||||
sbb edx,dword [org_origin+4]
|
||||
mov ch,[labels_type]
|
||||
sbb cl,[org_origin_sign]
|
||||
jp label_value_ok
|
||||
call recoverable_overflow
|
||||
label_value_ok:
|
||||
mov [address_sign],cl
|
||||
cmp [virtual_data],0
|
||||
jne make_virtual_label
|
||||
or byte [ebx+9],1
|
||||
xchg eax,[ebx]
|
||||
xchg edx,[ebx+4]
|
||||
mov ch,[ebx+9]
|
||||
shr ch,1
|
||||
and ch,1
|
||||
neg ch
|
||||
sub eax,[ebx]
|
||||
sbb edx,[ebx+4]
|
||||
sbb ch,cl
|
||||
mov dword [adjustment],eax
|
||||
mov dword [adjustment+4],edx
|
||||
mov [adjustment_sign],ch
|
||||
or al,ch
|
||||
or eax,edx
|
||||
setnz ah
|
||||
jmp finish_label_symbol
|
||||
jmp finish_label
|
||||
make_virtual_label:
|
||||
and byte [ebx+9],not 1
|
||||
cmp eax,[ebx]
|
||||
@ -226,7 +250,17 @@ assemble_line:
|
||||
mov [ebx+4],edx
|
||||
setne al
|
||||
or ah,al
|
||||
finish_label:
|
||||
mov ch,[labels_type]
|
||||
mov cl,[label_size]
|
||||
mov ebp,[org_registers]
|
||||
mov edx,[org_symbol]
|
||||
finish_label_symbol:
|
||||
mov al,[address_sign]
|
||||
xor al,[ebx+9]
|
||||
and al,10b
|
||||
or ah,al
|
||||
xor [ebx+9],al
|
||||
cmp cl,[ebx+10]
|
||||
mov [ebx+10],cl
|
||||
setne al
|
||||
@ -235,14 +269,12 @@ assemble_line:
|
||||
mov [ebx+11],ch
|
||||
setne al
|
||||
or ah,al
|
||||
mov edx,[org_registers]
|
||||
cmp edx,[ebx+12]
|
||||
mov [ebx+12],edx
|
||||
cmp ebp,[ebx+12]
|
||||
mov [ebx+12],ebp
|
||||
setne al
|
||||
or ah,al
|
||||
or ch,ch
|
||||
jz label_symbol_ok
|
||||
mov edx,[org_symbol]
|
||||
cmp edx,[ebx+20]
|
||||
mov [ebx+20],edx
|
||||
setne al
|
||||
@ -261,17 +293,18 @@ assemble_line:
|
||||
sub cx,[ebx+16]
|
||||
setnz al
|
||||
or ah,al
|
||||
jz continue_line
|
||||
jz label_made
|
||||
test byte [ebx+8],8
|
||||
jz continue_line
|
||||
jz label_made
|
||||
mov cx,[current_pass]
|
||||
cmp cx,[ebx+18]
|
||||
jne continue_line
|
||||
jne label_made
|
||||
or [next_pass_needed],-1
|
||||
jmp continue_line
|
||||
label_made:
|
||||
ret
|
||||
new_label:
|
||||
or byte [ebx+8],1
|
||||
jmp continue_line
|
||||
ret
|
||||
define_constant:
|
||||
lods dword [esi]
|
||||
inc esi
|
||||
@ -293,6 +326,7 @@ assemble_line:
|
||||
push eax
|
||||
mov al,byte [esi-1]
|
||||
push eax
|
||||
or [size_override],-1
|
||||
call get_value
|
||||
pop ebx
|
||||
mov ch,bl
|
||||
@ -314,6 +348,11 @@ assemble_line:
|
||||
mov [ebx+4],edx
|
||||
setne al
|
||||
or ah,al
|
||||
mov al,[value_sign]
|
||||
xor al,[ebx+9]
|
||||
and al,10b
|
||||
or ah,al
|
||||
xor [ebx+9],al
|
||||
cmp cl,[ebx+10]
|
||||
mov [ebx+10],cl
|
||||
setne al
|
||||
@ -370,12 +409,12 @@ assemble_line:
|
||||
; mov [size_override],0
|
||||
; mov [operand_prefix],0
|
||||
; mov [opcode_prefix],0
|
||||
mov dword [operand_size],0
|
||||
and dword [operand_size],0
|
||||
; mov [rex_prefix],0
|
||||
; mov [vex_required],0
|
||||
; mov [vex_register],0
|
||||
; mov [immediate_size],0
|
||||
mov dword [rex_prefix],0
|
||||
and dword [rex_prefix],0
|
||||
call instruction_handler
|
||||
instruction_handler:
|
||||
movzx ebx,word [esi]
|
||||
@ -408,13 +447,18 @@ org_directive:
|
||||
test cl,1
|
||||
jnz invalid_use_of_symbol
|
||||
mov [labels_type],cl
|
||||
mov ecx,edi
|
||||
sub ecx,eax
|
||||
adc edx,0
|
||||
neg edx
|
||||
mov dword [org_origin],ecx
|
||||
mov dword [org_origin+4],edx
|
||||
mov [org_registers],0
|
||||
mov dword [org_origin],edi
|
||||
xor ecx,ecx
|
||||
mov dword [org_origin+4],ecx
|
||||
mov [org_origin_sign],cl
|
||||
mov [org_registers],ecx
|
||||
mov cl,[value_sign]
|
||||
sub dword [org_origin],eax
|
||||
sbb dword [org_origin+4],edx
|
||||
sbb [org_origin_sign],cl
|
||||
jp org_value_ok
|
||||
call recoverable_overflow
|
||||
org_value_ok:
|
||||
mov [org_start],edi
|
||||
mov edx,[symbol_identifier]
|
||||
mov [org_symbol],edx
|
||||
@ -436,7 +480,7 @@ label_directive:
|
||||
je reserved_word_used_as_symbol
|
||||
inc esi
|
||||
mov ebx,eax
|
||||
xor cl,cl
|
||||
mov [label_size],0
|
||||
lods byte [esi]
|
||||
cmp al,':'
|
||||
je get_label_size
|
||||
@ -447,30 +491,12 @@ label_directive:
|
||||
lods word [esi]
|
||||
cmp al,11h
|
||||
jne invalid_argument
|
||||
mov cl,ah
|
||||
mov [label_size],ah
|
||||
label_size_ok:
|
||||
mov eax,edi
|
||||
xor edx,edx
|
||||
sub eax,dword [org_origin]
|
||||
sbb edx,dword [org_origin+4]
|
||||
mov ebp,[org_registers]
|
||||
cmp byte [esi],80h
|
||||
je get_free_label_value
|
||||
mov ch,[labels_type]
|
||||
push [org_symbol]
|
||||
pop [address_symbol]
|
||||
cmp [virtual_data],0
|
||||
jne make_free_label
|
||||
or byte [ebx+9],1
|
||||
xchg eax,[ebx]
|
||||
xchg edx,[ebx+4]
|
||||
sub eax,[ebx]
|
||||
sbb edx,[ebx+4]
|
||||
mov dword [adjustment],eax
|
||||
mov dword [adjustment+4],edx
|
||||
or eax,edx
|
||||
setne ah
|
||||
jmp finish_label
|
||||
call make_label
|
||||
jmp instruction_assembled
|
||||
get_free_label_value:
|
||||
inc esi
|
||||
lods byte [esi]
|
||||
@ -507,50 +533,9 @@ label_directive:
|
||||
mov [ebx+4],edx
|
||||
setne al
|
||||
or ah,al
|
||||
finish_label:
|
||||
cmp cl,[ebx+10]
|
||||
mov [ebx+10],cl
|
||||
setne al
|
||||
or ah,al
|
||||
cmp ch,[ebx+11]
|
||||
mov [ebx+11],ch
|
||||
setne al
|
||||
or ah,al
|
||||
cmp ebp,[ebx+12]
|
||||
mov [ebx+12],ebp
|
||||
setne al
|
||||
or ah,al
|
||||
or ch,ch
|
||||
jz free_label_symbol_ok
|
||||
mov edx,[address_symbol]
|
||||
cmp edx,[ebx+20]
|
||||
mov [ebx+20],edx
|
||||
setne al
|
||||
or ah,al
|
||||
free_label_symbol_ok:
|
||||
mov cx,[current_pass]
|
||||
xchg [ebx+16],cx
|
||||
mov edx,[current_line]
|
||||
mov [ebx+28],edx
|
||||
and byte [ebx+8],not 2
|
||||
test byte [ebx+8],1
|
||||
jz new_free_label
|
||||
cmp cx,[ebx+16]
|
||||
je symbol_already_defined
|
||||
inc cx
|
||||
sub cx,[ebx+16]
|
||||
setnz al
|
||||
or ah,al
|
||||
jz instruction_assembled
|
||||
test byte [ebx+8],8
|
||||
jz instruction_assembled
|
||||
mov cx,[current_pass]
|
||||
cmp cx,[ebx+18]
|
||||
jne instruction_assembled
|
||||
or [next_pass_needed],-1
|
||||
jmp instruction_assembled
|
||||
new_free_label:
|
||||
or byte [ebx+8],1
|
||||
mov cl,[label_size]
|
||||
call finish_label_symbol
|
||||
jmp instruction_assembled
|
||||
load_directive:
|
||||
lods byte [esi]
|
||||
@ -571,8 +556,8 @@ load_directive:
|
||||
cmp al,8
|
||||
ja invalid_value
|
||||
mov [operand_size],al
|
||||
mov dword [value],0
|
||||
mov dword [value+4],0
|
||||
and dword [value],0
|
||||
and dword [value+4],0
|
||||
lods word [esi]
|
||||
cmp ax,82h+'(' shl 8
|
||||
jne invalid_argument
|
||||
@ -603,13 +588,10 @@ load_directive:
|
||||
rep movs byte [edi],[esi]
|
||||
jmp value_loaded
|
||||
bad_load_address:
|
||||
cmp [error_line],0
|
||||
jne value_loaded
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],value_out_of_range
|
||||
call recoverable_overflow
|
||||
value_loaded:
|
||||
pop edi esi
|
||||
mov [value_sign],0
|
||||
mov eax,dword [value]
|
||||
mov edx,dword [value+4]
|
||||
pop ebx
|
||||
@ -627,6 +609,7 @@ store_directive:
|
||||
mov [operand_size],1
|
||||
jmp store_value_ok
|
||||
sized_store:
|
||||
or [size_override],-1
|
||||
call get_value
|
||||
store_value_ok:
|
||||
cmp [value_type],0
|
||||
@ -669,11 +652,7 @@ store_directive:
|
||||
jmp instruction_assembled
|
||||
bad_store_address:
|
||||
pop edi esi
|
||||
cmp [error_line],0
|
||||
jne instruction_assembled
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],value_out_of_range
|
||||
call recoverable_overflow
|
||||
jmp instruction_assembled
|
||||
|
||||
display_directive:
|
||||
@ -795,10 +774,8 @@ virtual_directive:
|
||||
je invalid_value
|
||||
call get_address_value
|
||||
mov ebp,[address_symbol]
|
||||
xor ch,ch
|
||||
or bh,bh
|
||||
jz set_virtual
|
||||
mov ch,1
|
||||
setnz ch
|
||||
jmp set_virtual
|
||||
virtual_at_current:
|
||||
dec esi
|
||||
@ -807,8 +784,11 @@ virtual_directive:
|
||||
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]
|
||||
mov [address_sign],cl
|
||||
mov bx,word [org_registers]
|
||||
mov cx,word [org_registers+2]
|
||||
xchg bh,bl
|
||||
@ -821,19 +801,27 @@ virtual_directive:
|
||||
mov byte [org_registers+3],cl
|
||||
call allocate_structure_data
|
||||
mov word [ebx],virtual_directive-instruction_handler
|
||||
mov cl,[address_sign]
|
||||
not eax
|
||||
not edx
|
||||
not cl
|
||||
add eax,1
|
||||
adc edx,0
|
||||
adc cl,0
|
||||
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
|
||||
@ -876,7 +864,14 @@ virtual_directive:
|
||||
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]
|
||||
@ -1339,7 +1334,7 @@ data_words:
|
||||
cmp al,'?'
|
||||
jne invalid_argument
|
||||
mov eax,edi
|
||||
mov word [edi],0
|
||||
and word [edi],0
|
||||
scas word [edi]
|
||||
jmp undefined_data
|
||||
ret
|
||||
@ -1377,7 +1372,7 @@ data_dwords:
|
||||
cmp al,'?'
|
||||
jne invalid_argument
|
||||
mov eax,edi
|
||||
mov dword [edi],0
|
||||
and dword [edi],0
|
||||
scas dword [edi]
|
||||
jmp undefined_data
|
||||
get_dword:
|
||||
@ -1420,9 +1415,9 @@ data_pwords:
|
||||
cmp al,'?'
|
||||
jne invalid_argument
|
||||
mov eax,edi
|
||||
mov dword [edi],0
|
||||
and dword [edi],0
|
||||
scas dword [edi]
|
||||
mov word [edi],0
|
||||
and word [edi],0
|
||||
scas word [edi]
|
||||
jmp undefined_data
|
||||
get_pword:
|
||||
@ -1467,9 +1462,9 @@ data_qwords:
|
||||
cmp al,'?'
|
||||
jne invalid_argument
|
||||
mov eax,edi
|
||||
mov dword [edi],0
|
||||
and dword [edi],0
|
||||
scas dword [edi]
|
||||
mov dword [edi],0
|
||||
and dword [edi],0
|
||||
scas dword [edi]
|
||||
jmp undefined_data
|
||||
get_qword:
|
||||
@ -1487,11 +1482,11 @@ data_twords:
|
||||
cmp al,'?'
|
||||
jne invalid_argument
|
||||
mov eax,edi
|
||||
mov dword [edi],0
|
||||
and dword [edi],0
|
||||
scas dword [edi]
|
||||
mov dword [edi],0
|
||||
and dword [edi],0
|
||||
scas dword [edi]
|
||||
mov word [edi],0
|
||||
and word [edi],0
|
||||
scas word [edi]
|
||||
jmp undefined_data
|
||||
get_tword:
|
||||
@ -1647,7 +1642,7 @@ data_file:
|
||||
mov esi,[eax]
|
||||
test byte [eax+7],80h
|
||||
jz get_current_path
|
||||
mov eax,[eax+12]
|
||||
mov eax,[eax+8]
|
||||
jmp find_current_source_path
|
||||
get_current_path:
|
||||
lodsb
|
||||
@ -1665,15 +1660,31 @@ data_file:
|
||||
jmp cut_current_path
|
||||
current_path_ok:
|
||||
mov esi,[esp+4]
|
||||
call preprocess_path
|
||||
call expand_path
|
||||
pop edx
|
||||
mov esi,edx
|
||||
call open
|
||||
jnc file_opened
|
||||
mov edx,[include_paths]
|
||||
search_in_include_paths:
|
||||
push edx esi
|
||||
mov edi,esi
|
||||
mov esi,[esp+4]
|
||||
call get_include_directory
|
||||
mov [esp+4],esi
|
||||
mov esi,[esp+8]
|
||||
call expand_path
|
||||
pop edx
|
||||
mov esi,edx
|
||||
call open
|
||||
pop edx
|
||||
jnc file_opened
|
||||
cmp byte [edx],0
|
||||
jne search_in_include_paths
|
||||
mov edi,esi
|
||||
mov esi,[esp]
|
||||
push edi
|
||||
call preprocess_path
|
||||
call expand_path
|
||||
pop edx
|
||||
mov esi,edx
|
||||
call open
|
||||
|
@ -68,6 +68,10 @@ 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
|
||||
@ -207,8 +211,11 @@ avx_instruction:
|
||||
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:
|
||||
@ -229,23 +236,24 @@ avx_instruction:
|
||||
imm4_ok:
|
||||
ret
|
||||
|
||||
avx_128bit_instruction:
|
||||
mov [mmx_size],16
|
||||
mov [opcode_prefix],66h
|
||||
jmp avx_instruction
|
||||
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_single_source_instruction_38:
|
||||
or [vex_required],2
|
||||
mov [mmx_size],0
|
||||
jmp avx_instruction_38_setup
|
||||
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
|
||||
@ -262,11 +270,6 @@ avx_triple_source_instruction_3a:
|
||||
mov [immediate_size],-1
|
||||
mov byte [value],0
|
||||
jmp avx_instruction_3a_setup
|
||||
avx_triple_source_128bit_instruction_3a:
|
||||
mov [mmx_size],16
|
||||
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:
|
||||
@ -283,9 +286,21 @@ avx_pclmulqdq_instruction:
|
||||
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:
|
||||
call setup_66_0f_3a
|
||||
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
|
||||
@ -293,12 +308,6 @@ avx_perm2f128_instruction:
|
||||
jne invalid_operand_size
|
||||
mov [postbyte_register],al
|
||||
jmp avx_vex_reg
|
||||
setup_66_0f_3a:
|
||||
mov [opcode_prefix],66h
|
||||
mov [base_code],0Fh
|
||||
mov [extended_code],3Ah
|
||||
mov [supplemental_code],al
|
||||
ret
|
||||
|
||||
avx_movdqu_instruction:
|
||||
mov [opcode_prefix],0F3h
|
||||
@ -340,7 +349,7 @@ avx_movntps_instruction:
|
||||
avx_lddqu_instruction:
|
||||
mov [opcode_prefix],0F2h
|
||||
mov [mmx_size],0
|
||||
xor cl,cl
|
||||
xor cx,cx
|
||||
avx_load_instruction:
|
||||
mov [base_code],0Fh
|
||||
mov [extended_code],al
|
||||
@ -362,6 +371,8 @@ avx_lddqu_instruction:
|
||||
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
|
||||
@ -376,25 +387,50 @@ avx_lddqu_instruction:
|
||||
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],16
|
||||
mov al,2Ah
|
||||
mov cl,16
|
||||
mov [mmx_size],0
|
||||
xor cx,cx
|
||||
jmp avx_load_instruction_38
|
||||
avx_broadcastss_instruction:
|
||||
mov [mmx_size],4
|
||||
mov al,18h
|
||||
xor cl,cl
|
||||
mov ch,16
|
||||
jmp avx_load_instruction_38
|
||||
avx_broadcastsd_instruction:
|
||||
mov [mmx_size],8
|
||||
mov al,19h
|
||||
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 al,1Ah
|
||||
mov cl,32
|
||||
xor ch,ch
|
||||
avx_load_instruction_38:
|
||||
mov [opcode_prefix],66h
|
||||
mov [supplemental_code],al
|
||||
@ -467,11 +503,10 @@ avx_movhlps_instruction:
|
||||
call take_avx_register
|
||||
mov bl,al
|
||||
jmp nomem_instruction_ready
|
||||
avx_maskmov_w1_instruction:
|
||||
or [rex_prefix],8
|
||||
avx_maskmov_instruction:
|
||||
mov [opcode_prefix],66h
|
||||
mov [base_code],0Fh
|
||||
mov [extended_code],38h
|
||||
mov [supplemental_code],al
|
||||
call setup_66_0f_38
|
||||
mov [mmx_size],0
|
||||
or [vex_required],1
|
||||
lods byte [esi]
|
||||
@ -508,6 +543,12 @@ avx_maskmov_instruction:
|
||||
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
|
||||
@ -638,13 +679,14 @@ avx_cvtps2pd_instruction:
|
||||
jne invalid_operand
|
||||
mov [mmx_size],cl
|
||||
call get_address
|
||||
mov al,[operand_size]
|
||||
mov al,[mmx_size]
|
||||
mov ah,al
|
||||
xchg al,[operand_size]
|
||||
or al,al
|
||||
jz instruction_ready
|
||||
shl al,1
|
||||
cmp al,[mmx_size]
|
||||
cmp al,ah
|
||||
jne invalid_operand_size
|
||||
mov [operand_size],al
|
||||
jmp instruction_ready
|
||||
avx_cvtpd2dq_instruction:
|
||||
mov [opcode_prefix],0F2h
|
||||
@ -753,6 +795,12 @@ avx_extractf128_instruction:
|
||||
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
|
||||
@ -840,10 +888,46 @@ avx_maskmovdqu_instruction:
|
||||
jmp maskmovdqu_instruction
|
||||
avx_pmovmskb_instruction:
|
||||
or [vex_required],1
|
||||
jmp pmovmskb_instruction
|
||||
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
|
||||
jmp pshufd_instruction
|
||||
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
|
||||
@ -863,7 +947,40 @@ avx_pmovsxdq_instruction:
|
||||
mov [mmx_size],8
|
||||
avx_pmovsx_instruction:
|
||||
or [vex_required],1
|
||||
jmp pmovsx_instruction
|
||||
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
|
||||
@ -915,30 +1032,12 @@ avx_permil_instruction:
|
||||
avx_permil_reg_mem:
|
||||
call get_address
|
||||
jmp mmx_imm8
|
||||
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
|
||||
cmp ah,16
|
||||
jne invalid_operand
|
||||
mov [vex_register],al
|
||||
lods byte [esi]
|
||||
cmp al,','
|
||||
jne invalid_operand
|
||||
call take_avx_register
|
||||
mov bl,al
|
||||
jmp mmx_nomem_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
|
||||
cmp ah,16
|
||||
jne invalid_operand
|
||||
mov [postbyte_register],al
|
||||
lods byte [esi]
|
||||
cmp al,','
|
||||
@ -953,12 +1052,12 @@ avx_bit_shift_instruction:
|
||||
xchg cl,[operand_size]
|
||||
lods byte [esi]
|
||||
call get_size_operator
|
||||
xchg cl,[operand_size]
|
||||
pop esi
|
||||
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
|
||||
@ -972,14 +1071,38 @@ avx_bit_shift_instruction:
|
||||
xchg bl,[vex_register]
|
||||
jmp mmx_nomem_imm8
|
||||
avx_bit_shift_regs_reg:
|
||||
call take_avx_register
|
||||
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
|
||||
@ -1026,6 +1149,166 @@ vcvtps2ph_instruction:
|
||||
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:
|
||||
@ -1219,6 +1502,157 @@ vpermil2_instruction:
|
||||
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
|
||||
@ -1276,7 +1710,7 @@ store_vex_instruction_code:
|
||||
cmp ah,0F2h
|
||||
je vex_f2
|
||||
test ah,ah
|
||||
jnz prefix_conflict
|
||||
jnz disallowed_combination_of_registers
|
||||
ret
|
||||
vex_f2:
|
||||
or al,11b
|
||||
|
@ -72,8 +72,8 @@ invalid_address_size:
|
||||
address_sizes_do_not_agree:
|
||||
push _address_sizes_do_not_agree
|
||||
jmp error_with_source
|
||||
prefix_conflict:
|
||||
push _prefix_conflict
|
||||
disallowed_combination_of_registers:
|
||||
push _disallowed_combination_of_registers
|
||||
jmp error_with_source
|
||||
long_immediate_not_encodable:
|
||||
push _long_immediate_not_encodable
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -134,11 +134,39 @@ convert_number:
|
||||
symbol_value:
|
||||
cmp [source_start],0
|
||||
je preprocessor_value
|
||||
push edi
|
||||
mov edi,address_registers
|
||||
call get_operator
|
||||
or al,al
|
||||
jnz register_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
|
||||
@ -158,7 +186,7 @@ convert_number:
|
||||
mov eax,0Fh
|
||||
jmp store_label_value
|
||||
register_value:
|
||||
pop edi
|
||||
pop edx edi
|
||||
mov byte [edi-1],10h
|
||||
stos byte [edi]
|
||||
ret
|
||||
|
@ -35,14 +35,15 @@ formatter:
|
||||
jae out_of_memory
|
||||
cmp [file_extension],0
|
||||
jne extension_specified
|
||||
cmp [output_format],2
|
||||
mov al,[output_format]
|
||||
cmp al,2
|
||||
je exe_extension
|
||||
jb bin_extension
|
||||
cmp [output_format],4
|
||||
cmp al,4
|
||||
je obj_extension
|
||||
cmp [output_format],5
|
||||
cmp al,5
|
||||
je o_extension
|
||||
cmp [output_format],3
|
||||
cmp al,3
|
||||
jne no_extension
|
||||
cmp [subsystem],1
|
||||
je sys_extension
|
||||
@ -164,7 +165,7 @@ formatter:
|
||||
mov [current_offset],edi
|
||||
sub edi,[code_start]
|
||||
mov [code_size],edi
|
||||
mov [written_size],0
|
||||
and [written_size],0
|
||||
mov edx,[output_file]
|
||||
call create
|
||||
jc write_failed
|
||||
@ -324,10 +325,18 @@ public_directive:
|
||||
cmp eax,0Fh
|
||||
jb invalid_use_of_symbol
|
||||
je reserved_word_used_as_symbol
|
||||
inc esi
|
||||
mov dx,[current_pass]
|
||||
mov [eax+18],dx
|
||||
or byte [eax+8],8
|
||||
inc esi
|
||||
cmp [symbols_file],0
|
||||
je public_reference_ok
|
||||
cmp [next_pass_needed],0
|
||||
jne public_reference_ok
|
||||
mov ebx,eax
|
||||
call store_label_reference
|
||||
mov eax,ebx
|
||||
public_reference_ok:
|
||||
mov ebx,[free_additional_memory]
|
||||
lea edx,[ebx+10h]
|
||||
cmp edx,[structures_buffer]
|
||||
@ -395,6 +404,7 @@ extrn_directive:
|
||||
jne invalid_argument
|
||||
extrn_size_ok:
|
||||
mov [address_symbol],edx
|
||||
mov [label_size],ah
|
||||
movzx ecx,ah
|
||||
mov [edx+8],ecx
|
||||
xor eax,eax
|
||||
@ -485,6 +495,7 @@ mz_segment:
|
||||
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
|
||||
@ -503,7 +514,8 @@ mz_segment:
|
||||
segment_type_ok:
|
||||
mov [code_type],al
|
||||
mov eax,edx
|
||||
mov cx,0100h
|
||||
mov ch,1
|
||||
mov [label_size],0
|
||||
xor edx,edx
|
||||
xor ebp,ebp
|
||||
mov [address_symbol],edx
|
||||
@ -515,11 +527,7 @@ mz_entry:
|
||||
call get_word_value
|
||||
cmp [value_type],1
|
||||
je initial_cs_ok
|
||||
cmp [error_line],0
|
||||
jne initial_cs_ok
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],invalid_address
|
||||
call recoverable_invalid_address
|
||||
initial_cs_ok:
|
||||
mov edx,[additional_memory]
|
||||
mov [edx+16h],ax
|
||||
@ -536,6 +544,14 @@ mz_entry:
|
||||
mov edx,[additional_memory]
|
||||
mov [edx+14h],ax
|
||||
jmp instruction_assembled
|
||||
recoverable_invalid_address:
|
||||
cmp [error_line],0
|
||||
jne ignore_invalid_address
|
||||
push [current_line]
|
||||
pop [error_line]
|
||||
mov [error],invalid_address
|
||||
ignore_invalid_address:
|
||||
ret
|
||||
mz_stack:
|
||||
lods byte [esi]
|
||||
cmp al,'('
|
||||
@ -553,11 +569,7 @@ mz_stack:
|
||||
stack_pointer:
|
||||
cmp [value_type],1
|
||||
je initial_ss_ok
|
||||
cmp [error_line],0
|
||||
jne initial_ss_ok
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],invalid_address
|
||||
call recoverable_invalid_address
|
||||
initial_ss_ok:
|
||||
mov edx,[additional_memory]
|
||||
mov [edx+0Eh],ax
|
||||
@ -834,7 +846,7 @@ format_pe:
|
||||
mov [subsystem],3
|
||||
mov [subsystem_version],3 + 10 shl 16
|
||||
mov [image_base],400000h
|
||||
mov [image_base_high],0
|
||||
and [image_base_high],0
|
||||
test [format_flags],8
|
||||
jz pe_settings
|
||||
mov [machine],8664h
|
||||
@ -1061,7 +1073,7 @@ format_pe:
|
||||
jc pe_entry_init_ok
|
||||
mov [edx+28h],eax ; entry point rva
|
||||
pe_entry_init_ok:
|
||||
mov [number_of_sections],0
|
||||
and [number_of_sections],0
|
||||
movzx ebx,word [edx+14h]
|
||||
lea ebx,[edx+18h+ebx]
|
||||
mov [current_section],ebx
|
||||
@ -1071,38 +1083,45 @@ format_pe:
|
||||
mov [ebx+0Ch],eax
|
||||
mov dword [ebx+24h],0E0000060h
|
||||
xor ecx,ecx
|
||||
xor bl,bl
|
||||
not eax
|
||||
not ecx
|
||||
not bl
|
||||
add eax,1
|
||||
adc ecx,0
|
||||
adc bl,0
|
||||
add eax,edi
|
||||
adc ecx,0
|
||||
adc bl,0
|
||||
test [format_flags],4
|
||||
jnz peplus_org
|
||||
sub eax,[edx+34h]
|
||||
sbb ecx,0
|
||||
sbb bl,0
|
||||
jmp pe_org_ok
|
||||
peplus_org:
|
||||
sub eax,[edx+30h]
|
||||
sbb ecx,[edx+34h]
|
||||
sbb bl,0
|
||||
pe_org_ok:
|
||||
test [format_flags],8
|
||||
jnz pe64_code
|
||||
mov bl,2
|
||||
mov bh,2
|
||||
mov [code_type],32
|
||||
jmp pe_code_type_ok
|
||||
pe64_code:
|
||||
mov bl,4
|
||||
mov bh,4
|
||||
mov [code_type],64
|
||||
pe_code_type_ok:
|
||||
bt [resolver_flags],0
|
||||
jc pe_labels_type_ok
|
||||
xor bl,bl
|
||||
xor bh,bh
|
||||
pe_labels_type_ok:
|
||||
mov [labels_type],bl
|
||||
mov [labels_type],bh
|
||||
mov dword [org_origin],eax
|
||||
mov dword [org_origin+4],ecx
|
||||
mov [org_registers],0
|
||||
mov [org_origin_sign],bl
|
||||
and [org_registers],0
|
||||
mov [org_start],edi
|
||||
bt [format_flags],8
|
||||
jnc dll_flag_ok
|
||||
@ -1155,13 +1174,15 @@ pe_section:
|
||||
mov esi,edx
|
||||
rep movs byte [edi],[esi]
|
||||
pop edi esi
|
||||
mov dword [ebx+24h],0
|
||||
and dword [ebx+24h],0
|
||||
mov [ebx+14h],edi
|
||||
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
|
||||
mov [code_type],32
|
||||
test [format_flags],8
|
||||
@ -1173,6 +1194,7 @@ pe_section:
|
||||
jnz peplus_section_org
|
||||
sub eax,[edx+34h]
|
||||
sbb ecx,0
|
||||
sbb [org_origin_sign],0
|
||||
bt [resolver_flags],0
|
||||
jc pe_section_org_ok
|
||||
mov [labels_type],0
|
||||
@ -1180,13 +1202,14 @@ pe_section:
|
||||
peplus_section_org:
|
||||
sub eax,[edx+30h]
|
||||
sbb ecx,[edx+34h]
|
||||
sbb [org_origin_sign],0
|
||||
bt [resolver_flags],0
|
||||
jc pe_section_org_ok
|
||||
mov [labels_type],0
|
||||
pe_section_org_ok:
|
||||
mov dword [org_origin],eax
|
||||
mov dword [org_origin+4],ecx
|
||||
mov [org_registers],0
|
||||
and [org_registers],0
|
||||
mov [org_start],edi
|
||||
get_section_flags:
|
||||
lods byte [esi]
|
||||
@ -1246,7 +1269,7 @@ pe_section:
|
||||
jb align_section
|
||||
mov edi,[undefined_data_start]
|
||||
align_section:
|
||||
mov [undefined_data_end],0
|
||||
and [undefined_data_end],0
|
||||
mov ebp,edi
|
||||
sub ebp,[ebx+14h]
|
||||
mov ecx,[edx+3Ch]
|
||||
@ -1373,11 +1396,7 @@ pe_entry:
|
||||
check_pe_entry_label_type:
|
||||
cmp [value_type],bl
|
||||
je pe_entry_ok
|
||||
cmp [error_line],0
|
||||
jne pe_entry_ok
|
||||
mov edx,[current_line]
|
||||
mov [error_line],edx
|
||||
mov [error],invalid_address
|
||||
call recoverable_invalid_address
|
||||
pe_entry_ok:
|
||||
cdq
|
||||
test [format_flags],4
|
||||
@ -1395,19 +1414,13 @@ pe_entry:
|
||||
check_pe64_entry_label_type:
|
||||
cmp [value_type],bl
|
||||
je pe64_entry_type_ok
|
||||
cmp [error_line],0
|
||||
jne pe64_entry_type_ok
|
||||
mov edx,[current_line]
|
||||
mov [error_line],edx
|
||||
mov [error],invalid_address
|
||||
call recoverable_invalid_address
|
||||
pe64_entry_type_ok:
|
||||
mov ecx,[code_start]
|
||||
sub eax,[ecx+30h]
|
||||
sbb edx,[ecx+34h]
|
||||
jz pe64_entry_range_ok
|
||||
mov edx,[current_line]
|
||||
mov [error_line],edx
|
||||
mov [error],value_out_of_range
|
||||
call recoverable_overflow
|
||||
pe64_entry_range_ok:
|
||||
mov [ecx+28h],eax
|
||||
jmp instruction_assembled
|
||||
@ -1540,11 +1553,7 @@ mark_pe_relocation:
|
||||
check_standard_pe_relocation_type:
|
||||
cmp [value_type],2
|
||||
je pe_relocation_type_ok
|
||||
cmp [error_line],0
|
||||
jne pe_relocation_type_ok
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],invalid_use_of_symbol
|
||||
call recoverable_misuse
|
||||
pe_relocation_type_ok:
|
||||
mov ebx,[current_section]
|
||||
mov eax,edi
|
||||
@ -1580,7 +1589,7 @@ make_pe_fixups:
|
||||
jc fixups_ready
|
||||
or [next_pass_needed],-1
|
||||
fixups_ready:
|
||||
mov [last_fixup_base],0
|
||||
and [last_fixup_base],0
|
||||
call make_fixups
|
||||
xchg eax,[actual_fixups_size]
|
||||
sub eax,[actual_fixups_size]
|
||||
@ -1652,7 +1661,7 @@ make_pe_resource:
|
||||
je resource_from_file
|
||||
cmp [current_pass],0
|
||||
jne reserve_space_for_resource
|
||||
mov [resource_size],0
|
||||
and [resource_size],0
|
||||
reserve_space_for_resource:
|
||||
add edi,[resource_size]
|
||||
cmp edi,[display_buffer]
|
||||
@ -2310,18 +2319,28 @@ format_coff:
|
||||
mov [current_section],ebx
|
||||
xor eax,eax
|
||||
mov [number_of_sections],eax
|
||||
mov dword [org_origin],edi
|
||||
mov dword [org_origin+4],eax
|
||||
mov [org_registers],eax
|
||||
mov [org_start],edi
|
||||
mov [org_symbol],ebx
|
||||
mov [labels_type],2
|
||||
call setup_coff_section_org
|
||||
mov [code_type],32
|
||||
test [format_flags],8
|
||||
jz format_defined
|
||||
mov [labels_type],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]
|
||||
@ -2334,18 +2353,9 @@ coff_section:
|
||||
xor eax,eax
|
||||
mov [ebx],al
|
||||
mov [ebx+8],edi
|
||||
mov dword [org_origin],edi
|
||||
mov dword [org_origin+4],eax
|
||||
mov [org_registers],eax
|
||||
mov [org_start],edi
|
||||
mov [org_symbol],ebx
|
||||
mov [labels_type],2
|
||||
test [format_flags],8
|
||||
jz coff_labels_type_ok
|
||||
mov [labels_type],4
|
||||
coff_labels_type_ok:
|
||||
mov [ebx+10h],eax
|
||||
mov [ebx+14h],eax
|
||||
call setup_coff_section_org
|
||||
lods word [esi]
|
||||
cmp ax,'('
|
||||
jne invalid_argument
|
||||
@ -2552,8 +2562,8 @@ coff_formatter:
|
||||
mov edx,[esi+8]
|
||||
add esi,10h
|
||||
inc eax
|
||||
cmp byte [edx+11],2
|
||||
jne enumerate_symbols
|
||||
cmp byte [edx+11],0
|
||||
je enumerate_symbols
|
||||
mov edx,[edx+20]
|
||||
cmp byte [edx],0C0h
|
||||
jae enumerate_symbols
|
||||
@ -2803,13 +2813,14 @@ coff_formatter:
|
||||
mov cx,[ecx+1Eh]
|
||||
mov [ebx+0Ch],cx
|
||||
public_symbol_section_ok:
|
||||
cmp dword [eax+4],0
|
||||
je store_public_symbol
|
||||
cmp dword [eax+4],-1
|
||||
movzx ecx,byte [eax+9]
|
||||
shr cl,1
|
||||
and cl,1
|
||||
neg ecx
|
||||
cmp ecx,[eax+4]
|
||||
jne value_out_of_range
|
||||
bt dword [eax],31
|
||||
jnc value_out_of_range
|
||||
store_public_symbol:
|
||||
xor ecx,[eax]
|
||||
js value_out_of_range
|
||||
mov eax,[eax]
|
||||
mov [ebx+8],eax
|
||||
mov al,2
|
||||
@ -2850,7 +2861,7 @@ coff_formatter:
|
||||
mov [edx],eax
|
||||
sub edi,[code_start]
|
||||
mov [code_size],edi
|
||||
mov [written_size],0
|
||||
and [written_size],0
|
||||
mov edx,[output_file]
|
||||
call create
|
||||
jc write_failed
|
||||
@ -2910,7 +2921,6 @@ format_elf:
|
||||
mov [code_type],32
|
||||
cmp word [esi],1D19h
|
||||
je format_elf_exe
|
||||
mov [labels_type],2
|
||||
elf_header_ok:
|
||||
mov byte [edx+10h],1
|
||||
mov eax,[additional_memory]
|
||||
@ -2923,11 +2933,6 @@ format_elf:
|
||||
xor eax,eax
|
||||
mov [current_section],ebx
|
||||
mov [number_of_sections],eax
|
||||
mov dword [org_origin],edi
|
||||
mov dword [org_origin+4],eax
|
||||
mov [org_registers],eax
|
||||
mov [org_start],edi
|
||||
mov [org_symbol],ebx
|
||||
mov [ebx],al
|
||||
mov [ebx+4],eax
|
||||
mov [ebx+8],edi
|
||||
@ -2935,6 +2940,7 @@ format_elf:
|
||||
mov [ebx+14h],eax
|
||||
mov al,4
|
||||
mov [ebx+10h],eax
|
||||
call setup_coff_section_org
|
||||
test [format_flags],8
|
||||
jz format_defined
|
||||
mov byte [ebx+10h],8
|
||||
@ -2958,9 +2964,8 @@ format_elf:
|
||||
mov byte [edx+3Ah],40h
|
||||
mov [code_type],64
|
||||
cmp word [esi],1D19h
|
||||
je format_elf64_exe
|
||||
mov [labels_type],4
|
||||
jmp elf_header_ok
|
||||
jne elf_header_ok
|
||||
jmp format_elf64_exe
|
||||
elf_section:
|
||||
bt [format_flags],0
|
||||
jc illegal_instruction
|
||||
@ -2976,21 +2981,10 @@ elf_section:
|
||||
xor eax,eax
|
||||
mov [ebx],al
|
||||
mov [ebx+8],edi
|
||||
mov dword [org_origin],edi
|
||||
mov dword [org_origin+4],eax
|
||||
mov [org_registers],eax
|
||||
mov [org_start],edi
|
||||
mov [org_symbol],ebx
|
||||
test [format_flags],8
|
||||
jnz elf64_labels_type
|
||||
mov [labels_type],2
|
||||
jmp elf_labels_type_ok
|
||||
elf64_labels_type:
|
||||
mov [labels_type],4
|
||||
elf_labels_type_ok:
|
||||
mov [ebx+10h],eax
|
||||
mov al,10b
|
||||
mov [ebx+14h],eax
|
||||
call setup_coff_section_org
|
||||
lods word [esi]
|
||||
cmp ax,'('
|
||||
jne invalid_argument
|
||||
@ -3218,8 +3212,7 @@ elf_formatter:
|
||||
mov dx,[eax+0Eh]
|
||||
jmp section_for_public_ok
|
||||
undefined_public:
|
||||
mov eax,[ebx+24]
|
||||
mov [error_info],eax
|
||||
mov [error_info],ebx
|
||||
jmp undefined_symbol
|
||||
elf64_public:
|
||||
cmp dl,4
|
||||
@ -3233,7 +3226,15 @@ elf_formatter:
|
||||
stos dword [edi]
|
||||
test [format_flags],8
|
||||
jnz elf64_public_symbol
|
||||
call get_public_value
|
||||
movzx eax,byte [ebx+9]
|
||||
shr al,1
|
||||
and al,1
|
||||
neg eax
|
||||
cmp eax,[ebx+4]
|
||||
jne value_out_of_range
|
||||
xor eax,[ebx]
|
||||
js value_out_of_range
|
||||
mov eax,[ebx]
|
||||
stos dword [edi]
|
||||
xor eax,eax
|
||||
mov al,[ebx+10]
|
||||
@ -3262,9 +3263,13 @@ elf_formatter:
|
||||
or al,2
|
||||
store_elf64_public_info:
|
||||
stos dword [edi]
|
||||
call get_public_value
|
||||
mov al,[ebx+9]
|
||||
shl eax,31-1
|
||||
xor eax,[ebx+4]
|
||||
js value_out_of_range
|
||||
mov eax,[ebx]
|
||||
stos dword [edi]
|
||||
xor eax,eax
|
||||
mov eax,[ebx+4]
|
||||
stos dword [edi]
|
||||
mov al,[ebx+10]
|
||||
stos dword [edi]
|
||||
@ -3278,16 +3283,6 @@ elf_formatter:
|
||||
mov [esi],eax
|
||||
add esi,10h
|
||||
jmp find_other_symbols
|
||||
get_public_value:
|
||||
mov eax,[ebx]
|
||||
cmp dword [ebx+4],0
|
||||
je public_value_ok
|
||||
cmp dword [ebx+4],-1
|
||||
jne value_out_of_range
|
||||
bt eax,31
|
||||
jnc value_out_of_range
|
||||
public_value_ok:
|
||||
ret
|
||||
make_extrn_symbol:
|
||||
mov eax,[esi+4]
|
||||
stos dword [edi]
|
||||
@ -3488,7 +3483,7 @@ elf_formatter:
|
||||
stos dword [edi]
|
||||
test [format_flags],8
|
||||
jz elf_machine_word_ok
|
||||
mov dword [edi],0
|
||||
and dword [edi],0
|
||||
add edi,4
|
||||
elf_machine_word_ok:
|
||||
ret
|
||||
@ -3669,27 +3664,36 @@ format_elf_exe:
|
||||
init_elf_segments:
|
||||
xor eax,eax
|
||||
rep stos dword [edi]
|
||||
mov [number_of_sections],0
|
||||
and [number_of_sections],0
|
||||
mov byte [ebx],1
|
||||
mov word [ebx+1Ch],1000h
|
||||
mov byte [ebx+18h],111b
|
||||
mov eax,edi
|
||||
xor ebp,ebp
|
||||
xor cl,cl
|
||||
sub eax,[code_start]
|
||||
sbb ebp,0
|
||||
sbb cl,0
|
||||
mov [ebx+4],eax
|
||||
add eax,[image_base]
|
||||
adc ebp,0
|
||||
adc cl,0
|
||||
mov [ebx+8],eax
|
||||
mov [ebx+0Ch],eax
|
||||
mov [edx+18h],eax
|
||||
xor edx,edx
|
||||
not eax
|
||||
not edx
|
||||
not ebp
|
||||
not cl
|
||||
add eax,1
|
||||
adc edx,0
|
||||
adc ebp,0
|
||||
adc cl,0
|
||||
add eax,edi
|
||||
adc edx,0
|
||||
adc ebp,0
|
||||
adc cl,0
|
||||
mov dword [org_origin],eax
|
||||
mov dword [org_origin+4],edx
|
||||
mov [org_registers],0
|
||||
mov [org_origin_sign],cl
|
||||
and [org_registers],0
|
||||
mov [org_start],edi
|
||||
mov [symbols_stream],edi
|
||||
jmp format_defined
|
||||
@ -3709,7 +3713,7 @@ format_elf_exe:
|
||||
mov [edx+7],al
|
||||
elf64_exe_brand_ok:
|
||||
mov [image_base],400000h
|
||||
mov [image_base_high],0
|
||||
and [image_base_high],0
|
||||
cmp byte [esi],80h
|
||||
jne elf64_exe_base_ok
|
||||
lods word [esi]
|
||||
@ -3735,7 +3739,7 @@ format_elf_exe:
|
||||
init_elf64_segments:
|
||||
xor eax,eax
|
||||
rep stos dword [edi]
|
||||
mov [number_of_sections],0
|
||||
and [number_of_sections],0
|
||||
mov byte [ebx],1
|
||||
mov word [ebx+30h],1000h
|
||||
mov byte [ebx+4],111b
|
||||
@ -3744,8 +3748,10 @@ format_elf_exe:
|
||||
sub eax,[code_start]
|
||||
mov [ebx+8],eax
|
||||
xor edx,edx
|
||||
xor cl,cl
|
||||
add eax,[image_base]
|
||||
adc edx,[image_base_high]
|
||||
adc cl,0
|
||||
mov [ebx+10h],eax
|
||||
mov [ebx+10h+4],edx
|
||||
mov [ebx+18h],eax
|
||||
@ -3755,13 +3761,17 @@ format_elf_exe:
|
||||
mov [ebx+18h+4],edx
|
||||
not eax
|
||||
not edx
|
||||
not cl
|
||||
add eax,1
|
||||
adc edx,0
|
||||
adc cl,0
|
||||
add eax,edi
|
||||
adc edx,0
|
||||
adc cl,0
|
||||
mov dword [org_origin],eax
|
||||
mov dword [org_origin+4],edx
|
||||
mov [org_registers],0
|
||||
mov [org_origin_sign],cl
|
||||
and [org_registers],0
|
||||
mov [org_start],edi
|
||||
mov [symbols_stream],edi
|
||||
jmp format_defined
|
||||
@ -3863,15 +3873,20 @@ elf_segment:
|
||||
mov [ebx+0Ch],edx
|
||||
mov eax,edx
|
||||
xor edx,edx
|
||||
xor cl,cl
|
||||
not eax
|
||||
not edx
|
||||
not cl
|
||||
add eax,1
|
||||
adc edx,0
|
||||
adc cl,0
|
||||
add eax,edi
|
||||
adc edx,0
|
||||
adc cl,0
|
||||
mov dword [org_origin],eax
|
||||
mov dword [org_origin+4],edx
|
||||
mov [org_registers],0
|
||||
mov [org_origin_sign],cl
|
||||
and [org_registers],0
|
||||
mov [org_start],edi
|
||||
inc [number_of_sections]
|
||||
jmp instruction_assembled
|
||||
@ -3990,15 +4005,20 @@ elf_segment:
|
||||
mov [ebx+10h+4],edx
|
||||
mov [ebx+18h],eax
|
||||
mov [ebx+18h+4],edx
|
||||
xor cl,cl
|
||||
not eax
|
||||
not edx
|
||||
not cl
|
||||
add eax,1
|
||||
adc edx,0
|
||||
adc cl,0
|
||||
add eax,edi
|
||||
adc edx,0
|
||||
adc cl,0
|
||||
mov dword [org_origin],eax
|
||||
mov dword [org_origin+4],edx
|
||||
mov [org_registers],0
|
||||
mov [org_origin_sign],cl
|
||||
and [org_registers],0
|
||||
mov [org_start],edi
|
||||
inc [number_of_sections]
|
||||
jmp instruction_assembled
|
||||
|
@ -25,7 +25,7 @@ _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
|
||||
_prefix_conflict db 'disallowed combination of registers',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
|
||||
|
@ -503,7 +503,7 @@ parse_line_contents:
|
||||
cmp al,','
|
||||
je separator
|
||||
cmp al,'='
|
||||
je separator
|
||||
je expression_comparator
|
||||
cmp al,'|'
|
||||
je separator
|
||||
cmp al,'&'
|
||||
@ -569,7 +569,11 @@ parse_line_contents:
|
||||
je parse_from_operator
|
||||
cmp al,89h
|
||||
je parse_label_operator
|
||||
cmp al,0F8h
|
||||
je forced_expression
|
||||
jmp argument_parsed
|
||||
instruction_separator:
|
||||
stos byte [edi]
|
||||
allow_embedded_instruction:
|
||||
cmp byte [esi],1Ah
|
||||
jne parse_argument
|
||||
@ -810,6 +814,29 @@ parse_line_contents:
|
||||
stos byte [edi]
|
||||
inc [parenthesis_stack]
|
||||
jmp parse_argument
|
||||
expression_comparator:
|
||||
stos byte [edi]
|
||||
jmp forced_expression
|
||||
greater:
|
||||
cmp byte [esi],'='
|
||||
jne separator
|
||||
inc esi
|
||||
mov al,0F2h
|
||||
jmp separator
|
||||
less:
|
||||
cmp byte [edi-1],0F6h
|
||||
je separator
|
||||
cmp byte [esi],'>'
|
||||
je not_equal
|
||||
cmp byte [esi],'='
|
||||
jne separator
|
||||
inc esi
|
||||
mov al,0F3h
|
||||
jmp separator
|
||||
not_equal:
|
||||
inc esi
|
||||
mov al,0F1h
|
||||
jmp expression_comparator
|
||||
expression:
|
||||
mov al,'('
|
||||
stos byte [edi]
|
||||
@ -892,30 +919,6 @@ parse_line_contents:
|
||||
mov al,'}'
|
||||
separator:
|
||||
stos byte [edi]
|
||||
jmp argument_parsed
|
||||
instruction_separator:
|
||||
stos byte [edi]
|
||||
jmp allow_embedded_instruction
|
||||
greater:
|
||||
cmp byte [esi],'='
|
||||
jne separator
|
||||
inc esi
|
||||
mov al,0F2h
|
||||
jmp separator
|
||||
less:
|
||||
cmp byte [edi-1],0F6h
|
||||
je separator
|
||||
cmp byte [esi],'>'
|
||||
je not_equal
|
||||
cmp byte [esi],'='
|
||||
jne separator
|
||||
inc esi
|
||||
mov al,0F3h
|
||||
jmp separator
|
||||
not_equal:
|
||||
inc esi
|
||||
mov al,0F1h
|
||||
jmp separator
|
||||
argument_parsed:
|
||||
cmp [parenthesis_stack],0
|
||||
je parse_argument
|
||||
@ -984,6 +987,7 @@ get_operator:
|
||||
jne next_operator
|
||||
repe cmps byte [esi],[edi]
|
||||
je operator_found
|
||||
jb no_operator
|
||||
next_operator:
|
||||
mov edi,ebx
|
||||
inc edi
|
||||
@ -1046,12 +1050,10 @@ get_symbol:
|
||||
ja symbols_up
|
||||
jb symbols_down
|
||||
mov ax,[edi]
|
||||
|
||||
cmp al,18h
|
||||
jb symbol_ok
|
||||
cmp [formatter_symbols_allowed],0
|
||||
je no_symbol
|
||||
|
||||
symbol_ok:
|
||||
pop esi
|
||||
add esi,ebp
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -12,14 +12,14 @@ dump_symbols:
|
||||
jae out_of_memory
|
||||
mov eax,edi
|
||||
sub eax,ebx
|
||||
mov [ebx-38h+0Ch],eax
|
||||
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]
|
||||
mov [number_of_sections],0
|
||||
and [number_of_sections],0
|
||||
cmp [output_format],4
|
||||
je prepare_strings_table
|
||||
cmp [output_format],5
|
||||
@ -152,22 +152,22 @@ dump_symbols:
|
||||
labels_dump_ok:
|
||||
mov eax,edi
|
||||
sub eax,ebx
|
||||
mov [ebx-38h+14h],eax
|
||||
add eax,38h
|
||||
mov [ebx-38h+18h],eax
|
||||
mov [ebx-40h+14h],eax
|
||||
add eax,40h
|
||||
mov [ebx-40h+18h],eax
|
||||
mov ecx,[memory_end]
|
||||
sub ecx,[labels_list]
|
||||
mov [ebx-38h+1Ch],ecx
|
||||
mov [ebx-40h+1Ch],ecx
|
||||
add eax,ecx
|
||||
mov [ebx-38h+20h],eax
|
||||
mov [ebx-40h+20h],eax
|
||||
mov ecx,[source_start]
|
||||
sub ecx,[memory_start]
|
||||
mov [ebx-38h+24h],ecx
|
||||
mov [ebx-40h+24h],ecx
|
||||
add eax,ecx
|
||||
mov [ebx-38h+28h],eax
|
||||
mov [ebx-40h+28h],eax
|
||||
mov eax,[number_of_sections]
|
||||
shl eax,2
|
||||
mov [ebx-38h+34h],eax
|
||||
mov [ebx-40h+34h],eax
|
||||
call prepare_preprocessed_source
|
||||
mov esi,[labels_list]
|
||||
mov ebp,edi
|
||||
@ -179,7 +179,12 @@ dump_symbols:
|
||||
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]
|
||||
@ -193,8 +198,10 @@ dump_symbols:
|
||||
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]
|
||||
@ -210,10 +217,15 @@ dump_symbols:
|
||||
base_symbol_for_line_ok:
|
||||
stos dword [edi]
|
||||
mov eax,[esi+18h]
|
||||
and eax,001FFFFh
|
||||
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
|
||||
@ -223,10 +235,12 @@ dump_symbols:
|
||||
stos dword [edi]
|
||||
mov ecx,edi
|
||||
sub ecx,ebx
|
||||
sub ecx,[ebx-38h+14h]
|
||||
mov [ebx-38h+2Ch],ecx
|
||||
add ecx,[ebx-38h+28h]
|
||||
mov [ebx-38h+30h],ecx
|
||||
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
|
||||
@ -238,7 +252,7 @@ dump_symbols:
|
||||
mov eax,[edx]
|
||||
jmp find_inexisting_offsets
|
||||
correct_inexisting_offset:
|
||||
mov dword [edx],0
|
||||
and dword [edx],0
|
||||
or byte [edx+1Ah],2
|
||||
jmp find_inexisting_offsets
|
||||
write_symbols:
|
||||
@ -247,7 +261,7 @@ dump_symbols:
|
||||
jc write_failed
|
||||
mov edx,[code_start]
|
||||
mov ecx,[edx+14h]
|
||||
add ecx,38h
|
||||
add ecx,40h
|
||||
call write
|
||||
jc write_failed
|
||||
mov edx,[display_buffer]
|
||||
@ -270,16 +284,47 @@ dump_symbols:
|
||||
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,38h shr 2
|
||||
mov ecx,40h shr 2
|
||||
rep stos dword [edi]
|
||||
mov ebx,edi
|
||||
mov dword [ebx-38h],'fas'+1Ah shl 24
|
||||
mov dword [ebx-38h+4],VERSION_MAJOR + VERSION_MINOR shl 8 + 38h shl 16
|
||||
mov dword [ebx-38h+10h],38h
|
||||
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]
|
||||
@ -365,21 +410,21 @@ dump_preprocessed_source:
|
||||
mov eax,edi
|
||||
sub eax,ebx
|
||||
dec eax
|
||||
mov [ebx-38h+0Ch],eax
|
||||
mov [ebx-40h+0Ch],eax
|
||||
mov eax,edi
|
||||
sub eax,ebx
|
||||
mov [ebx-38h+14h],eax
|
||||
add eax,38h
|
||||
mov [ebx-38h+20h],eax
|
||||
mov [ebx-40h+14h],eax
|
||||
add eax,40h
|
||||
mov [ebx-40h+20h],eax
|
||||
call prepare_preprocessed_source
|
||||
sub esi,[memory_start]
|
||||
mov [ebx-38h+24h],esi
|
||||
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,38h
|
||||
add ecx,40h
|
||||
call write
|
||||
jc write_failed
|
||||
mov edx,[memory_start]
|
||||
|
@ -49,12 +49,12 @@ operators:
|
||||
db 1,'-',81h
|
||||
db 1,'*',90h
|
||||
db 1,'/',91h
|
||||
db 3,'mod',0A0h
|
||||
db 3,'and',0B0h
|
||||
db 3,'mod',0A0h
|
||||
db 2,'or',0B1h
|
||||
db 3,'xor',0B2h
|
||||
db 3,'shl',0C0h
|
||||
db 3,'shr',0C1h
|
||||
db 3,'xor',0B2h
|
||||
db 0
|
||||
|
||||
single_operand_operators:
|
||||
@ -77,50 +77,10 @@ directive_operators:
|
||||
db 2,'in',0F6h
|
||||
db 2,'on',84h
|
||||
db 3,'ptr',85h
|
||||
db 10,'relativeto',0F8h
|
||||
db 4,'used',89h
|
||||
db 0
|
||||
|
||||
address_registers:
|
||||
db 2,'bp',25h
|
||||
db 2,'bx',23h
|
||||
db 2,'di',27h
|
||||
db 3,'eax',40h
|
||||
db 3,'ebp',45h
|
||||
db 3,'ebx',43h
|
||||
db 3,'ecx',41h
|
||||
db 3,'edi',47h
|
||||
db 3,'edx',42h
|
||||
db 3,'eip',0F4h
|
||||
db 3,'esi',46h
|
||||
db 3,'esp',44h
|
||||
db 3,'r10',8Ah
|
||||
db 4,'r10d',4Ah
|
||||
db 3,'r11',8Bh
|
||||
db 4,'r11d',4Bh
|
||||
db 3,'r12',8Ch
|
||||
db 4,'r12d',4Ch
|
||||
db 3,'r13',8Dh
|
||||
db 4,'r13d',4Dh
|
||||
db 3,'r14',8Eh
|
||||
db 4,'r14d',4Eh
|
||||
db 3,'r15',8Fh
|
||||
db 4,'r15d',4Fh
|
||||
db 2,'r8',88h
|
||||
db 3,'r8d',48h
|
||||
db 2,'r9',89h
|
||||
db 3,'r9d',49h
|
||||
db 3,'rax',80h
|
||||
db 3,'rbp',85h
|
||||
db 3,'rbx',83h
|
||||
db 3,'rcx',81h
|
||||
db 3,'rdi',87h
|
||||
db 3,'rdx',82h
|
||||
db 3,'rip',0F8h
|
||||
db 3,'rsi',86h
|
||||
db 3,'rsp',84h
|
||||
db 2,'si',26h
|
||||
db 0
|
||||
|
||||
address_sizes:
|
||||
db 4,'byte',1
|
||||
db 5,'dword',4
|
||||
@ -603,8 +563,20 @@ instructions_3:
|
||||
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
|
||||
@ -723,6 +695,8 @@ instructions_4:
|
||||
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
|
||||
@ -731,6 +705,10 @@ instructions_4:
|
||||
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
|
||||
@ -759,10 +737,14 @@ instructions_4:
|
||||
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
|
||||
@ -789,8 +771,12 @@ instructions_4:
|
||||
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
|
||||
@ -808,13 +794,15 @@ instructions_4:
|
||||
db 'verw',5
|
||||
dw pm_word_instruction-instruction_handler
|
||||
db 'vpor',0EBh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
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:
|
||||
@ -832,6 +820,12 @@ instructions_5:
|
||||
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
|
||||
@ -839,25 +833,25 @@ instructions_5:
|
||||
db 'bswap',0
|
||||
dw bswap_instruction-instruction_handler
|
||||
db 'cmova',47h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovb',42h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovc',42h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmove',44h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovg',4Fh
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovl',4Ch
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovo',40h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovp',4Ah
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovs',48h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovz',44h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmppd',-1
|
||||
dw cmp_pd_instruction-instruction_handler
|
||||
db 'cmpps',-1
|
||||
@ -1222,6 +1216,10 @@ instructions_5:
|
||||
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
|
||||
@ -1239,9 +1237,9 @@ instructions_5:
|
||||
db 'vorps',56h
|
||||
dw avx_ps_instruction-instruction_handler
|
||||
db 'vpand',0DBh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpxor',0EFh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'while',0
|
||||
dw while_directive-instruction_handler
|
||||
db 'wrmsr',30h
|
||||
@ -1254,6 +1252,8 @@ instructions_5:
|
||||
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
|
||||
@ -1267,38 +1267,42 @@ instructions_6:
|
||||
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 cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovbe',46h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovge',4Dh
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovle',4Eh
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovna',46h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovnb',43h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovnc',43h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovne',45h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovng',4Eh
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovnl',4Dh
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovno',41h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovnp',4Bh
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovns',49h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovnz',45h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovpe',4Ah
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovpo',4Bh
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'comisd',2Fh
|
||||
dw comisd_instruction-instruction_handler
|
||||
db 'comiss',2Fh
|
||||
@ -1391,6 +1395,8 @@ instructions_6:
|
||||
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
|
||||
@ -1407,6 +1413,10 @@ instructions_6:
|
||||
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
|
||||
@ -1563,6 +1573,8 @@ instructions_6:
|
||||
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
|
||||
@ -1575,6 +1587,8 @@ instructions_6:
|
||||
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
|
||||
@ -1644,25 +1658,25 @@ instructions_6:
|
||||
db 'vmxoff',0C4h
|
||||
dw simple_vmx_instruction-instruction_handler
|
||||
db 'vpabsb',1Ch
|
||||
dw avx_single_source_128bit_instruction_38-instruction_handler
|
||||
dw avx_single_source_instruction_38-instruction_handler
|
||||
db 'vpabsd',1Eh
|
||||
dw avx_single_source_128bit_instruction_38-instruction_handler
|
||||
dw avx_single_source_instruction_38-instruction_handler
|
||||
db 'vpabsw',1Dh
|
||||
dw avx_single_source_128bit_instruction_38-instruction_handler
|
||||
dw avx_single_source_instruction_38-instruction_handler
|
||||
db 'vpaddb',0FCh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpaddd',0FEh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpaddq',0D4h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpaddw',0FDh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpandn',0DFh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpavgb',0E0h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpavgw',0E3h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpcmov',0A2h
|
||||
dw vpcmov_instruction-instruction_handler
|
||||
db 'vpcomb',-1
|
||||
@ -1673,6 +1687,10 @@ instructions_6:
|
||||
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
|
||||
@ -1716,13 +1734,13 @@ instructions_6:
|
||||
db 'vpsrlw',0D1h
|
||||
dw avx_bit_shift_instruction-instruction_handler
|
||||
db 'vpsubb',0F8h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpsubd',0FAh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpsubq',0FBh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpsubw',0F9h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vptest',17h
|
||||
dw avx_single_source_instruction_38-instruction_handler
|
||||
db 'vrcpps',53h
|
||||
@ -1745,6 +1763,10 @@ instructions_6:
|
||||
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
|
||||
@ -1752,20 +1774,24 @@ instructions_6:
|
||||
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 cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovnbe',47h
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovnge',4Ch
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmovnle',4Fh
|
||||
dw cmov_instruction-instruction_handler
|
||||
dw bs_instruction-instruction_handler
|
||||
db 'cmpeqpd',0
|
||||
dw cmp_pd_instruction-instruction_handler
|
||||
db 'cmpeqps',0
|
||||
@ -1842,6 +1868,8 @@ instructions_7:
|
||||
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
|
||||
@ -2029,9 +2057,9 @@ instructions_7:
|
||||
db 'vmwrite',0
|
||||
dw vmwrite_instruction-instruction_handler
|
||||
db 'vpaddsb',0ECh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpaddsw',0EDh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpcomub',-1
|
||||
dw xop_pcom_ub_instruction-instruction_handler
|
||||
db 'vpcomud',-1
|
||||
@ -2040,6 +2068,10 @@ instructions_7:
|
||||
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
|
||||
@ -2049,13 +2081,13 @@ instructions_7:
|
||||
db 'vpextrw',15h
|
||||
dw avx_pextrw_instruction-instruction_handler
|
||||
db 'vphaddd',2
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vphaddw',1
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vphsubd',6
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vphsubw',5
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpinsrb',20h
|
||||
dw avx_pinsrb_instruction-instruction_handler
|
||||
db 'vpinsrd',22h
|
||||
@ -2065,57 +2097,67 @@ instructions_7:
|
||||
db 'vpinsrw',0C4h
|
||||
dw avx_pinsrw_instruction-instruction_handler
|
||||
db 'vpmaxsb',3Ch
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpmaxsd',3Dh
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpmaxsw',0EEh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpmaxub',0DEh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpmaxud',3Fh
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpmaxuw',3Eh
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpminsb',38h
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpminsd',39h
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpminsw',0EAh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpminub',0DAh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpminud',3Bh
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpminuw',3Ah
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpmuldq',28h
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpmulhw',0E5h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpmulld',40h
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpmullw',0D5h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpsadbw',0F6h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpshufb',0
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpshufd',66h
|
||||
dw avx_pshufd_instruction-instruction_handler
|
||||
db 'vpsignb',8
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpsignd',0Ah
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpsignw',9
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
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_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpsubsw',0E9h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vshufpd',0C6h
|
||||
dw avx_pd_instruction_imm8-instruction_handler
|
||||
db 'vshufps',0C6h
|
||||
@ -2213,6 +2255,8 @@ instructions_8:
|
||||
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
|
||||
@ -2221,7 +2265,7 @@ instructions_8:
|
||||
dw movmskpd_instruction-instruction_handler
|
||||
db 'movmskps',0
|
||||
dw movmskps_instruction-instruction_handler
|
||||
db 'movntdqa',0
|
||||
db 'movntdqa',2Ah
|
||||
dw movntdqa_instruction-instruction_handler
|
||||
db 'movshdup',16h
|
||||
dw movshdup_instruction-instruction_handler
|
||||
@ -2366,33 +2410,35 @@ instructions_8:
|
||||
db 'vmovntps',2Bh
|
||||
dw avx_movntps_instruction-instruction_handler
|
||||
db 'vmpsadbw',42h
|
||||
dw avx_128bit_instruction_3a_imm8-instruction_handler
|
||||
dw avx_instruction_3a_imm8-instruction_handler
|
||||
db 'vmresume',0C3h
|
||||
dw simple_vmx_instruction-instruction_handler
|
||||
db 'vpaddusb',0DCh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpaddusw',0DDh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpalignr',0Fh
|
||||
dw avx_128bit_instruction_3a_imm8-instruction_handler
|
||||
dw avx_instruction_3a_imm8-instruction_handler
|
||||
db 'vpblendd',2
|
||||
dw avx_instruction_3a_imm8-instruction_handler
|
||||
db 'vpblendw',0Eh
|
||||
dw avx_128bit_instruction_3a_imm8-instruction_handler
|
||||
dw avx_instruction_3a_imm8-instruction_handler
|
||||
db 'vpcmpeqb',74h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpcmpeqd',76h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpcmpeqq',29h
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpcmpeqw',75h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpcmpgtb',64h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpcmpgtd',66h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpcmpgtq',37h
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpcmpgtw',65h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpcomeqb',4
|
||||
dw xop_pcom_b_instruction-instruction_handler
|
||||
db 'vpcomeqd',4
|
||||
@ -2442,7 +2488,7 @@ instructions_8:
|
||||
db 'vphadddq',0CBh
|
||||
dw xop_single_source_128bit_instruction-instruction_handler
|
||||
db 'vphaddsw',3
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vphaddwd',0C6h
|
||||
dw xop_single_source_128bit_instruction-instruction_handler
|
||||
db 'vphaddwq',0C7h
|
||||
@ -2452,7 +2498,7 @@ instructions_8:
|
||||
db 'vphsubdq',0E3h
|
||||
dw xop_single_source_128bit_instruction-instruction_handler
|
||||
db 'vphsubsw',7
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vphsubwd',0E2h
|
||||
dw xop_single_source_128bit_instruction-instruction_handler
|
||||
db 'vpmacsdd',9Eh
|
||||
@ -2462,19 +2508,19 @@ instructions_8:
|
||||
db 'vpmacsww',95h
|
||||
dw xop_triple_source_128bit_instruction-instruction_handler
|
||||
db 'vpmaddwd',0F5h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpmulhuw',0E4h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpmuludq',0F4h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
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_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpsubusw',0D9h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vroundpd',9
|
||||
dw avx_single_source_instruction_3a_imm8-instruction_handler
|
||||
db 'vroundps',8
|
||||
@ -2499,6 +2545,10 @@ instructions_8:
|
||||
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
|
||||
@ -2520,6 +2570,8 @@ instructions_9:
|
||||
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
|
||||
@ -2652,22 +2704,22 @@ instructions_9:
|
||||
dw avx_movmskpd_instruction-instruction_handler
|
||||
db 'vmovmskps',0
|
||||
dw avx_movmskps_instruction-instruction_handler
|
||||
db 'vmovntdqa',0
|
||||
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_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpacksswb',63h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpackusdw',2Bh
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vpackuswb',67h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpblendvb',4Ch
|
||||
dw avx_triple_source_128bit_instruction_3a-instruction_handler
|
||||
dw avx_triple_source_instruction_3a-instruction_handler
|
||||
db 'vpcomequb',4
|
||||
dw xop_pcom_ub_instruction-instruction_handler
|
||||
db 'vpcomequd',4
|
||||
@ -2771,15 +2823,15 @@ instructions_9:
|
||||
db 'vpmovzxwq',34h
|
||||
dw avx_pmovsxwq_instruction-instruction_handler
|
||||
db 'vpmulhrsw',0Bh
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
dw avx_instruction_38-instruction_handler
|
||||
db 'vunpckhpd',15h
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vunpckhps',15h
|
||||
dw avx_instruction-instruction_handler
|
||||
dw avx_ps_instruction-instruction_handler
|
||||
db 'vunpcklpd',14h
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vunpcklps',14h
|
||||
dw avx_instruction-instruction_handler
|
||||
dw avx_ps_instruction-instruction_handler
|
||||
instructions_10:
|
||||
db 'aesdeclast',0DFh
|
||||
dw sse4_instruction_38-instruction_handler
|
||||
@ -2831,6 +2883,14 @@ instructions_10:
|
||||
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
|
||||
@ -2863,10 +2923,20 @@ instructions_10:
|
||||
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
|
||||
@ -2874,19 +2944,23 @@ instructions_10:
|
||||
db 'vpmadcsswd',0A6h
|
||||
dw xop_triple_source_128bit_instruction-instruction_handler
|
||||
db 'vpmaddubsw',4
|
||||
dw avx_128bit_instruction_38-instruction_handler
|
||||
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_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpunpckhdq',6Ah
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpunpckhwd',69h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpunpcklbw',60h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpunpckldq',62h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpunpcklwd',61h
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vzeroupper',77h
|
||||
dw vzeroupper_instruction-instruction_handler
|
||||
db 'xsaveopt64',110b
|
||||
@ -3040,6 +3114,8 @@ instructions_11:
|
||||
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
|
||||
@ -3059,19 +3135,23 @@ instructions_11:
|
||||
db 'vpcomtrueuw',7
|
||||
dw xop_pcom_uw_instruction-instruction_handler
|
||||
db 'vphminposuw',41h
|
||||
dw avx_single_source_128bit_instruction_38-instruction_handler
|
||||
dw avx_single_source_instruction_38-instruction_handler
|
||||
db 'vpunpckhqdq',6Dh
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
dw avx_pd_instruction-instruction_handler
|
||||
db 'vpunpcklqdq',6Ch
|
||||
dw avx_128bit_instruction-instruction_handler
|
||||
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',0
|
||||
db 'vbroadcastsd',19h
|
||||
dw avx_broadcastsd_instruction-instruction_handler
|
||||
db 'vbroadcastss',0
|
||||
db 'vbroadcastss',18h
|
||||
dw avx_broadcastss_instruction-instruction_handler
|
||||
db 'vcmpneq_oqpd',0Ch
|
||||
dw avx_cmp_pd_instruction-instruction_handler
|
||||
@ -3131,6 +3211,8 @@ instructions_12:
|
||||
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
|
||||
@ -3179,6 +3261,14 @@ instructions_12:
|
||||
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
|
||||
@ -3225,7 +3315,9 @@ instructions_13:
|
||||
db 'vpclmullqlqdq',0
|
||||
dw avx_pclmulqdq_instruction-instruction_handler
|
||||
instructions_14:
|
||||
db 'vbroadcastf128',0
|
||||
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
|
||||
|
@ -117,12 +117,16 @@ jump_type db ?
|
||||
push_size db ?
|
||||
value_size db ?
|
||||
address_size db ?
|
||||
label_size db ?
|
||||
size_declared db ?
|
||||
|
||||
value_undefined db ?
|
||||
value_constant db ?
|
||||
value_type db ?
|
||||
value_sign db ?
|
||||
fp_sign db ?
|
||||
fp_format db ?
|
||||
address_sign db ?
|
||||
compare_type db ?
|
||||
logical_value_wrapping db ?
|
||||
next_pass_needed db ?
|
||||
@ -130,8 +134,11 @@ 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 ?
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
; flat assembler version 1.69
|
||||
; flat assembler version 1.70
|
||||
; Copyright (c) 1999-2012, Tomasz Grysztar.
|
||||
; All rights reserved.
|
||||
;
|
||||
@ -33,7 +33,7 @@
|
||||
; cannot simply be copied and put under another distribution licence
|
||||
; (including the GNU Public Licence).
|
||||
|
||||
VERSION_STRING equ "1.69.36"
|
||||
VERSION_STRING equ "1.70.01"
|
||||
|
||||
VERSION_MAJOR = 1
|
||||
VERSION_MINOR = 69
|
||||
VERSION_MINOR = 70
|
||||
|
@ -76,10 +76,9 @@ int_instruction:
|
||||
cmp al,'('
|
||||
jne invalid_operand
|
||||
call get_byte_value
|
||||
cmp [next_pass_needed],0
|
||||
jne int_imm_ok
|
||||
test eax,eax
|
||||
js value_out_of_range
|
||||
jns int_imm_ok
|
||||
call recoverable_overflow
|
||||
int_imm_ok:
|
||||
mov ah,al
|
||||
mov al,0CDh
|
||||
@ -160,11 +159,7 @@ basic_instruction:
|
||||
jae long_immediate_not_encodable
|
||||
jmp basic_mem_imm_32bit_ok
|
||||
basic_mem_imm_nosize:
|
||||
cmp [error_line],0
|
||||
jne basic_mem_imm_8bit
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
basic_mem_imm_8bit:
|
||||
call get_byte_value
|
||||
mov byte [value],al
|
||||
@ -373,6 +368,14 @@ basic_instruction:
|
||||
add [base_code],5
|
||||
call store_instruction_code
|
||||
jmp basic_store_imm_32bit
|
||||
recoverable_unknown_size:
|
||||
cmp [error_line],0
|
||||
jne ignore_unknown_size
|
||||
push [current_line]
|
||||
pop [error_line]
|
||||
mov [error],operand_size_not_specified
|
||||
ignore_unknown_size:
|
||||
ret
|
||||
single_operand_instruction:
|
||||
mov [base_code],0F6h
|
||||
mov [postbyte_register],al
|
||||
@ -392,11 +395,7 @@ single_operand_instruction:
|
||||
inc [base_code]
|
||||
jmp instruction_ready
|
||||
single_mem_nosize:
|
||||
cmp [error_line],0
|
||||
jne single_mem_8bit
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
single_mem_8bit:
|
||||
jmp instruction_ready
|
||||
single_reg:
|
||||
@ -575,11 +574,7 @@ mov_instruction:
|
||||
call store_instruction_with_imm16
|
||||
jmp instruction_assembled
|
||||
mov_mem_imm_nosize:
|
||||
cmp [error_line],0
|
||||
jne mov_mem_imm_32bit
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
mov_mem_imm_32bit:
|
||||
call operand_32bit
|
||||
call get_dword_value
|
||||
@ -920,37 +915,6 @@ mov_instruction:
|
||||
cmp ah,8
|
||||
je mov_xrx_store
|
||||
jmp invalid_operand_size
|
||||
cmov_instruction:
|
||||
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
|
||||
mov [postbyte_register],al
|
||||
lods byte [esi]
|
||||
cmp al,','
|
||||
jne invalid_operand
|
||||
lods byte [esi]
|
||||
call get_size_operator
|
||||
cmp al,'['
|
||||
je cmov_reg_mem
|
||||
cmp al,10h
|
||||
jne invalid_operand
|
||||
cmov_reg_reg:
|
||||
lods byte [esi]
|
||||
call convert_register
|
||||
mov bl,al
|
||||
mov al,ah
|
||||
call operand_autodetect
|
||||
jmp nomem_instruction_ready
|
||||
cmov_reg_mem:
|
||||
call get_address
|
||||
mov al,[operand_size]
|
||||
call operand_autodetect
|
||||
jmp instruction_ready
|
||||
test_instruction:
|
||||
mov [base_code],84h
|
||||
lods byte [esi]
|
||||
@ -1020,11 +984,7 @@ test_instruction:
|
||||
call store_instruction_with_imm16
|
||||
jmp instruction_assembled
|
||||
test_mem_imm_nosize:
|
||||
cmp [error_line],0
|
||||
jne test_mem_imm_32bit
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
test_mem_imm_32bit:
|
||||
call operand_32bit
|
||||
call get_dword_value
|
||||
@ -1243,11 +1203,7 @@ push_instruction:
|
||||
je push_mem_32bit
|
||||
cmp ah,8
|
||||
je push_mem_64bit
|
||||
cmp [error_line],0
|
||||
jne push_mem_store
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
jmp push_mem_store
|
||||
push_mem_16bit:
|
||||
test ah,not 2
|
||||
@ -1509,11 +1465,7 @@ pop_instruction:
|
||||
je pop_mem_32bit
|
||||
cmp ah,8
|
||||
je pop_mem_64bit
|
||||
cmp [error_line],0
|
||||
jne pop_mem_store
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
jmp pop_mem_store
|
||||
pop_mem_16bit:
|
||||
test ah,not 2
|
||||
@ -1689,11 +1641,7 @@ inc_instruction:
|
||||
mov [postbyte_register],al
|
||||
jmp instruction_ready
|
||||
inc_mem_nosize:
|
||||
cmp [error_line],0
|
||||
jne inc_mem_8bit
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
inc_mem_8bit:
|
||||
mov al,0FEh
|
||||
xchg al,[base_code]
|
||||
@ -2028,11 +1976,7 @@ sh_instruction:
|
||||
mov [base_code],0D3h
|
||||
jmp instruction_ready
|
||||
sh_mem_cl_nosize:
|
||||
cmp [error_line],0
|
||||
jne sh_mem_cl_8bit
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
sh_mem_cl_8bit:
|
||||
mov [base_code],0D2h
|
||||
jmp instruction_ready
|
||||
@ -2059,11 +2003,7 @@ sh_instruction:
|
||||
mov [base_code],0D1h
|
||||
jmp instruction_ready
|
||||
sh_mem_imm_nosize:
|
||||
cmp [error_line],0
|
||||
jne sh_mem_imm_8bit
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
sh_mem_imm_8bit:
|
||||
cmp byte [value],1
|
||||
je sh_mem_1_8bit
|
||||
@ -2277,11 +2217,7 @@ movx_instruction:
|
||||
call operand_autodetect
|
||||
jmp instruction_ready
|
||||
movx_unknown_size:
|
||||
cmp [error_line],0
|
||||
jne movx_mem_store
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
jmp movx_mem_store
|
||||
movx_reg:
|
||||
lods byte [esi]
|
||||
@ -2400,11 +2336,7 @@ bt_instruction:
|
||||
call store_instruction_with_imm8
|
||||
jmp instruction_assembled
|
||||
bt_mem_imm_nosize:
|
||||
cmp [error_line],0
|
||||
jne bt_mem_imm_store
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
jmp bt_mem_imm_store
|
||||
bt_reg:
|
||||
lods byte [esi]
|
||||
@ -2457,6 +2389,16 @@ bt_instruction:
|
||||
bs_instruction:
|
||||
mov [extended_code],al
|
||||
mov [base_code],0Fh
|
||||
call get_reg_mem
|
||||
jc bs_reg_reg
|
||||
mov al,[operand_size]
|
||||
call operand_autodetect
|
||||
jmp instruction_ready
|
||||
bs_reg_reg:
|
||||
mov al,ah
|
||||
call operand_autodetect
|
||||
jmp nomem_instruction_ready
|
||||
get_reg_mem:
|
||||
lods byte [esi]
|
||||
call get_size_operator
|
||||
cmp al,10h
|
||||
@ -2470,20 +2412,19 @@ bs_instruction:
|
||||
lods byte [esi]
|
||||
call get_size_operator
|
||||
cmp al,10h
|
||||
je bs_reg_reg
|
||||
je get_reg_reg
|
||||
cmp al,'['
|
||||
jne invalid_argument
|
||||
call get_address
|
||||
mov al,[operand_size]
|
||||
call operand_autodetect
|
||||
jmp instruction_ready
|
||||
bs_reg_reg:
|
||||
clc
|
||||
ret
|
||||
get_reg_reg:
|
||||
lods byte [esi]
|
||||
call convert_register
|
||||
mov bl,al
|
||||
mov al,ah
|
||||
call operand_autodetect
|
||||
jmp nomem_instruction_ready
|
||||
stc
|
||||
ret
|
||||
|
||||
imul_instruction:
|
||||
mov [base_code],0F6h
|
||||
mov [postbyte_register],5
|
||||
@ -2503,11 +2444,7 @@ imul_instruction:
|
||||
inc [base_code]
|
||||
jmp instruction_ready
|
||||
imul_mem_nosize:
|
||||
cmp [error_line],0
|
||||
jne imul_mem_8bit
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
imul_mem_8bit:
|
||||
jmp instruction_ready
|
||||
imul_reg:
|
||||
@ -2892,11 +2829,7 @@ jmp_instruction:
|
||||
je jmp_mem_far
|
||||
cmp [jump_type],2
|
||||
je jmp_mem_near
|
||||
cmp [error_line],0
|
||||
jne jmp_mem_near
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
jmp_mem_near:
|
||||
cmp [code_type],16
|
||||
je jmp_mem_16bit
|
||||
@ -3007,6 +2940,10 @@ jmp_instruction:
|
||||
jmp_imm_32bit_store:
|
||||
mov edx,eax
|
||||
sub edx,3
|
||||
jno jmp_imm_32bit_ok
|
||||
cmp [code_type],64
|
||||
je relative_jump_out_of_range
|
||||
jmp_imm_32bit_ok:
|
||||
mov al,[base_code]
|
||||
stos byte [edi]
|
||||
mov eax,edx
|
||||
@ -3021,7 +2958,7 @@ jmp_instruction:
|
||||
mov ecx,edx
|
||||
cdq
|
||||
cmp edx,ecx
|
||||
jne value_out_of_range
|
||||
jne relative_jump_out_of_range
|
||||
call check_for_short_jump
|
||||
jnc jmp_imm_32bit_store
|
||||
jmp_short:
|
||||
@ -3202,7 +3139,7 @@ conditional_jump:
|
||||
mov ecx,edx
|
||||
cdq
|
||||
cmp edx,ecx
|
||||
jne value_out_of_range
|
||||
jne relative_jump_out_of_range
|
||||
call check_for_short_jump
|
||||
jnc conditional_jump_32bit_store
|
||||
conditional_jump_short:
|
||||
@ -3307,7 +3244,7 @@ loop_instruction:
|
||||
mov ecx,edx
|
||||
cdq
|
||||
cmp edx,ecx
|
||||
jne value_out_of_range
|
||||
jne relative_jump_out_of_range
|
||||
jmp make_loop_jump
|
||||
loop_jump_16bit:
|
||||
call get_address_word_value
|
||||
@ -3393,11 +3330,7 @@ movs_instruction:
|
||||
je simple_instruction_64bit
|
||||
or bl,bl
|
||||
jnz invalid_operand_size
|
||||
cmp [error_line],0
|
||||
jne simple_instruction
|
||||
mov ebx,[current_line]
|
||||
mov [error_line],ebx
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
jmp simple_instruction
|
||||
lods_instruction:
|
||||
lods byte [esi]
|
||||
@ -3935,11 +3868,7 @@ basic_fpu_instruction:
|
||||
je basic_fpu_mem_64bit
|
||||
or al,al
|
||||
jnz invalid_operand_size
|
||||
cmp [error_line],0
|
||||
jne basic_fpu_mem_32bit
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
basic_fpu_mem_32bit:
|
||||
jmp instruction_ready
|
||||
basic_fpu_mem_64bit:
|
||||
@ -4007,11 +3936,7 @@ fi_instruction:
|
||||
je fi_mem_32bit
|
||||
or al,al
|
||||
jnz invalid_operand_size
|
||||
cmp [error_line],0
|
||||
jne fi_mem_32bit
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
fi_mem_32bit:
|
||||
mov [base_code],0DAh
|
||||
jmp instruction_ready
|
||||
@ -4036,11 +3961,7 @@ fld_instruction:
|
||||
je fld_mem_80bit
|
||||
or al,al
|
||||
jnz invalid_operand_size
|
||||
cmp [error_line],0
|
||||
jne fld_mem_32bit
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
fld_mem_32bit:
|
||||
mov [base_code],0D9h
|
||||
jmp instruction_ready
|
||||
@ -4086,11 +4007,7 @@ fild_instruction:
|
||||
je fild_mem_64bit
|
||||
or al,al
|
||||
jnz invalid_operand_size
|
||||
cmp [error_line],0
|
||||
jne fild_mem_32bit
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
fild_mem_32bit:
|
||||
mov [base_code],0DBh
|
||||
jmp instruction_ready
|
||||
@ -5648,7 +5565,7 @@ pmovsxdq_instruction:
|
||||
jne invalid_operand
|
||||
call get_address
|
||||
cmp [operand_size],0
|
||||
je mmx_imm8
|
||||
je instruction_ready
|
||||
mov al,[mmx_size]
|
||||
cmp al,[operand_size]
|
||||
jne invalid_operand_size
|
||||
@ -5854,7 +5771,7 @@ movntdqa_instruction:
|
||||
mov [opcode_prefix],66h
|
||||
mov [base_code],0Fh
|
||||
mov [extended_code],38h
|
||||
mov [supplemental_code],2Ah
|
||||
mov [supplemental_code],al
|
||||
lods byte [esi]
|
||||
call get_size_operator
|
||||
cmp al,10h
|
||||
@ -5979,11 +5896,7 @@ crc32_instruction:
|
||||
crc32_reg32_mem_store:
|
||||
jmp instruction_ready
|
||||
crc32_unknown_size:
|
||||
cmp [error_line],0
|
||||
jne crc32_reg32_mem_store
|
||||
mov eax,[current_line]
|
||||
mov [error_line],eax
|
||||
mov [error],operand_size_not_specified
|
||||
call recoverable_unknown_size
|
||||
jmp crc32_reg32_mem_store
|
||||
crc32_reg32_reg:
|
||||
lods byte [esi]
|
||||
@ -6301,6 +6214,8 @@ rdrand_instruction:
|
||||
call operand_autodetect
|
||||
jmp nomem_instruction_ready
|
||||
rdfsbase_instruction:
|
||||
cmp [code_type],64
|
||||
jne illegal_instruction
|
||||
mov [opcode_prefix],0F3h
|
||||
mov [base_code],0Fh
|
||||
mov [extended_code],0AEh
|
||||
@ -6318,6 +6233,70 @@ rdfsbase_instruction:
|
||||
call operand_autodetect
|
||||
jmp nomem_instruction_ready
|
||||
|
||||
xabort_instruction:
|
||||
lods byte [esi]
|
||||
call get_size_operator
|
||||
cmp ah,1
|
||||
ja invalid_operand_size
|
||||
cmp al,'('
|
||||
jne invalid_operand
|
||||
call get_byte_value
|
||||
mov dl,al
|
||||
mov ax,0F8C6h
|
||||
stos word [edi]
|
||||
mov al,dl
|
||||
stos byte [edi]
|
||||
jmp instruction_assembled
|
||||
xbegin_instruction:
|
||||
lods byte [esi]
|
||||
cmp al,'('
|
||||
jne invalid_operand
|
||||
mov al,[code_type]
|
||||
cmp al,64
|
||||
je xbegin_64bit
|
||||
cmp al,32
|
||||
je xbegin_32bit
|
||||
xbegin_16bit:
|
||||
call get_address_word_value
|
||||
add edi,4
|
||||
call calculate_relative_offset
|
||||
sub edi,4
|
||||
shl eax,16
|
||||
mov ax,0F8C7h
|
||||
stos dword [edi]
|
||||
jmp instruction_assembled
|
||||
xbegin_32bit:
|
||||
call get_address_dword_value
|
||||
jmp xbegin_address_ok
|
||||
xbegin_64bit:
|
||||
call get_address_qword_value
|
||||
xbegin_address_ok:
|
||||
add edi,5
|
||||
call calculate_relative_offset
|
||||
sub edi,5
|
||||
mov edx,eax
|
||||
cwde
|
||||
cmp eax,edx
|
||||
jne xbegin_rel32
|
||||
mov al,66h
|
||||
stos byte [edi]
|
||||
mov eax,edx
|
||||
shl eax,16
|
||||
mov ax,0F8C7h
|
||||
stos dword [edi]
|
||||
jmp instruction_assembled
|
||||
xbegin_rel32:
|
||||
sub edx,1
|
||||
jno xbegin_rel32_ok
|
||||
cmp [code_type],64
|
||||
je relative_jump_out_of_range
|
||||
xbegin_rel32_ok:
|
||||
mov ax,0F8C7h
|
||||
stos word [edi]
|
||||
mov eax,edx
|
||||
stos dword [edi]
|
||||
jmp instruction_assembled
|
||||
|
||||
convert_register:
|
||||
mov ah,al
|
||||
shr ah,4
|
||||
@ -6456,11 +6435,7 @@ get_address:
|
||||
cdq
|
||||
cmp edx,[address_high]
|
||||
je address_high_ok
|
||||
cmp [error_line],0
|
||||
jne address_high_ok
|
||||
mov ebx,[current_line]
|
||||
mov [error_line],ebx
|
||||
mov [error],value_out_of_range
|
||||
call recoverable_overflow
|
||||
address_high_ok:
|
||||
mov edx,eax
|
||||
ror ecx,16
|
||||
@ -6559,7 +6534,7 @@ store_instruction_code:
|
||||
cmp [code_type],64
|
||||
jne invalid_operand
|
||||
test al,0B0h
|
||||
jnz prefix_conflict
|
||||
jnz disallowed_combination_of_registers
|
||||
stos byte [edi]
|
||||
rex_prefix_ok:
|
||||
mov al,[base_code]
|
||||
@ -6617,13 +6592,11 @@ store_instruction:
|
||||
test bx,8080h
|
||||
jz address_value_ok
|
||||
address_value_out_of_range:
|
||||
cmp [error_line],0
|
||||
jne address_value_ok
|
||||
mov edx,[current_line]
|
||||
mov [error_line],edx
|
||||
mov [error],value_out_of_range
|
||||
call recoverable_overflow
|
||||
address_value_ok:
|
||||
call store_segment_prefix_if_necessary
|
||||
test [vex_required],4
|
||||
jnz address_vsib
|
||||
or bx,bx
|
||||
jz address_immediate
|
||||
cmp bx,0F800h
|
||||
@ -6733,6 +6706,22 @@ store_instruction:
|
||||
or al,cl
|
||||
stos byte [edi]
|
||||
ret
|
||||
address_vsib:
|
||||
mov al,bl
|
||||
shr al,4
|
||||
cmp al,0Ch
|
||||
je vector_index_ok
|
||||
cmp al,0Dh
|
||||
jne invalid_address
|
||||
vector_index_ok:
|
||||
mov al,bh
|
||||
shr al,4
|
||||
cmp al,4
|
||||
je postbyte_32bit
|
||||
cmp [code_type],64
|
||||
je address_prefix_ok
|
||||
test al,al
|
||||
jnz invalid_address
|
||||
postbyte_32bit:
|
||||
call address_32bit_prefix
|
||||
jmp address_prefix_ok
|
||||
@ -6779,6 +6768,7 @@ store_instruction:
|
||||
or ah,bl
|
||||
and bh,111b
|
||||
or ah,bh
|
||||
sib_ready:
|
||||
test ch,44h
|
||||
jnz sib_address_32bit_value
|
||||
test ch,88h
|
||||
|
Loading…
Reference in New Issue
Block a user