mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 07:46:00 +02:00
Add new procedure option: po_syscall_has_libsym,
include this option only of libsym field is non NIL. Use this option to only write redef of libsym if needed. Adapt ppudump source to this new procedure option. git-svn-id: trunk@28732 -
This commit is contained in:
parent
de42f2f2f7
commit
aa6b62cf4c
@ -186,14 +186,16 @@ implementation
|
|||||||
procedure tcpuprocdef.ppuload_platform(ppufile: tcompilerppufile);
|
procedure tcpuprocdef.ppuload_platform(ppufile: tcompilerppufile);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
ppufile.getderef(libsymderef);
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
ppufile.getderef(libsymderef);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcpuprocdef.ppuwrite_platform(ppufile: tcompilerppufile);
|
procedure tcpuprocdef.ppuwrite_platform(ppufile: tcompilerppufile);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
ppufile.putderef(libsymderef);
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
ppufile.putderef(libsymderef);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -208,14 +210,18 @@ implementation
|
|||||||
procedure tcpuprocdef.buildderef;
|
procedure tcpuprocdef.buildderef;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
libsymderef.build(libsym);
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
libsymderef.build(libsym);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcpuprocdef.deref;
|
procedure tcpuprocdef.deref;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
libsym:=tsym(libsymderef.resolve);
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
libsym:=tsym(libsymderef.resolve)
|
||||||
|
else
|
||||||
|
libsym:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -186,14 +186,16 @@ implementation
|
|||||||
procedure tcpuprocdef.ppuload_platform(ppufile: tcompilerppufile);
|
procedure tcpuprocdef.ppuload_platform(ppufile: tcompilerppufile);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
ppufile.getderef(libsymderef);
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
ppufile.getderef(libsymderef);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcpuprocdef.ppuwrite_platform(ppufile: tcompilerppufile);
|
procedure tcpuprocdef.ppuwrite_platform(ppufile: tcompilerppufile);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
ppufile.putderef(libsymderef);
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
ppufile.putderef(libsymderef);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -208,14 +210,18 @@ implementation
|
|||||||
procedure tcpuprocdef.buildderef;
|
procedure tcpuprocdef.buildderef;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
libsymderef.build(libsym);
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
libsymderef.build(libsym);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcpuprocdef.deref;
|
procedure tcpuprocdef.deref;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
libsym:=tsym(libsymderef.resolve);
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
libsym:=tsym(libsymderef.resolve)
|
||||||
|
else
|
||||||
|
libsym:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -1816,6 +1816,7 @@ begin
|
|||||||
is_32bitint(tabstractvarsym(sym).vardef)
|
is_32bitint(tabstractvarsym(sym).vardef)
|
||||||
) then
|
) then
|
||||||
begin
|
begin
|
||||||
|
include(pd.procoptions,po_syscall_has_libsym);
|
||||||
tcpuprocdef(pd).libsym:=sym;
|
tcpuprocdef(pd).libsym:=sym;
|
||||||
if po_syscall_legacy in tprocdef(pd).procoptions then
|
if po_syscall_legacy in tprocdef(pd).procoptions then
|
||||||
begin
|
begin
|
||||||
@ -1850,6 +1851,7 @@ begin
|
|||||||
is_32bitint(tabstractvarsym(sym).vardef)
|
is_32bitint(tabstractvarsym(sym).vardef)
|
||||||
) then
|
) then
|
||||||
begin
|
begin
|
||||||
|
include(pd.procoptions,po_syscall_has_libsym);
|
||||||
tcpuprocdef(pd).libsym:=sym;
|
tcpuprocdef(pd).libsym:=sym;
|
||||||
vs:=cparavarsym.create('$syscalllib',paranr_syscall_basesysv,vs_value,tabstractvarsym(sym).vardef,[vo_is_syscall_lib,vo_is_hidden_para]);
|
vs:=cparavarsym.create('$syscalllib',paranr_syscall_basesysv,vs_value,tabstractvarsym(sym).vardef,[vo_is_syscall_lib,vo_is_hidden_para]);
|
||||||
pd.parast.insert(vs);
|
pd.parast.insert(vs);
|
||||||
@ -1917,6 +1919,7 @@ begin
|
|||||||
is_32bitint(tabstractvarsym(sym).vardef)
|
is_32bitint(tabstractvarsym(sym).vardef)
|
||||||
) then
|
) then
|
||||||
begin
|
begin
|
||||||
|
include(pd.procoptions,po_syscall_has_libsym);
|
||||||
tcpuprocdef(pd).libsym:=sym;
|
tcpuprocdef(pd).libsym:=sym;
|
||||||
if po_syscall_legacy in tprocdef(pd).procoptions then
|
if po_syscall_legacy in tprocdef(pd).procoptions then
|
||||||
begin
|
begin
|
||||||
@ -1973,6 +1976,7 @@ begin
|
|||||||
is_32bitint(tabstractvarsym(sym).vardef)
|
is_32bitint(tabstractvarsym(sym).vardef)
|
||||||
) then
|
) then
|
||||||
begin
|
begin
|
||||||
|
include(pd.procoptions,po_syscall_has_libsym);
|
||||||
tcpuprocdef(pd).libsym:=sym;
|
tcpuprocdef(pd).libsym:=sym;
|
||||||
vs:=cparavarsym.create('$syscalllib',paranr_syscall_sysvbase,vs_value,tabstractvarsym(sym).vardef,[vo_is_syscall_lib,vo_is_hidden_para]);
|
vs:=cparavarsym.create('$syscalllib',paranr_syscall_sysvbase,vs_value,tabstractvarsym(sym).vardef,[vo_is_syscall_lib,vo_is_hidden_para]);
|
||||||
pd.parast.insert(vs);
|
pd.parast.insert(vs);
|
||||||
|
@ -186,14 +186,16 @@ implementation
|
|||||||
procedure tcpuprocdef.ppuload_platform(ppufile: tcompilerppufile);
|
procedure tcpuprocdef.ppuload_platform(ppufile: tcompilerppufile);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
ppufile.getderef(libsymderef);
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
ppufile.getderef(libsymderef);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcpuprocdef.ppuwrite_platform(ppufile: tcompilerppufile);
|
procedure tcpuprocdef.ppuwrite_platform(ppufile: tcompilerppufile);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
ppufile.putderef(libsymderef);
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
ppufile.putderef(libsymderef);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -208,14 +210,18 @@ implementation
|
|||||||
procedure tcpuprocdef.buildderef;
|
procedure tcpuprocdef.buildderef;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
libsymderef.build(libsym);
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
libsymderef.build(libsym);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcpuprocdef.deref;
|
procedure tcpuprocdef.deref;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
libsym:=tsym(libsymderef.resolve);
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
libsym:=tsym(libsymderef.resolve)
|
||||||
|
else
|
||||||
|
libsym:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -309,6 +309,8 @@ type
|
|||||||
po_syscall_basesysv,
|
po_syscall_basesysv,
|
||||||
po_syscall_sysvbase,
|
po_syscall_sysvbase,
|
||||||
po_syscall_r12base,
|
po_syscall_r12base,
|
||||||
|
{ Used to record the fact that a symbol is asociated to this syscall }
|
||||||
|
po_syscall_has_libsym,
|
||||||
{ Procedure can be inlined }
|
{ Procedure can be inlined }
|
||||||
po_inline,
|
po_inline,
|
||||||
{ Procedure is used for internal compiler calls }
|
{ Procedure is used for internal compiler calls }
|
||||||
@ -461,7 +463,7 @@ type
|
|||||||
);
|
);
|
||||||
tobjectoptions=set of tobjectoption;
|
tobjectoptions=set of tobjectoption;
|
||||||
|
|
||||||
tarraydefoption=(
|
tarraydefoption=(
|
||||||
ado_IsConvertedPointer, // array created from pointer (e.g. PInteger(Ptr)[1])
|
ado_IsConvertedPointer, // array created from pointer (e.g. PInteger(Ptr)[1])
|
||||||
ado_IsDynamicArray, // dynamic array
|
ado_IsDynamicArray, // dynamic array
|
||||||
ado_IsVariant, //
|
ado_IsVariant, //
|
||||||
|
@ -1739,6 +1739,7 @@ const
|
|||||||
(mask:po_syscall_basesysv;str:'SyscallBaseSysV'),
|
(mask:po_syscall_basesysv;str:'SyscallBaseSysV'),
|
||||||
(mask:po_syscall_sysvbase;str:'SyscallSysVBase'),
|
(mask:po_syscall_sysvbase;str:'SyscallSysVBase'),
|
||||||
(mask:po_syscall_r12base; str:'SyscallR12Base'),
|
(mask:po_syscall_r12base; str:'SyscallR12Base'),
|
||||||
|
(mask:po_syscall_has_libsym; str:'Has LibSym'),
|
||||||
(mask:po_inline; str:'Inline'),
|
(mask:po_inline; str:'Inline'),
|
||||||
(mask:po_compilerproc; str:'CompilerProc'),
|
(mask:po_compilerproc; str:'CompilerProc'),
|
||||||
(mask:po_has_importdll; str:'HasImportDLL'),
|
(mask:po_has_importdll; str:'HasImportDLL'),
|
||||||
@ -1817,6 +1818,8 @@ begin
|
|||||||
i:=ppufile.getbyte;
|
i:=ppufile.getbyte;
|
||||||
ppufile.getdata(tempbuf,i);
|
ppufile.getdata(tempbuf,i);
|
||||||
end;
|
end;
|
||||||
|
if po_syscall_has_libsym in procoptions then
|
||||||
|
readderef(space);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user