mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-15 05:20:45 +01:00
* maybe_testvmt added
This commit is contained in:
parent
2b0e576cbe
commit
a3c3fb9282
@ -41,7 +41,7 @@ unit cgobj;
|
|||||||
cclasses,aasmbase,aasmtai,aasmcpu,symtable,
|
cclasses,aasmbase,aasmtai,aasmcpu,symtable,
|
||||||
cpubase,cpuinfo,cpupara,
|
cpubase,cpuinfo,cpupara,
|
||||||
cginfo,
|
cginfo,
|
||||||
symconst,symbase,symtype,node
|
symconst,symbase,symtype,symdef,node
|
||||||
{$ifdef delphi}
|
{$ifdef delphi}
|
||||||
,dmisc
|
,dmisc
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -304,7 +304,8 @@ unit cgobj;
|
|||||||
|
|
||||||
|
|
||||||
procedure g_maybe_loadself(list : taasmoutput);virtual;
|
procedure g_maybe_loadself(list : taasmoutput);virtual;
|
||||||
procedure g_maybe_testself(list : taasmoutput);virtual;
|
procedure g_maybe_testself(list : taasmoutput;reg:tregister);
|
||||||
|
procedure g_maybe_testvmt(list : taasmoutput;reg:tregister;objdef:tobjectdef);
|
||||||
{# This should emit the opcode to copy len bytes from the source
|
{# This should emit the opcode to copy len bytes from the source
|
||||||
to destination, if loadref is true, it assumes that it first must load
|
to destination, if loadref is true, it assumes that it first must load
|
||||||
the source address from the memory location where
|
the source address from the memory location where
|
||||||
@ -499,7 +500,7 @@ unit cgobj;
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
globals,globtype,options,systems,cgbase,
|
globals,globtype,options,systems,cgbase,
|
||||||
verbose,defutil,tgobj,symdef,paramgr,
|
verbose,defutil,tgobj,paramgr,
|
||||||
rgobj,cutils;
|
rgobj,cutils;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -1464,7 +1465,7 @@ unit cgobj;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcg.g_maybe_testself(list : taasmoutput);
|
procedure tcg.g_maybe_testself(list : taasmoutput;reg:tregister);
|
||||||
var
|
var
|
||||||
OKLabel : tasmlabel;
|
OKLabel : tasmlabel;
|
||||||
dummyloc : tparalocation;
|
dummyloc : tparalocation;
|
||||||
@ -1483,6 +1484,26 @@ unit cgobj;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure tcg.g_maybe_testvmt(list : taasmoutput;reg:tregister;objdef:tobjectdef);
|
||||||
|
var
|
||||||
|
hrefvmt : treference;
|
||||||
|
begin
|
||||||
|
if (cs_check_object in aktlocalswitches) then
|
||||||
|
begin
|
||||||
|
reference_reset_symbol(hrefvmt,objectlibrary.newasmsymbol(objdef.vmt_mangledname),0);
|
||||||
|
a_paramaddr_ref(exprasmlist,hrefvmt,paramanager.getintparaloc(2));
|
||||||
|
a_param_reg(exprasmlist,OS_ADDR,reg,paramanager.getintparaloc(1));
|
||||||
|
a_call_name(exprasmlist,'FPC_CHECK_OBJECT_EXT');
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if (cs_check_range in aktlocalswitches) then
|
||||||
|
begin
|
||||||
|
a_param_reg(exprasmlist,OS_ADDR,reg,paramanager.getintparaloc(1));
|
||||||
|
a_call_name(exprasmlist,'FPC_CHECK_OBJECT');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
Entry/Exit Code Functions
|
Entry/Exit Code Functions
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
@ -1705,7 +1726,10 @@ finalization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.74 2003-01-17 12:45:40 daniel
|
Revision 1.75 2003-01-30 21:46:35 peter
|
||||||
|
* maybe_testvmt added
|
||||||
|
|
||||||
|
Revision 1.74 2003/01/17 12:45:40 daniel
|
||||||
* Fixed internalerror 200301081 problem
|
* Fixed internalerror 200301081 problem
|
||||||
|
|
||||||
Revision 1.73 2003/01/13 14:54:34 daniel
|
Revision 1.73 2003/01/13 14:54:34 daniel
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user