diff --git a/programs/develop/fasm/trunk/WHATSNEW.TXT b/programs/develop/fasm/trunk/WHATSNEW.TXT index 2df13d5ea7..79ddb17870 100644 --- a/programs/develop/fasm/trunk/WHATSNEW.TXT +++ b/programs/develop/fasm/trunk/WHATSNEW.TXT @@ -2,9 +2,23 @@ Visit http://flatassembler.net/ for more information. +version 1.70.03 (Jun 29, 2012) + +[-] Allowed to freely upgrade or downgrade the relocatable addresses in + object format between the 32-bit or 64-bit size. + + +version 1.70.02 (May 22, 2012) + +[-] Corrected the optimization of segment prefixes when the extended syntax + of some string instructions ("cmps", "lods", "movs" and "outs") is + used in long mode. Now it is consistent with optimizations done with + all the other instructions. + + version 1.70.01 (Apr 30, 2012) -[-] Corrected a recently introduced bug that caused some incorrect +[-] Corrected a recently introduced bug that caused some illegal address expressions to cause an error prematurely during the parsing stage. @@ -19,7 +33,7 @@ version 1.70 (Apr 17, 2012) [+] Extended the syntax of "rept" directive to allow numerical expressions to be calculated by preprocessor in its arguments. -[+] Added "large" and "NX" settings from PE format. +[+] Added "large" and "NX" settings for PE format. [+] Allowed PE fixups to be resolved anywhere in the generated executable. diff --git a/programs/develop/fasm/trunk/exprcalc.inc b/programs/develop/fasm/trunk/exprcalc.inc index dd0414a7a1..633c91f061 100644 --- a/programs/develop/fasm/trunk/exprcalc.inc +++ b/programs/develop/fasm/trunk/exprcalc.inc @@ -1560,18 +1560,18 @@ get_address_value: or [address_size],al shr al,4 or ah,ah - jz address_size_ok - cmp al,ah - je address_size_ok - cmp ax,0804h - jne address_sizes_do_not_agree - cmp [value_type],2 - ja value_type_correction_ok - mov [value_type],2 - value_type_correction_ok: - mov eax,[edi] - cdq - cmp edx,[edi+4] + jz address_size_ok + cmp al,ah + je address_size_ok + cmp ax,0408h + je address_sizes_mixed + cmp ax,0804h + jne address_sizes_do_not_agree + address_sizes_mixed: + mov [value_type],2 + mov eax,[edi] + cdq + cmp edx,[edi+4] je address_size_ok cmp [error_line],0 jne address_size_ok @@ -1802,7 +1802,10 @@ calculate_relative_offset: jnz relative_offset_unallowed cmp bl,6 je plt_relative_offset - cmp bl,[labels_type] + mov bh,[labels_type] + cmp bl,bh + je set_relative_offset_type + cmp bx,0402h je set_relative_offset_type relative_offset_unallowed: call recoverable_misuse diff --git a/programs/develop/fasm/trunk/version.inc b/programs/develop/fasm/trunk/version.inc index 6903edad72..18fd49c9d0 100644 --- a/programs/develop/fasm/trunk/version.inc +++ b/programs/develop/fasm/trunk/version.inc @@ -33,7 +33,7 @@ ; cannot simply be copied and put under another distribution licence ; (including the GNU Public Licence). -VERSION_STRING equ "1.70.01" +VERSION_STRING equ "1.70.03" VERSION_MAJOR = 1 VERSION_MINOR = 70 diff --git a/programs/develop/fasm/trunk/x86_64.inc b/programs/develop/fasm/trunk/x86_64.inc index 8f91dd2371..bc7954eef3 100644 --- a/programs/develop/fasm/trunk/x86_64.inc +++ b/programs/develop/fasm/trunk/x86_64.inc @@ -3312,10 +3312,8 @@ movs_instruction: je invalid_address_size call address_16bit_prefix movs_store: - cmp [segment_register],4 - je movs_segment_ok - call store_segment_prefix - movs_segment_ok: + xor ebx,ebx + call store_segment_prefix_if_necessary mov al,0A4h movs_check_size: mov bl,[operand_size] @@ -3359,10 +3357,8 @@ lods_instruction: je invalid_address_size call address_16bit_prefix lods_store: - cmp [segment_register],4 - je lods_segment_ok - call store_segment_prefix - lods_segment_ok: + xor ebx,ebx + call store_segment_prefix_if_necessary mov al,0ACh jmp movs_check_size stos_instruction: @@ -3452,10 +3448,8 @@ cmps_instruction: je invalid_address_size call address_16bit_prefix cmps_store: - cmp [segment_register],4 - je cmps_segment_ok - call store_segment_prefix - cmps_segment_ok: + xor ebx,ebx + call store_segment_prefix_if_necessary mov al,0A6h jmp movs_check_size ins_instruction: @@ -3537,10 +3531,8 @@ outs_instruction: je invalid_address_size call address_16bit_prefix outs_store: - cmp [segment_register],4 - je outs_segment_ok - call store_segment_prefix - outs_segment_ok: + xor ebx,ebx + call store_segment_prefix_if_necessary mov al,6Eh jmp ins_check_size xlat_instruction: @@ -6880,6 +6872,8 @@ store_instruction: je address_immediate_sib test ch,44h jnz address_immediate_32bit + test ch,88h + jnz address_immediate_32bit test ch,22h jnz address_immediate_16bit or ch,ch