* support int register in treference.segment in tcg8086.a_load_const_ref; this fixes farptr^:=const

git-svn-id: trunk@24569 -
This commit is contained in:
nickysn 2013-05-24 13:36:22 +00:00
parent 0baa004571
commit 9171c19601

View File

@ -760,6 +760,13 @@ unit cgcpu;
tmpref:=ref;
make_simple_ref(list,tmpref);
if (tmpref.segment<>NR_NO) and (not is_segment_reg(tmpref.segment)) then
begin
list.concat(taicpu.op_reg(A_PUSH,S_W,tmpref.segment));
list.concat(taicpu.op_reg(A_POP,S_L,NR_ES));
tmpref.segment:=NR_ES;
end;
if tosize in [OS_S32,OS_32] then
begin
a_load_const_ref(list,OS_16,longint(a and $ffff),tmpref);