mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 00:29:33 +02:00
* Removed inline for procedures with assembler or formal parameters, since inline is not supported for them (compiler warns about that now). Even if there is no inline modifier in interface declaration of procedure, it is possible to specify inline in procedure implementation if needed (e.g. for generic implementations) and inlining will work for them.
git-svn-id: trunk@10629 -
This commit is contained in:
parent
0399268e0a
commit
5dc6e54925
@ -71,14 +71,14 @@ end;
|
||||
|
||||
{$IFNDEF INTERNAL_BACKTRACE}
|
||||
{$define FPC_SYSTEM_HAS_GET_FRAME}
|
||||
function get_frame:pointer;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
function get_frame:pointer;assembler;nostackframe;
|
||||
asm
|
||||
mov r0,r11
|
||||
end;
|
||||
{$ENDIF not INTERNAL_BACKTRACE}
|
||||
|
||||
{$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
|
||||
function get_caller_addr(framebp:pointer):pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
function get_caller_addr(framebp:pointer):pointer;assembler;
|
||||
asm
|
||||
movs r0,r0
|
||||
beq .Lg_a_null
|
||||
@ -88,7 +88,7 @@ end;
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_GET_CALLER_FRAME}
|
||||
function get_caller_frame(framebp:pointer):pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
function get_caller_frame(framebp:pointer):pointer;assembler;
|
||||
asm
|
||||
movs r0,r0
|
||||
beq .Lgnf_null
|
||||
@ -98,7 +98,7 @@ end;
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_SPTR}
|
||||
Function Sptr : pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function Sptr : pointer;assembler;
|
||||
asm
|
||||
mov r0,sp
|
||||
end;
|
||||
|
@ -1045,7 +1045,7 @@ end;
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
|
||||
function get_caller_addr(framebp:pointer):pointer;nostackframe;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
function get_caller_addr(framebp:pointer):pointer;nostackframe;assembler;
|
||||
asm
|
||||
{$ifndef REGCALL}
|
||||
movl framebp,%eax
|
||||
@ -1058,7 +1058,7 @@ end;
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_GET_CALLER_FRAME}
|
||||
function get_caller_frame(framebp:pointer):pointer;nostackframe;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
function get_caller_frame(framebp:pointer):pointer;nostackframe;assembler;
|
||||
asm
|
||||
{$ifndef REGCALL}
|
||||
movl framebp,%eax
|
||||
@ -1071,7 +1071,7 @@ end;
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_SPTR}
|
||||
Function Sptr : Pointer;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function Sptr : Pointer;assembler;nostackframe;
|
||||
asm
|
||||
movl %esp,%eax
|
||||
end;
|
||||
@ -1359,7 +1359,7 @@ const
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_SYSINITFPU}
|
||||
Procedure SysInitFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Procedure SysInitFPU;
|
||||
var
|
||||
{ these locals are so we don't have to hack pic code in the assembler }
|
||||
localmxcsr: dword;
|
||||
@ -1383,7 +1383,7 @@ Procedure SysInitFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_SYSRESETFPU}
|
||||
Procedure SysResetFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Procedure SysResetFPU;
|
||||
begin
|
||||
asm
|
||||
fnclex
|
||||
@ -1501,7 +1501,7 @@ end;
|
||||
{$ifndef FPC_SYSTEM_HAS_MEM_BARRIER}
|
||||
{$define FPC_SYSTEM_HAS_MEM_BARRIER}
|
||||
|
||||
procedure ReadBarrier;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
procedure ReadBarrier;assembler;nostackframe;
|
||||
asm
|
||||
lock
|
||||
addl $0,0(%esp)
|
||||
@ -1513,14 +1513,14 @@ begin
|
||||
{ reads imply barrier on earlier reads depended on }
|
||||
end;
|
||||
|
||||
procedure ReadWriteBarrier;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
procedure ReadWriteBarrier;assembler;nostackframe;
|
||||
asm
|
||||
lock
|
||||
addl $0,0(%esp)
|
||||
{ alternative: mfence on SSE capable CPUs }
|
||||
end;
|
||||
|
||||
procedure WriteBarrier;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
procedure WriteBarrier;assembler;nostackframe;
|
||||
asm
|
||||
{ no write reordering on intel CPUs (yet) }
|
||||
end;
|
||||
|
@ -239,7 +239,7 @@ Function fpc_AnsiStr_ShortStr_Compare (Var S1 : Pointer; Var S2 : ShortString):
|
||||
{ pointer argument because otherwise when calling this, we get
|
||||
an endless loop since a 'var s: ansistring' must be made
|
||||
unique as well }
|
||||
Function fpc_ansistr_Unique(Var S : Pointer): Pointer; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
||||
Function fpc_ansistr_Unique(Var S : Pointer): Pointer; compilerproc;
|
||||
{$endif FPC_HAS_FEATURE_ANSISTRINGS}
|
||||
|
||||
{$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
|
||||
|
@ -185,31 +185,31 @@ function do_isdevice(handle:thandle):boolean;forward;
|
||||
{$endif cpuavr}
|
||||
|
||||
|
||||
procedure fillchar(var x;count : SizeInt;value : boolean);{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
procedure fillchar(var x;count : SizeInt;value : boolean);
|
||||
begin
|
||||
fillchar(x,count,byte(value));
|
||||
end;
|
||||
|
||||
|
||||
procedure fillchar(var x;count : SizeInt;value : char);{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
procedure fillchar(var x;count : SizeInt;value : char);
|
||||
begin
|
||||
fillchar(x,count,byte(value));
|
||||
end;
|
||||
|
||||
|
||||
procedure FillByte (var x;count : SizeInt;value : byte ); {$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
procedure FillByte (var x;count : SizeInt;value : byte );
|
||||
begin
|
||||
FillChar (X,Count,VALUE);
|
||||
end;
|
||||
|
||||
|
||||
function IndexChar(Const buf;len:SizeInt;b:char):SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
function IndexChar(Const buf;len:SizeInt;b:char):SizeInt;
|
||||
begin
|
||||
IndexChar:=IndexByte(Buf,Len,byte(B));
|
||||
end;
|
||||
|
||||
|
||||
function CompareChar(Const buf1,buf2;len:SizeInt):SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
function CompareChar(Const buf1,buf2;len:SizeInt):SizeInt;
|
||||
begin
|
||||
CompareChar:=CompareByte(buf1,buf2,len);
|
||||
end;
|
||||
|
@ -474,29 +474,29 @@ ThreadVar
|
||||
{$endif}
|
||||
{$endif}
|
||||
|
||||
Procedure Move(const source;var dest;count:SizeInt);{$ifdef INLINEGENERICS}inline;{$endif}
|
||||
Procedure FillChar(var x;count:SizeInt;Value:Byte);{$ifdef INLINEGENERICS}inline;{$endif}
|
||||
Procedure FillChar(var x;count:SizeInt;Value:Boolean);{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Procedure FillChar(var x;count:SizeInt;Value:Char);{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
procedure FillByte(var x;count:SizeInt;value:byte);{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Procedure Move(const source;var dest;count:SizeInt);
|
||||
Procedure FillChar(var x;count:SizeInt;Value:Byte);
|
||||
Procedure FillChar(var x;count:SizeInt;Value:Boolean);
|
||||
Procedure FillChar(var x;count:SizeInt;Value:Char);
|
||||
procedure FillByte(var x;count:SizeInt;value:byte);
|
||||
Procedure FillWord(var x;count:SizeInt;Value:Word);
|
||||
procedure FillDWord(var x;count:SizeInt;value:DWord);
|
||||
function IndexChar(const buf;len:SizeInt;b:char):SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
function IndexByte(const buf;len:SizeInt;b:byte):SizeInt;{$ifdef INLINEGENERICS}inline;{$endif}
|
||||
function IndexChar(const buf;len:SizeInt;b:char):SizeInt;
|
||||
function IndexByte(const buf;len:SizeInt;b:byte):SizeInt;
|
||||
function Indexword(const buf;len:SizeInt;b:word):SizeInt;
|
||||
function IndexDWord(const buf;len:SizeInt;b:DWord):SizeInt;
|
||||
function CompareChar(const buf1,buf2;len:SizeInt):SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
function CompareByte(const buf1,buf2;len:SizeInt):SizeInt;{$ifdef INLINEGENERICS}inline;{$endif}
|
||||
function CompareChar(const buf1,buf2;len:SizeInt):SizeInt;
|
||||
function CompareByte(const buf1,buf2;len:SizeInt):SizeInt;
|
||||
function CompareWord(const buf1,buf2;len:SizeInt):SizeInt;
|
||||
function CompareDWord(const buf1,buf2;len:SizeInt):SizeInt;
|
||||
procedure MoveChar0(const buf1;var buf2;len:SizeInt);
|
||||
function IndexChar0(const buf;len:SizeInt;b:char):SizeInt;
|
||||
function CompareChar0(const buf1,buf2;len:SizeInt):SizeInt;{$ifdef INLINEGENERICS}inline;{$endif}
|
||||
function CompareChar0(const buf1,buf2;len:SizeInt):SizeInt;
|
||||
procedure prefetch(const mem);[internproc:fpc_in_prefetch_var];
|
||||
procedure ReadBarrier;{$ifdef INLINEGENERICS}inline;{$endif}
|
||||
procedure ReadDependencyBarrier;{$ifdef INLINEGENERICS}inline;{$endif}
|
||||
procedure ReadWriteBarrier;{$ifdef INLINEGENERICS}inline;{$endif}
|
||||
procedure WriteBarrier;{$ifdef INLINEGENERICS}inline;{$endif}
|
||||
procedure ReadBarrier;
|
||||
procedure ReadDependencyBarrier;
|
||||
procedure ReadWriteBarrier;
|
||||
procedure WriteBarrier;
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
@ -780,11 +780,11 @@ function get_caller_frame(framebp:pointer):pointer;[INTERNPROC:fpc_in_get_caller
|
||||
function get_frame:pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
{$ENDIF}
|
||||
|
||||
function get_caller_addr(framebp:pointer):pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
function get_caller_frame(framebp:pointer):pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
function get_caller_addr(framebp:pointer):pointer;
|
||||
function get_caller_frame(framebp:pointer):pointer;
|
||||
|
||||
Function IOResult:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function Sptr:Pointer;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_ptr];
|
||||
Function Sptr:Pointer;[internconst:fpc_in_const_ptr];
|
||||
|
||||
{$ifdef FPC_HAS_FEATURE_PROCESSES}
|
||||
Function GetProcessID:SizeUInt;
|
||||
@ -873,8 +873,8 @@ Procedure SysInitExceptions;
|
||||
procedure SysInitStdIO;
|
||||
{$endif FPC_HAS_FEATURE_CONSOLEIO}
|
||||
{$ifndef FPUNONE}
|
||||
Procedure SysResetFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Procedure SysInitFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Procedure SysResetFPU;
|
||||
Procedure SysInitFPU;
|
||||
{$endif}
|
||||
|
||||
{*****************************************************************************
|
||||
|
@ -216,7 +216,7 @@ function MessageBox(w1:longint;l1,l2:PWideChar;w2:longint):longint;
|
||||
procedure memmove(dest, src: pointer; count: longint);
|
||||
cdecl; external 'coredll' name 'memmove';
|
||||
|
||||
procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE']; {$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE'];
|
||||
begin
|
||||
if count > 0 then
|
||||
memmove(@dest, @source, count);
|
||||
@ -226,7 +226,7 @@ end;
|
||||
function memcmp(buf1, buf2: pointer; count: longint): longint;
|
||||
cdecl; external 'coredll' name 'memcmp';
|
||||
|
||||
function CompareByte(Const buf1,buf2;len:SizeInt):SizeInt; {$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
function CompareByte(Const buf1,buf2;len:SizeInt):SizeInt;
|
||||
begin
|
||||
CompareByte := memcmp(@buf1, @buf2, len);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user