mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 10:29:17 +02:00
+ fixed tcgtypeconvnode.second_class_to_intf for i8086 far data memory models
git-svn-id: trunk@27692 -
This commit is contained in:
parent
3df0c06293
commit
4ab9c6f206
@ -682,19 +682,19 @@ interface
|
|||||||
ImplIntf : TImplementedInterface;
|
ImplIntf : TImplementedInterface;
|
||||||
begin
|
begin
|
||||||
l1:=nil;
|
l1:=nil;
|
||||||
location_reset(location,LOC_REGISTER,OS_ADDR);
|
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
|
||||||
case left.location.loc of
|
case left.location.loc of
|
||||||
LOC_CREFERENCE,
|
LOC_CREFERENCE,
|
||||||
LOC_REFERENCE:
|
LOC_REFERENCE:
|
||||||
begin
|
begin
|
||||||
location.register:=cg.getaddressregister(current_asmdata.CurrAsmList);
|
location.register:=hlcg.getaddressregister(current_asmdata.CurrAsmList,resultdef);
|
||||||
cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,left.location.reference,location.register);
|
hlcg.a_load_ref_reg(current_asmdata.CurrAsmList,left.resultdef,resultdef,left.location.reference,location.register);
|
||||||
location_freetemp(current_asmdata.CurrAsmList,left.location);
|
location_freetemp(current_asmdata.CurrAsmList,left.location);
|
||||||
end;
|
end;
|
||||||
LOC_CREGISTER:
|
LOC_CREGISTER:
|
||||||
begin
|
begin
|
||||||
location.register:=cg.getaddressregister(current_asmdata.CurrAsmList);
|
location.register:=hlcg.getaddressregister(current_asmdata.CurrAsmList,resultdef);
|
||||||
cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,left.location.register,location.register);
|
hlcg.a_load_reg_reg(current_asmdata.CurrAsmList,left.resultdef,resultdef,left.location.register,location.register);
|
||||||
end;
|
end;
|
||||||
LOC_REGISTER:
|
LOC_REGISTER:
|
||||||
location.register:=left.location.register;
|
location.register:=left.location.register;
|
||||||
@ -711,7 +711,10 @@ interface
|
|||||||
etStandard:
|
etStandard:
|
||||||
begin
|
begin
|
||||||
current_asmdata.getjumplabel(l1);
|
current_asmdata.getjumplabel(l1);
|
||||||
cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,OS_ADDR,OC_EQ,0,location.register,l1);
|
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,resultdef,OC_EQ,0,location.register,l1);
|
||||||
|
{ todo: consider adding far pointer support to hlcg.a_op_const_reg for i8086 (i.e. perform the
|
||||||
|
arithmetic operation only on the offset), then the next line can be converted to the
|
||||||
|
high level code generator as well }
|
||||||
cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_ADD,OS_ADDR,ImplIntf.ioffset,location.register);
|
cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_ADD,OS_ADDR,ImplIntf.ioffset,location.register);
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user