* Tcgx86.g_concatcopy: optimization for the case where source.segment is

specified, but equal to DS in the current memory model

git-svn-id: trunk@27720 -
This commit is contained in:
nickysn 2014-05-02 13:07:54 +00:00
parent 1004c8db6f
commit 6e7dd647fd

View File

@ -2552,10 +2552,12 @@ unit cgx86;
list.concat(taicpu.op_reg(A_POP,push_segment_size,NR_ES));
end;
getcpuregister(list,REGSI);
if (source.segment=NR_NO) and
(segment_regs_equal(NR_SS,NR_DS) or ((source.base<>NR_BP) and (source.base<>NR_SP))) then
if ((source.segment=NR_NO) and (segment_regs_equal(NR_SS,NR_DS) or ((source.base<>NR_BP) and (source.base<>NR_SP)))) or
(is_segment_reg(source.segment) and segment_regs_equal(source.segment,NR_DS)) then
begin
a_loadaddr_ref_reg(list,source,REGSI);
srcref:=source;
srcref.segment:=NR_NO;
a_loadaddr_ref_reg(list,srcref,REGSI);
saved_ds:=false;
end
else