mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 13:29:14 +02:00
* converted unit initialization to compilerproc/hlcg
git-svn-id: branches/hlcgllvm@26028 -
This commit is contained in:
parent
9c97f10d57
commit
cd92791d09
@ -2778,7 +2778,7 @@ implementation
|
|||||||
var
|
var
|
||||||
tmpreg: tregister;
|
tmpreg: tregister;
|
||||||
begin
|
begin
|
||||||
tmpreg:=getintregister(list,size);
|
tmpreg:=getregisterfordef(list,size);
|
||||||
a_load_const_reg(list,size,a,tmpreg);
|
a_load_const_reg(list,size,a,tmpreg);
|
||||||
a_cmp_reg_reg_label(list,size,cmp_op,tmpreg,reg,l);
|
a_cmp_reg_reg_label(list,size,cmp_op,tmpreg,reg,l);
|
||||||
end;
|
end;
|
||||||
@ -2787,7 +2787,7 @@ implementation
|
|||||||
var
|
var
|
||||||
tmpreg: tregister;
|
tmpreg: tregister;
|
||||||
begin
|
begin
|
||||||
tmpreg:=getintregister(list,size);
|
tmpreg:=getregisterfordef(list,size);
|
||||||
a_load_ref_reg(list,size,size,ref,tmpreg);
|
a_load_ref_reg(list,size,size,ref,tmpreg);
|
||||||
a_cmp_const_reg_label(list,size,cmp_op,a,tmpreg,l);
|
a_cmp_const_reg_label(list,size,cmp_op,a,tmpreg,l);
|
||||||
end;
|
end;
|
||||||
@ -4035,19 +4035,14 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TODO: create high level version (create compilerprocs in system unit,
|
|
||||||
look up procdef, use hlcgobj.a_call_name()) }
|
|
||||||
|
|
||||||
{ call startup helpers from main program }
|
{ call startup helpers from main program }
|
||||||
if (current_procinfo.procdef.proctypeoption=potype_proginit) then
|
if (current_procinfo.procdef.proctypeoption=potype_proginit) then
|
||||||
begin
|
begin
|
||||||
{ initialize units }
|
{ initialize units }
|
||||||
cg.allocallcpuregisters(list);
|
|
||||||
if not(current_module.islibrary) then
|
if not(current_module.islibrary) then
|
||||||
cg.a_call_name(list,'FPC_INITIALIZEUNITS',false)
|
g_call_system_proc(list,'fpc_initializeunits',nil)
|
||||||
else
|
else
|
||||||
cg.a_call_name(list,'FPC_LIBINITIALIZEUNITS',false);
|
g_call_system_proc(list,'fpc_libinitializeunits',nil);
|
||||||
cg.deallocallcpuregisters(list);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
list.concat(Tai_force_line.Create);
|
list.concat(Tai_force_line.Create);
|
||||||
|
@ -667,6 +667,7 @@ procedure fpc_stackcheck(stack_size:SizeUInt); compilerproc;
|
|||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
procedure fpc_InitializeUnits; compilerproc;
|
procedure fpc_InitializeUnits; compilerproc;
|
||||||
|
procedure fpc_LibInitializeUnits;compilerproc;
|
||||||
// not generated by compiler, called directly in system unit
|
// not generated by compiler, called directly in system unit
|
||||||
// procedure fpc_FinalizeUnits; compilerproc;
|
// procedure fpc_FinalizeUnits; compilerproc;
|
||||||
|
|
||||||
|
@ -879,7 +879,7 @@ end;
|
|||||||
|
|
||||||
procedure internal_initializeunits; external name 'FPC_INITIALIZEUNITS';
|
procedure internal_initializeunits; external name 'FPC_INITIALIZEUNITS';
|
||||||
|
|
||||||
procedure fpc_LibInitializeUnits;[public,alias:'FPC_LIBINITIALIZEUNITS'];
|
procedure fpc_LibInitializeUnits;[public,alias:'FPC_LIBINITIALIZEUNITS'];compilerproc;
|
||||||
begin
|
begin
|
||||||
{$ifdef FPC_HAS_FEATURE_DYNLIBS}
|
{$ifdef FPC_HAS_FEATURE_DYNLIBS}
|
||||||
IsLibrary:=true;
|
IsLibrary:=true;
|
||||||
|
@ -632,6 +632,7 @@ procedure fpc_stackcheck(stack_size:SizeUInt); compilerproc;
|
|||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
procedure fpc_InitializeUnits; compilerproc;
|
procedure fpc_InitializeUnits; compilerproc;
|
||||||
|
procedure fpc_LibInitializeUnits;compilerproc;
|
||||||
// not generated by compiler, called directly in system unit
|
// not generated by compiler, called directly in system unit
|
||||||
// procedure fpc_FinalizeUnits; compilerproc;
|
// procedure fpc_FinalizeUnits; compilerproc;
|
||||||
|
|
||||||
|
@ -878,7 +878,7 @@ end;
|
|||||||
|
|
||||||
procedure internal_initializeunits; external name 'FPC_INITIALIZEUNITS';
|
procedure internal_initializeunits; external name 'FPC_INITIALIZEUNITS';
|
||||||
|
|
||||||
procedure fpc_LibInitializeUnits;[public,alias:'FPC_LIBINITIALIZEUNITS'];
|
procedure fpc_LibInitializeUnits;[public,alias:'FPC_LIBINITIALIZEUNITS'];compilerproc;
|
||||||
begin
|
begin
|
||||||
{$ifdef FPC_HAS_FEATURE_DYNLIBS}
|
{$ifdef FPC_HAS_FEATURE_DYNLIBS}
|
||||||
IsLibrary:=true;
|
IsLibrary:=true;
|
||||||
|
Loading…
Reference in New Issue
Block a user