+ added check if the selected cpu is 386+ when writing a 66h or 67h prefix in

the i8086 internal object writer. This allows weeding out spurious 386
  instructions, as is similarly done by NASM when using it as an external
  assembler.

git-svn-id: trunk@32871 -
This commit is contained in:
nickysn 2016-01-07 15:40:32 +00:00
parent 114c76bc4a
commit a508f9e5d3
4 changed files with 328 additions and 317 deletions

View File

@ -2772,7 +2772,7 @@ asmr_e_invalid_code_value=07129_E_Invalid value of .code directive constant
# #
# Assembler/binary writers # Assembler/binary writers
# #
# 08031 is the last used one # 08032 is the last used one
# #
asmw_f_too_many_asm_files=08000_F_Too many assembler files asmw_f_too_many_asm_files=08000_F_Too many assembler files
% With smartlinking enabled, there are too many assembler % With smartlinking enabled, there are too many assembler
@ -2825,6 +2825,7 @@ asmw_h_changing_bind_type=08028_H_Change of bind type of symbol $1 from $2 to $3
asmw_e_32bit_not_supported=08029_E_Asm: 32 Bit references not supported asmw_e_32bit_not_supported=08029_E_Asm: 32 Bit references not supported
asmw_f_code_segment_too_large=08030_F_Code segment too large asmw_f_code_segment_too_large=08030_F_Code segment too large
asmw_f_data_segment_too_large=08031_F_Data segment too large asmw_f_data_segment_too_large=08031_F_Data segment too large
asmw_e_instruction_not_supported_by_cpu=08032_E_Instruction not supported by the selected instruction set
# #
# Executing linker/assembler # Executing linker/assembler
# #

View File

@ -834,6 +834,7 @@ const
asmw_e_32bit_not_supported=08029; asmw_e_32bit_not_supported=08029;
asmw_f_code_segment_too_large=08030; asmw_f_code_segment_too_large=08030;
asmw_f_data_segment_too_large=08031; asmw_f_data_segment_too_large=08031;
asmw_e_instruction_not_supported_by_cpu=08032;
exec_w_source_os_redefined=09000; exec_w_source_os_redefined=09000;
exec_i_assembling_pipe=09001; exec_i_assembling_pipe=09001;
exec_d_cant_create_asmfile=09002; exec_d_cant_create_asmfile=09002;
@ -1024,9 +1025,9 @@ const
option_info=11024; option_info=11024;
option_help_pages=11025; option_help_pages=11025;
MsgTxtSize = 76577; MsgTxtSize = 76643;
MsgIdxMax : array[1..20] of longint=( MsgIdxMax : array[1..20] of longint=(
27,99,344,124,96,58,130,32,208,64, 27,99,344,124,96,58,130,33,208,64,
58,20,1,1,1,1,1,1,1,1 58,20,1,1,1,1,1,1,1,1
); );

File diff suppressed because it is too large Load Diff

View File

@ -2626,6 +2626,10 @@ implementation
const const
b66: Byte=$66; b66: Byte=$66;
begin begin
{$ifdef i8086}
if current_settings.cputype<cpu_386 then
Message(asmw_e_instruction_not_supported_by_cpu);
{$endif i8086}
objdata.writebytes(b66,1); objdata.writebytes(b66,1);
end; end;
@ -2633,6 +2637,10 @@ implementation
const const
b67: Byte=$67; b67: Byte=$67;
begin begin
{$ifdef i8086}
if current_settings.cputype<cpu_386 then
Message(asmw_e_instruction_not_supported_by_cpu);
{$endif i8086}
objdata.writebytes(b67,1); objdata.writebytes(b67,1);
end; end;