* support far references in second_cmp32bit for i8086

git-svn-id: trunk@24736 -
This commit is contained in:
nickysn 2013-06-01 17:51:18 +00:00
parent c9c882c30a
commit 1e8b192b3d

View File

@ -556,10 +556,17 @@ interface
begin
tcgx86(cg).make_simple_ref(current_asmdata.CurrAsmList,right.location.reference);
href:=right.location.reference;
if (href.segment<>NR_NO) and (not is_segment_reg(href.segment)) then
begin
current_asmdata.CurrAsmList.concat(taicpu.op_reg(A_PUSH,S_W,href.segment));
current_asmdata.CurrAsmList.concat(taicpu.op_reg(A_POP,S_W,NR_ES));
href.segment:=NR_ES;
end;
inc(href.offset,2);
emit_ref_reg(A_CMP,S_W,href,GetNextReg(left.location.register));
firstjmp32bitcmp;
emit_ref_reg(A_CMP,S_W,right.location.reference,left.location.register);
dec(href.offset,2);
emit_ref_reg(A_CMP,S_W,href,left.location.register);
secondjmp32bitcmp;
cg.a_jmp_always(current_asmdata.CurrAsmList,current_procinfo.CurrFalseLabel);
location_freetemp(current_asmdata.CurrAsmList,right.location);