mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 11:28:06 +02:00
* converted tcgtypeconvnode.second_nil_to_methodprocvar to the high level code
generator, so it handles i8086 near and far pointers generically - removed t8086typeconvnode.second_nil_to_methodprocvar, since it's no longer necessary git-svn-id: trunk@27678 -
This commit is contained in:
parent
187c2af20e
commit
e8b9d9bf41
@ -36,7 +36,6 @@ interface
|
||||
protected
|
||||
function typecheck_proc_to_procvar: tnode;override;
|
||||
procedure second_proc_to_procvar;override;
|
||||
procedure second_nil_to_methodprocvar;override;
|
||||
end;
|
||||
|
||||
|
||||
@ -73,32 +72,6 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
procedure t8086typeconvnode.second_nil_to_methodprocvar;
|
||||
begin
|
||||
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
|
||||
if current_settings.x86memorymodel in x86_far_data_models then
|
||||
begin
|
||||
location.registerhi:=cg.getintregister(current_asmdata.currasmlist,OS_32);
|
||||
cg.a_load_const_reg(current_asmdata.currasmlist,OS_32,0,location.registerhi);
|
||||
end
|
||||
else
|
||||
begin
|
||||
location.registerhi:=cg.getaddressregister(current_asmdata.currasmlist);
|
||||
cg.a_load_const_reg(current_asmdata.currasmlist,OS_ADDR,0,location.registerhi);
|
||||
end;
|
||||
if (resultdef.typ=procvardef) and is_proc_far(tprocvardef(resultdef)) then
|
||||
begin
|
||||
location.register:=cg.getintregister(current_asmdata.currasmlist,OS_32);
|
||||
cg.a_load_const_reg(current_asmdata.currasmlist,OS_32,0,location.register);
|
||||
end
|
||||
else
|
||||
begin
|
||||
location.register:=cg.getaddressregister(current_asmdata.currasmlist);
|
||||
cg.a_load_const_reg(current_asmdata.currasmlist,OS_ADDR,0,location.register);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
begin
|
||||
ctypeconvnode:=t8086typeconvnode
|
||||
end.
|
||||
|
@ -583,10 +583,10 @@ interface
|
||||
procedure Tcgtypeconvnode.second_nil_to_methodprocvar;
|
||||
begin
|
||||
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
|
||||
location.registerhi:=cg.getaddressregister(current_asmdata.currasmlist);
|
||||
cg.a_load_const_reg(current_asmdata.currasmlist,OS_ADDR,0,location.registerhi);
|
||||
location.register:=cg.getaddressregister(current_asmdata.currasmlist);
|
||||
cg.a_load_const_reg(current_asmdata.currasmlist,OS_ADDR,0,location.register);
|
||||
location.registerhi:=hlcg.getaddressregister(current_asmdata.currasmlist,voidpointertype);
|
||||
hlcg.a_load_const_reg(current_asmdata.currasmlist,voidpointertype,0,location.registerhi);
|
||||
location.register:=hlcg.getaddressregister(current_asmdata.currasmlist,voidcodepointertype);
|
||||
hlcg.a_load_const_reg(current_asmdata.currasmlist,voidcodepointertype,0,location.register);
|
||||
end;
|
||||
|
||||
procedure tcgtypeconvnode.second_bool_to_int;
|
||||
|
Loading…
Reference in New Issue
Block a user