mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:09:33 +02:00
+ Removed INTERNCONSTINTF define
git-svn-id: trunk@267 -
This commit is contained in:
parent
93ba0409be
commit
3a2eaa94b1
@ -14,7 +14,6 @@
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
{$define FPC_SYSTEM_HAS_ABS}
|
||||
function fpc_abs_real(d : extended) : extended;compilerproc;
|
||||
begin
|
||||
@ -72,27 +71,3 @@
|
||||
result:=0;
|
||||
end;
|
||||
}
|
||||
{$else INTERNCONSTINTF}
|
||||
{$define FPC_SYSTEM_HAS_ABS}
|
||||
function abs(d : extended) : extended;[internproc:in_abs_extended];
|
||||
{$define FPC_SYSTEM_HAS_SQR}
|
||||
function sqr(d : extended) : extended;[internproc:in_sqr_extended];
|
||||
{$define FPC_SYSTEM_HAS_SQRT}
|
||||
function sqrt(d : extended) : extended;[internproc:in_sqrt_extended];
|
||||
{ atn isn't supported by the linux fpe it seems
|
||||
{$define FPC_SYSTEM_HAS_ARCTAN}
|
||||
function arctan(d : extended) : extended;[internproc:in_arctan_extended];
|
||||
}
|
||||
{ lgn isn't supported by the linux fpe it seems
|
||||
{$define FPC_SYSTEM_HAS_LN}
|
||||
function ln(d : extended) : extended;[internproc:in_ln_extended];
|
||||
}
|
||||
{ sind isn't supported by the linux fpe it seems
|
||||
{$define FPC_SYSTEM_HAS_SIN}
|
||||
function sin(d : extended) : extended;[internproc:in_sin_extended];
|
||||
}
|
||||
{ cos isn't supported by the linux fpe it seems
|
||||
{$define FPC_SYSTEM_HAS_COS}
|
||||
function cos(d : extended) : extended;[internproc:in_cos_extended];
|
||||
}
|
||||
{$endif INTERNCONSTINTF}
|
||||
|
@ -1307,7 +1307,7 @@ end ['EAX'];
|
||||
****************************************************************************}
|
||||
|
||||
{$define FPC_SYSTEM_HAS_ABS_LONGINT}
|
||||
function abs(l:longint):longint; assembler;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_abs];{$endif}
|
||||
function abs(l:longint):longint; assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
asm
|
||||
{$ifndef REGCALL}
|
||||
movl l,%eax
|
||||
@ -1319,7 +1319,7 @@ end ['EAX','EDX'];
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_ODD_LONGINT}
|
||||
function odd(l:longint):boolean;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_odd];{$endif}
|
||||
function odd(l:longint):boolean;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
asm
|
||||
{$ifdef SYSTEMINLINE}
|
||||
movl l,%eax
|
||||
@ -1334,7 +1334,7 @@ end ['EAX'];
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_SQR_LONGINT}
|
||||
function sqr(l:longint):longint;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_sqr];{$endif}
|
||||
function sqr(l:longint):longint;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
asm
|
||||
{$ifdef SYSTEMINLINE}
|
||||
movl l,%eax
|
||||
|
@ -38,7 +38,6 @@
|
||||
EXTENDED data type routines
|
||||
****************************************************************************}
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
{$define FPC_SYSTEM_HAS_PI}
|
||||
function fpc_pi_real : ValReal;compilerproc;
|
||||
begin
|
||||
@ -95,31 +94,9 @@
|
||||
runerror(207);
|
||||
result:=0;
|
||||
end;
|
||||
{$else}
|
||||
{$define FPC_SYSTEM_HAS_PI}
|
||||
function pi : ValReal;[internproc:fpc_in_pi];
|
||||
{$define FPC_SYSTEM_HAS_ABS}
|
||||
function abs(d : ValReal) : ValReal;[internproc:fpc_in_abs_real];
|
||||
{$define FPC_SYSTEM_HAS_SQR}
|
||||
function sqr(d : ValReal) : ValReal;[internproc:fpc_in_sqr_real];
|
||||
{$define FPC_SYSTEM_HAS_SQRT}
|
||||
function sqrt(d : ValReal) : ValReal;[internproc:fpc_in_sqrt_real];
|
||||
{$define FPC_SYSTEM_HAS_ARCTAN}
|
||||
function arctan(d : ValReal) : ValReal;[internproc:fpc_in_arctan_real];
|
||||
{$define FPC_SYSTEM_HAS_LN}
|
||||
function ln(d : ValReal) : ValReal;[internproc:fpc_in_ln_real];
|
||||
{$define FPC_SYSTEM_HAS_SIN}
|
||||
function sin(d : ValReal) : ValReal;[internproc:fpc_in_sin_real];
|
||||
{$define FPC_SYSTEM_HAS_COS}
|
||||
function cos(d : ValReal) : ValReal;[internproc:fpc_in_cos_real];
|
||||
{$endif}
|
||||
|
||||
{$define FPC_SYSTEM_HAS_EXP}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_exp_real(d : ValReal) : ValReal;assembler;compilerproc;
|
||||
{$else}
|
||||
function exp(d : ValReal) : ValReal;assembler;[internconst:fpc_in_const_exp];
|
||||
{$endif}
|
||||
asm
|
||||
// comes from DJ GPP
|
||||
fldt d
|
||||
@ -155,11 +132,7 @@
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_FRAC}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_frac_real(d : ValReal) : ValReal;assembler;compilerproc;
|
||||
{$else}
|
||||
function frac(d : ValReal) : ValReal;assembler;[internconst:fpc_in_const_frac];
|
||||
{$endif}
|
||||
asm
|
||||
subl $16,%esp
|
||||
fnstcw -4(%ebp)
|
||||
@ -178,11 +151,7 @@
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_INT}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_int_real(d : ValReal) : ValReal;assembler;compilerproc;
|
||||
{$else}
|
||||
function int(d : ValReal) : ValReal;assembler;[internconst:fpc_in_const_int];
|
||||
{$endif}
|
||||
asm
|
||||
subl $16,%esp
|
||||
fnstcw -4(%ebp)
|
||||
@ -201,11 +170,7 @@
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_TRUNC}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_trunc_real(d : ValReal) : int64;assembler;compilerproc;
|
||||
{$else}
|
||||
function trunc(d : ValReal) : int64;assembler;[internconst:fpc_in_const_trunc];
|
||||
{$endif}
|
||||
var
|
||||
oldcw,
|
||||
newcw : word;
|
||||
@ -227,12 +192,7 @@
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_ROUND}
|
||||
{$ifdef internconstintf}
|
||||
function fpc_round_real(d : ValReal) : int64;assembler;compilerproc;
|
||||
{$else}
|
||||
function round(d : ValReal) : int64;[internconst:fpc_in_const_round, external name 'FPC_ROUND'];
|
||||
function fpc_round(d : ValReal) : int64;assembler;[public, alias:'FPC_ROUND'];compilerproc;
|
||||
{$endif}
|
||||
var
|
||||
res : int64;
|
||||
asm
|
||||
|
@ -22,11 +22,7 @@
|
||||
{$ifdef SUPPORT_DOUBLE}
|
||||
function c_trunc(d: double): double; cdecl; external 'c' name 'trunc';
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_int_real(d: double): double;compilerproc; {$ifdef MATHINLINE}inline;{$endif}
|
||||
{$else}
|
||||
function int(d: double): double; {$ifdef MATHINLINE}inline;{$endif}[internconst:fpc_in_const_int];
|
||||
{$endif}
|
||||
begin
|
||||
result := c_trunc(d);
|
||||
end;
|
||||
@ -36,11 +32,7 @@
|
||||
|
||||
function c_truncf(d: real): double; cdecl; external 'c' name 'truncf';
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_int_real(d: real): real;compilerproc; {$ifdef MATHINLINE}inline;{$endif}
|
||||
{$else}
|
||||
function int(d: real) : real;[internconst:fpc_in_const_int];
|
||||
{$endif}
|
||||
begin
|
||||
{ this will be correct since real = single in the case of }
|
||||
{ the motorola version of the compiler... }
|
||||
@ -81,12 +73,7 @@
|
||||
|
||||
function c_sqrt(d: double): double; cdecl; external 'c' name 'sqrt';
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_sqrt_real(d:Real):Real;compilerproc; {$ifdef MATHINLINE}inline;{$endif}
|
||||
{$else}
|
||||
function fpc_sqrt_real(d:Real):Real;compilerproc; external name 'FPC_SQRT_REAL';
|
||||
function sqrt(d:Real):Real;[internconst:fpc_in_const_sqrt];[public, alias: 'FPC_SQRT_REAL']; {$ifdef MATHINLINE}inline;{$endif}
|
||||
{$endif}
|
||||
begin
|
||||
result := c_sqrt(d);
|
||||
end;
|
||||
@ -98,11 +85,7 @@
|
||||
{$define FPC_SYSTEM_HAS_EXP}
|
||||
function c_exp(d: double): double; cdecl; external 'c' name 'exp';
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_Exp_real(d:Real):Real;compilerproc; {$ifdef MATHINLINE}inline;{$endif}
|
||||
{$else}
|
||||
function Exp(d:Real):Real;[internconst:fpc_in_const_exp]; {$ifdef MATHINLINE}inline;{$endif}
|
||||
{$endif}
|
||||
begin
|
||||
result := c_exp(d);
|
||||
end;
|
||||
@ -117,7 +100,7 @@ Not supported on Mac OS X 10.1
|
||||
|
||||
function c_llround(d: double): int64; cdecl; external 'c' name 'llround';
|
||||
|
||||
function round(d : Real) : int64;{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_round];{$endif} external name 'FPC_ROUND';
|
||||
function round(d : Real) : int64; external name 'FPC_ROUND';
|
||||
|
||||
function fpc_round(d : Real) : int64;[public, alias:'FPC_ROUND'];compilerproc;
|
||||
begin
|
||||
@ -132,11 +115,7 @@ Not supported on Mac OS X 10.1
|
||||
|
||||
function c_log(d: double): double; cdecl; external 'c' name 'log';
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_Ln_real(d:Real):Real;compilerproc;{$ifdef MATHINLINE}inline;{$endif}
|
||||
{$else}
|
||||
function Ln(d:Real):Real;[internconst:fpc_in_const_ln];{$ifdef MATHINLINE}inline;{$endif}
|
||||
{$endif}
|
||||
begin
|
||||
result := c_log(d);
|
||||
end;
|
||||
@ -147,11 +126,7 @@ Not supported on Mac OS X 10.1
|
||||
{$define FPC_SYSTEM_HAS_SIN}
|
||||
function c_sin(d: double): double; cdecl; external 'c' name 'sin';
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_Sin_real(d:Real):Real;compilerproc; {$ifdef MATHINLINE}inline;{$endif}
|
||||
{$else}
|
||||
function Sin(d:Real):Real;[internconst:fpc_in_const_sin]; {$ifdef MATHINLINE}inline;{$endif}
|
||||
{$endif}
|
||||
begin
|
||||
result := c_sin(d);
|
||||
end;
|
||||
@ -163,11 +138,7 @@ Not supported on Mac OS X 10.1
|
||||
{$define FPC_SYSTEM_HAS_COS}
|
||||
function c_cos(d: double): double; cdecl; external 'c' name 'cos';
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_Cos_real(d:Real):Real;compilerproc; {$ifdef MATHINLINE}inline;{$endif}
|
||||
{$else}
|
||||
function Cos(d:Real):Real;[internconst:fpc_in_const_cos];{$ifdef MATHINLINE}inline;{$endif}
|
||||
{$endif}
|
||||
begin
|
||||
result := c_cos(d);
|
||||
end;
|
||||
@ -179,11 +150,7 @@ Not supported on Mac OS X 10.1
|
||||
{$define FPC_SYSTEM_HAS_ARCTAN}
|
||||
function c_atan(d: double): double; cdecl; external 'c' name 'atan';
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_ArcTan_real(d:Real):Real;compilerproc; {$ifdef MATHINLINE}inline;{$endif}
|
||||
{$else}
|
||||
function ArcTan(d:Real):Real;[internconst:fpc_in_const_arctan];{$ifdef MATHINLINE}inline;{$endif}
|
||||
{$endif}
|
||||
begin
|
||||
result := c_atan(d);
|
||||
end;
|
||||
|
@ -247,7 +247,6 @@ function fpc_shl_int64(value,shift : int64) : int64; compilerproc;
|
||||
function fpc_shr_int64(value,shift : int64) : int64; compilerproc;
|
||||
{$endif FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_abs_real(d : ValReal) : ValReal;compilerproc;
|
||||
function fpc_arctan_real(d : ValReal) : ValReal;compilerproc;{$ifdef MATHINLINE}inline;{$endif}
|
||||
function fpc_cos_real(d : ValReal) : ValReal;compilerproc;{$ifdef MATHINLINE}inline;{$endif}
|
||||
@ -261,9 +260,6 @@ function fpc_sqr_real(d : ValReal) : ValReal;compilerproc;
|
||||
function fpc_sqrt_real(d : ValReal) : ValReal;compilerproc;{$ifdef MATHINLINE}inline;{$endif}
|
||||
function fpc_round_real(d : ValReal) : int64;compilerproc;
|
||||
function fpc_trunc_real(d : ValReal) : int64;compilerproc;
|
||||
{$else INTERNCONSTINTF}
|
||||
function fpc_round(d : ValReal) : int64;compilerproc;
|
||||
{$endif INTERNCONSTINTF}
|
||||
|
||||
function fpc_do_is(aclass : tclass;aobject : tobject) : boolean; compilerproc;
|
||||
function fpc_do_as(aclass : tclass;aobject : tobject): tobject; compilerproc;
|
||||
|
@ -885,7 +885,7 @@ function fpc_mod_longint(n,z : longint) : longint; [public,alias: 'FPC_MOD_LONGI
|
||||
{****************************************************************************}
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_ABS_LONGINT}
|
||||
function abs(l:longint):longint;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_abs];{$endif}
|
||||
function abs(l:longint):longint;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
if l<0 then
|
||||
abs:=-l
|
||||
@ -897,7 +897,7 @@ end;
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_ODD_LONGINT}
|
||||
|
||||
function odd(l:longint):boolean;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_odd];{$endif}
|
||||
function odd(l:longint):boolean;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
odd:=boolean(l and 1);
|
||||
end;
|
||||
@ -906,7 +906,7 @@ end;
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_ODD_LONGWORD}
|
||||
|
||||
function odd(l:longword):boolean;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_odd];{$endif}
|
||||
function odd(l:longword):boolean;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
odd:=boolean(l and 1);
|
||||
end;
|
||||
@ -916,7 +916,7 @@ end;
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_ODD_INT64}
|
||||
|
||||
function odd(l:int64):boolean;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_odd];{$endif}
|
||||
function odd(l:int64):boolean;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
odd:=boolean(longint(l) and 1);
|
||||
end;
|
||||
@ -925,7 +925,7 @@ end;
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_ODD_QWORD}
|
||||
|
||||
function odd(l:qword):boolean;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_odd];{$endif}
|
||||
function odd(l:qword):boolean;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
odd:=boolean(longint(l) and 1);
|
||||
end;
|
||||
@ -934,7 +934,7 @@ end;
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_SQR_LONGINT}
|
||||
|
||||
function sqr(l:longint):longint;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_sqr];{$endif}
|
||||
function sqr(l:longint):longint;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
sqr:=l*l;
|
||||
end;
|
||||
@ -944,7 +944,7 @@ end;
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_ABS_INT64}
|
||||
|
||||
function abs(l: Int64): Int64;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_abs];{$endif}
|
||||
function abs(l: Int64): Int64;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
if l < 0 then
|
||||
abs := -l
|
||||
@ -957,7 +957,7 @@ end;
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_SQR_INT64}
|
||||
|
||||
function sqr(l: Int64): Int64;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_sqr];{$endif}
|
||||
function sqr(l: Int64): Int64;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
sqr := l*l;
|
||||
end;
|
||||
@ -967,7 +967,7 @@ end;
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_SQR_QWORD}
|
||||
|
||||
function sqr(l: QWord): QWord;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_sqr];{$endif}
|
||||
function sqr(l: QWord): QWord;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
sqr := l*l;
|
||||
end;
|
||||
@ -1013,10 +1013,6 @@ procedure inclocked(var l:int64);
|
||||
{$endif ndef FPC_SYSTEM_HAS_SPTR}
|
||||
|
||||
|
||||
{$ifndef INTERNCONSTINTF}
|
||||
procedure prefetch(const mem);[internproc:fpc_in_prefetch_var];
|
||||
{$endif}
|
||||
|
||||
|
||||
function align(addr : PtrInt;alignment : PtrInt) : PtrInt;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
|
@ -271,11 +271,7 @@ type
|
||||
End;
|
||||
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_trunc_real(d : real) : int64;compilerproc;
|
||||
{$else}
|
||||
function trunc(d : real) : int64;[internconst:fpc_in_const_trunc];
|
||||
{$endif}
|
||||
var
|
||||
{$ifdef cpuarm}
|
||||
l: longint;
|
||||
@ -315,11 +311,7 @@ type
|
||||
|
||||
{ straight Pascal translation of the code for __trunc() in }
|
||||
{ the file sysdeps/libm-ieee754/s_trunc.c of glibc (JM) }
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_int_real(d: double): double;compilerproc;
|
||||
{$else}
|
||||
function int(d: double): double;[internconst:fpc_in_const_int];
|
||||
{$endif}
|
||||
var
|
||||
i0, j0: longint;
|
||||
i1: cardinal;
|
||||
@ -373,11 +365,7 @@ type
|
||||
|
||||
{$else SUPPORT_DOUBLE}
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_int_real(d : real) : real;compilerproc;
|
||||
{$else}
|
||||
function int(d : real) : real;[internconst:fpc_in_const_int];
|
||||
{$endif}
|
||||
begin
|
||||
{ this will be correct since real = single in the case of }
|
||||
{ the motorola version of the compiler... }
|
||||
@ -392,11 +380,7 @@ type
|
||||
|
||||
{$ifdef SUPPORT_DOUBLE}
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_abs_real(d : Double) : Double;compilerproc;
|
||||
{$else}
|
||||
function abs(d : Double) : Double;[public,alias:'FPC_ABS_REAL'];
|
||||
{$endif}
|
||||
begin
|
||||
if (d<0.0) then
|
||||
result := -d
|
||||
@ -406,11 +390,7 @@ type
|
||||
|
||||
{$else}
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_abs_real(d : Double) : Double;compilerproc;
|
||||
{$else}
|
||||
function abs(d : Real) : Real;[public,alias:'FPC_ABS_REAL'];
|
||||
{$endif}
|
||||
begin
|
||||
if (d<0.0) then
|
||||
result := -d
|
||||
@ -420,10 +400,6 @@ type
|
||||
|
||||
{$endif}
|
||||
|
||||
{$ifndef INTERNCONSTINTF}
|
||||
function fpc_abs_real(d:Real):Real;compilerproc; external name 'FPC_ABS_REAL';
|
||||
{$endif}
|
||||
|
||||
{$endif not FPC_SYSTEM_HAS_ABS}
|
||||
|
||||
|
||||
@ -539,22 +515,14 @@ type
|
||||
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_SQR}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_sqr_real(d : Real) : Real;compilerproc;{$ifdef MATHINLINE}inline;{$endif}
|
||||
{$else}
|
||||
function sqr(d : Real) : Real;[internconst:fpc_in_const_sqr];
|
||||
{$endif}
|
||||
begin
|
||||
result := d*d;
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_PI}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_pi_real : Real;compilerproc;{$ifdef MATHINLINE}inline;{$endif}
|
||||
{$else}
|
||||
function pi : Real;[internconst:fpc_in_const_pi];
|
||||
{$endif}
|
||||
begin
|
||||
result := 3.1415926535897932385;
|
||||
end;
|
||||
@ -562,12 +530,7 @@ type
|
||||
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_SQRT}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_sqrt_real(d:Real):Real;compilerproc;
|
||||
{$else}
|
||||
function fpc_sqrt_real(d:Real):Real;compilerproc; external name 'FPC_SQRT_REAL';
|
||||
function sqrt(d:Real):Real;[internconst:fpc_in_const_sqrt];[public, alias: 'FPC_SQRT_REAL'];
|
||||
{$endif}
|
||||
{*****************************************************************}
|
||||
{ Square root }
|
||||
{*****************************************************************}
|
||||
@ -628,11 +591,7 @@ type
|
||||
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_EXP}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_exp_real(d:Real):Real;compilerproc;
|
||||
{$else}
|
||||
function Exp(d:Real):Real;[internconst:fpc_in_const_exp];
|
||||
{$endif}
|
||||
{*****************************************************************}
|
||||
{ Exponential Function }
|
||||
{*****************************************************************}
|
||||
@ -707,12 +666,7 @@ type
|
||||
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_ROUND}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_round_real(d : Real) : int64;compilerproc;
|
||||
{$else}
|
||||
function round(d : Real) : int64;{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_round];{$endif} external name 'FPC_ROUND';
|
||||
function fpc_round(d : Real) : int64;[public, alias:'FPC_ROUND'];compilerproc;
|
||||
{$endif}
|
||||
var
|
||||
fr: Real;
|
||||
tr: Int64;
|
||||
@ -788,11 +742,7 @@ type
|
||||
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_LN}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_ln_real(d:Real):Real;compilerproc;
|
||||
{$else}
|
||||
function Ln(d:Real):Real;[internconst:fpc_in_const_ln];
|
||||
{$endif}
|
||||
{*****************************************************************}
|
||||
{ Natural Logarithm }
|
||||
{*****************************************************************}
|
||||
@ -916,11 +866,7 @@ type
|
||||
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_SIN}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_Sin_real(d:Real):Real;compilerproc;
|
||||
{$else}
|
||||
function Sin(d:Real):Real;[internconst:fpc_in_const_sin];
|
||||
{$endif}
|
||||
{*****************************************************************}
|
||||
{ Circular Sine }
|
||||
{*****************************************************************}
|
||||
@ -1006,11 +952,7 @@ type
|
||||
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_COS}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_Cos_real(d:Real):Real;compilerproc;
|
||||
{$else}
|
||||
function Cos(d:Real):Real;[internconst:fpc_in_const_cos];
|
||||
{$endif}
|
||||
{*****************************************************************}
|
||||
{ Circular cosine }
|
||||
{*****************************************************************}
|
||||
@ -1093,11 +1035,7 @@ type
|
||||
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_ARCTAN}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_ArcTan_real(d:Real):Real;compilerproc;
|
||||
{$else}
|
||||
function ArcTan(d:Real):Real;[internconst:fpc_in_const_arctan];
|
||||
{$endif}
|
||||
{*****************************************************************}
|
||||
{ Inverse circular tangent (arctangent) }
|
||||
{*****************************************************************}
|
||||
@ -1172,11 +1110,7 @@ type
|
||||
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_FRAC}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_frac_real(d : Real) : Real;compilerproc;
|
||||
{$else}
|
||||
function frac(d : Real) : Real;[internconst:fpc_in_const_frac];
|
||||
{$endif}
|
||||
begin
|
||||
result := d - Int(d);
|
||||
end;
|
||||
|
@ -62,7 +62,6 @@ const
|
||||
fpc_in_leave = 51; {macpas}
|
||||
fpc_in_cycle = 52; {macpas}
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
{ Internal constant functions }
|
||||
fpc_in_const_sqr = 100;
|
||||
fpc_in_const_abs = 101;
|
||||
@ -89,38 +88,6 @@ const
|
||||
fpc_in_arctan_real = 130;
|
||||
fpc_in_ln_real = 131;
|
||||
fpc_in_sin_real = 132;
|
||||
{$else}
|
||||
{ Internal constant functions }
|
||||
fpc_in_const_trunc = 100;
|
||||
fpc_in_const_round = 101;
|
||||
fpc_in_const_frac = 102;
|
||||
fpc_in_const_abs = 103;
|
||||
fpc_in_const_int = 104;
|
||||
fpc_in_const_sqr = 105;
|
||||
fpc_in_const_odd = 106;
|
||||
fpc_in_const_ptr = 107;
|
||||
fpc_in_const_swap_word = 108;
|
||||
fpc_in_const_swap_long = 109;
|
||||
fpc_in_const_pi = 110;
|
||||
fpc_in_const_sqrt = 111;
|
||||
fpc_in_const_arctan = 112;
|
||||
fpc_in_const_cos = 113;
|
||||
fpc_in_const_exp = 114;
|
||||
fpc_in_const_ln = 115;
|
||||
fpc_in_const_sin = 116;
|
||||
fpc_in_lo_qword = 117;
|
||||
fpc_in_hi_qword = 118;
|
||||
fpc_in_cos_real = 119;
|
||||
fpc_in_pi = 121;
|
||||
fpc_in_abs_real = 122;
|
||||
fpc_in_sqr_real = 123;
|
||||
fpc_in_sqrt_real = 124;
|
||||
fpc_in_arctan_real = 125;
|
||||
fpc_in_ln_real = 126;
|
||||
fpc_in_sin_real = 127;
|
||||
fpc_in_const_swap_qword = 128;
|
||||
fpc_in_prefetch_var = 129;
|
||||
{$endif}
|
||||
|
||||
{ MMX functions }
|
||||
{ these contants are used by the mmx unit }
|
||||
|
@ -44,7 +44,6 @@
|
||||
{$endif}
|
||||
{$endif}
|
||||
|
||||
{$ifdef internconstintf}
|
||||
function pi : ValReal;[internproc:fpc_in_pi_real];
|
||||
function abs(d : ValReal) : ValReal;[internproc:fpc_in_abs_real];
|
||||
function sqr(d : ValReal) : ValReal;[internproc:fpc_in_sqr_real];
|
||||
@ -58,21 +57,6 @@
|
||||
function frac(d : ValReal) : ValReal;[internproc:fpc_in_frac_real];
|
||||
function int(d : ValReal) : ValReal;[internproc:fpc_in_int_real];
|
||||
function trunc(d : ValReal) : int64;[internproc:fpc_in_trunc_real];
|
||||
{$else}
|
||||
function abs(d : ValReal) : ValReal;
|
||||
function arctan(d : ValReal) : ValReal;{$ifdef MATHINLINE}inline;{$endif}
|
||||
function cos(d : ValReal) : ValReal;{$ifdef MATHINLINE}inline;{$endif}
|
||||
function exp(d : ValReal) : ValReal;{$ifdef MATHINLINE}inline;{$endif}
|
||||
function frac(d : ValReal) : ValReal;
|
||||
function int(d : ValReal) : ValReal;{$ifdef MATHINLINE}inline;{$endif}
|
||||
function ln(d : ValReal) : ValReal;{$ifdef MATHINLINE}inline;{$endif}
|
||||
function pi : ValReal;
|
||||
function sin(d : ValReal) : ValReal;{$ifdef MATHINLINE}inline;{$endif}
|
||||
function sqr(d : ValReal) : ValReal;
|
||||
function sqrt(d : ValReal) : ValReal;{$ifdef MATHINLINE}inline;{$endif}
|
||||
function round(d : ValReal) : int64;
|
||||
function trunc(d : ValReal) : int64;
|
||||
{$endif internconstintf}
|
||||
|
||||
{$ifdef FPC_CURRENCY_IS_INT64}
|
||||
function trunc(c : currency) : int64;
|
||||
|
@ -46,31 +46,6 @@ var
|
||||
initialstklen : longint;external name '__stklen';
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
Routines which have compiler magic
|
||||
****************************************************************************}
|
||||
|
||||
{$ifndef INTERNCONSTINTF}
|
||||
Function lo(i : Integer) : byte; [INTERNPROC: fpc_in_lo_Word];
|
||||
Function lo(w : Word) : byte; [INTERNPROC: fpc_in_lo_Word];
|
||||
Function lo(l : Longint) : Word; [INTERNPROC: fpc_in_lo_long];
|
||||
Function lo(l : DWord) : Word; [INTERNPROC: fpc_in_lo_long];
|
||||
Function hi(i : Integer) : byte; [INTERNPROC: fpc_in_hi_Word];
|
||||
Function hi(w : Word) : byte; [INTERNPROC: fpc_in_hi_Word];
|
||||
Function hi(l : Longint) : Word; [INTERNPROC: fpc_in_hi_long];
|
||||
Function hi(l : DWord) : Word; [INTERNPROC: fpc_in_hi_long];
|
||||
|
||||
Function lo(q : QWord) : DWord; [INTERNPROC: fpc_in_lo_qword];
|
||||
Function lo(i : Int64) : DWord; [INTERNPROC: fpc_in_lo_qword];
|
||||
Function hi(q : QWord) : DWord; [INTERNPROC: fpc_in_hi_qword];
|
||||
Function hi(i : Int64) : DWord; [INTERNPROC: fpc_in_hi_qword];
|
||||
|
||||
Function chr(b : byte) : Char; [INTERNPROC: fpc_in_chr_byte];
|
||||
|
||||
Procedure Reset(var f : TypedFile); [INTERNPROC: fpc_in_Reset_TypedFile];
|
||||
Procedure Rewrite(var f : TypedFile); [INTERNPROC: fpc_in_Rewrite_TypedFile];
|
||||
{$endif INTERNCONSTINTF}
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
Include processor specific routines
|
||||
@ -186,32 +161,32 @@ begin
|
||||
Lo := b and $0f
|
||||
end;
|
||||
|
||||
Function swap (X : Word) : Word;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_swap_word];{$endif}
|
||||
Function swap (X : Word) : Word;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Begin
|
||||
swap:=(X and $ff) shl 8 + (X shr 8)
|
||||
End;
|
||||
|
||||
Function Swap (X : Integer) : Integer;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_swap_word];{$endif}
|
||||
Function Swap (X : Integer) : Integer;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Begin
|
||||
swap:=(X and $ff) shl 8 + (X shr 8)
|
||||
End;
|
||||
|
||||
Function swap (X : Longint) : Longint;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_swap_long];{$endif}
|
||||
Function swap (X : Longint) : Longint;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Begin
|
||||
Swap:=(X and $ffff) shl 16 + (X shr 16)
|
||||
End;
|
||||
|
||||
Function Swap (X : Cardinal) : Cardinal;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_swap_long];{$endif}
|
||||
Function Swap (X : Cardinal) : Cardinal;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Begin
|
||||
Swap:=(X and $ffff) shl 16 + (X shr 16)
|
||||
End;
|
||||
|
||||
Function Swap (X : QWord) : QWord;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_swap_qword];{$endif}
|
||||
Function Swap (X : QWord) : QWord;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Begin
|
||||
Swap:=(X and $ffffffff) shl 32 + (X shr 32);
|
||||
End;
|
||||
|
||||
Function swap (X : Int64) : Int64;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_swap_qword];{$endif}
|
||||
Function swap (X : Int64) : Int64;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Begin
|
||||
Swap:=(X and $ffffffff) shl 32 + (X shr 32);
|
||||
End;
|
||||
@ -457,7 +432,7 @@ end;
|
||||
Memory Management
|
||||
****************************************************************************}
|
||||
|
||||
Function Ptr(sel,off : Longint) : farpointer;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_ptr];{$endif}
|
||||
Function Ptr(sel,off : Longint) : farpointer;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Begin
|
||||
ptr:=farpointer((sel shl 4)+off);
|
||||
End;
|
||||
|
@ -395,7 +395,7 @@ 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}
|
||||
procedure prefetch(const mem);{$ifdef INTERNCONSTINTF}[internproc:fpc_in_prefetch_var];{$endif}
|
||||
procedure prefetch(const mem);[internproc:fpc_in_prefetch_var];
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
@ -404,25 +404,25 @@ procedure prefetch(const mem);{$ifdef INTERNCONSTINTF}[internproc:fpc_in_prefetc
|
||||
|
||||
Function lo(B: Byte):Byte;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function hi(b : Byte) : Byte;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function lo(i : Integer) : byte; {$ifdef INTERNCONSTINTF}[INTERNPROC: fpc_in_lo_Word];{$endif}
|
||||
Function lo(w : Word) : byte; {$ifdef INTERNCONSTINTF}[INTERNPROC: fpc_in_lo_Word];{$endif}
|
||||
Function lo(l : Longint) : Word; {$ifdef INTERNCONSTINTF}[INTERNPROC: fpc_in_lo_long];{$endif}
|
||||
Function lo(l : DWord) : Word; {$ifdef INTERNCONSTINTF}[INTERNPROC: fpc_in_lo_long];{$endif}
|
||||
Function lo(i : Int64) : DWord; {$ifdef INTERNCONSTINTF}[INTERNPROC: fpc_in_lo_qword];{$endif}
|
||||
Function lo(q : QWord) : DWord; {$ifdef INTERNCONSTINTF}[INTERNPROC: fpc_in_lo_qword];{$endif}
|
||||
Function hi(i : Integer) : byte; {$ifdef INTERNCONSTINTF}[INTERNPROC: fpc_in_hi_Word];{$endif}
|
||||
Function hi(w : Word) : byte; {$ifdef INTERNCONSTINTF}[INTERNPROC: fpc_in_hi_Word];{$endif}
|
||||
Function hi(l : Longint) : Word; {$ifdef INTERNCONSTINTF}[INTERNPROC: fpc_in_hi_long];{$endif}
|
||||
Function hi(l : DWord) : Word; {$ifdef INTERNCONSTINTF}[INTERNPROC: fpc_in_hi_long];{$endif}
|
||||
Function hi(i : Int64) : DWord; {$ifdef INTERNCONSTINTF}[INTERNPROC: fpc_in_hi_qword];{$endif}
|
||||
Function hi(q : QWord) : DWord; {$ifdef INTERNCONSTINTF}[INTERNPROC: fpc_in_hi_qword];{$endif}
|
||||
Function lo(i : Integer) : byte; [INTERNPROC: fpc_in_lo_Word];
|
||||
Function lo(w : Word) : byte; [INTERNPROC: fpc_in_lo_Word];
|
||||
Function lo(l : Longint) : Word; [INTERNPROC: fpc_in_lo_long];
|
||||
Function lo(l : DWord) : Word; [INTERNPROC: fpc_in_lo_long];
|
||||
Function lo(i : Int64) : DWord; [INTERNPROC: fpc_in_lo_qword];
|
||||
Function lo(q : QWord) : DWord; [INTERNPROC: fpc_in_lo_qword];
|
||||
Function hi(i : Integer) : byte; [INTERNPROC: fpc_in_hi_Word];
|
||||
Function hi(w : Word) : byte; [INTERNPROC: fpc_in_hi_Word];
|
||||
Function hi(l : Longint) : Word; [INTERNPROC: fpc_in_hi_long];
|
||||
Function hi(l : DWord) : Word; [INTERNPROC: fpc_in_hi_long];
|
||||
Function hi(i : Int64) : DWord; [INTERNPROC: fpc_in_hi_qword];
|
||||
Function hi(q : QWord) : DWord; [INTERNPROC: fpc_in_hi_qword];
|
||||
|
||||
Function swap (X : Word) : Word;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_swap_word];{$endif}
|
||||
Function Swap (X : Integer) : Integer;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_swap_word];{$endif}
|
||||
Function swap (X : Longint) : Longint;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_swap_long];{$endif}
|
||||
Function Swap (X : Cardinal) : Cardinal;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_swap_long];{$endif}
|
||||
Function Swap (X : QWord) : QWord;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_swap_qword];{$endif}
|
||||
Function swap (X : Int64) : Int64;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_swap_qword];{$endif}
|
||||
Function swap (X : Word) : Word;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_word];
|
||||
Function Swap (X : Integer) : Integer;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_word];
|
||||
Function swap (X : Longint) : Longint;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_long];
|
||||
Function Swap (X : Cardinal) : Cardinal;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_long];
|
||||
Function Swap (X : QWord) : QWord;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_qword];
|
||||
Function swap (X : Int64) : Int64;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_qword];
|
||||
|
||||
Function Align (Addr : PtrInt; Alignment : PtrInt) : PtrInt;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function Align (Addr : Pointer; Alignment : PtrInt) : Pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
@ -432,15 +432,15 @@ Function Random(l:int64):int64;
|
||||
Function Random: extended;
|
||||
Procedure Randomize;
|
||||
|
||||
Function abs(l:Longint):Longint;{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_abs];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function abs(l:Int64):Int64;{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_abs];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function sqr(l:Longint):Longint;{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_sqr];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function sqr(l:Int64):Int64;{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_sqr];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function sqr(l:QWord):QWord;{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_sqr];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function odd(l:Longint):Boolean;{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_odd];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function odd(l:Longword):Boolean;{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_odd];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function odd(l:Int64):Boolean;{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_odd];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function odd(l:QWord):Boolean;{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_odd];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function abs(l:Longint):Longint;[internconst:fpc_in_const_abs];{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function abs(l:Int64):Int64;[internconst:fpc_in_const_abs];{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function sqr(l:Longint):Longint;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function sqr(l:Int64):Int64;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function sqr(l:QWord):QWord;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function odd(l:Longint):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function odd(l:Longword):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function odd(l:Int64):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function odd(l:QWord):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
|
||||
{ float math routines }
|
||||
{$I mathh.inc}
|
||||
@ -449,7 +449,7 @@ Function odd(l:QWord):Boolean;{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_
|
||||
Addr/Pointer Handling
|
||||
****************************************************************************}
|
||||
|
||||
Function ptr(sel,off:Longint):farpointer;{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_ptr];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function ptr(sel,off:Longint):farpointer;[internconst:fpc_in_const_ptr];{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function Cseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function Dseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function Sseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
@ -481,11 +481,7 @@ Function binStr(Val:int64;cnt:byte):shortstring;
|
||||
Function hexStr(Val:Pointer):shortstring;
|
||||
|
||||
{ Char functions }
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
Function chr(b : byte) : Char; [INTERNPROC: fpc_in_chr_byte];
|
||||
{$else}
|
||||
Function Chr(b:byte):Char;
|
||||
{$endif}
|
||||
Function upCase(c:Char):Char;
|
||||
Function lowerCase(c:Char):Char; overload;
|
||||
function pos(const substr : shortstring;c:char): SizeInt;
|
||||
@ -552,13 +548,8 @@ Procedure Truncate (Var F:File);
|
||||
Procedure Assign(Var f:TypedFile;const Name:string);
|
||||
Procedure Assign(Var f:TypedFile;p:pchar);
|
||||
Procedure Assign(Var f:TypedFile;c:char);
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
Procedure Reset(var f : TypedFile); [INTERNPROC: fpc_in_Reset_TypedFile];
|
||||
Procedure Rewrite(var f : TypedFile); [INTERNPROC: fpc_in_Rewrite_TypedFile];
|
||||
{$else}
|
||||
Procedure Rewrite(Var f:TypedFile);
|
||||
Procedure Reset(Var f:TypedFile);
|
||||
{$endif}
|
||||
|
||||
{****************************************************************************
|
||||
Text File Management
|
||||
@ -584,7 +575,7 @@ Function SeekEOLn (Var t:Text):Boolean;
|
||||
Function SeekEOF (Var t:Text):Boolean;
|
||||
Function SeekEOLn:Boolean;
|
||||
Function SeekEOF:Boolean;
|
||||
Procedure SetTextBuf(Var f:Text; Var Buf);{$ifdef INTERNCONSTINTF}[INTERNPROC:fpc_in_settextbuf_file_x];{$endif}
|
||||
Procedure SetTextBuf(Var f:Text; Var Buf);[INTERNPROC:fpc_in_settextbuf_file_x];
|
||||
Procedure SetTextBuf(Var f:Text; Var Buf; Size:Longint);
|
||||
Procedure SetTextLineEnding(Var f:Text; Ending:string);
|
||||
|
||||
@ -609,7 +600,7 @@ function get_caller_addr(framebp:pointer):pointer;{$ifdef SYSTEMINLINE}inline;{$
|
||||
function get_caller_frame(framebp:pointer):pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
|
||||
Function IOResult:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function Sptr:Pointer;{$ifdef SYSTEMINLINE}inline;{$endif}{$ifdef INTERNCONSTINTF}[internconst:fpc_in_const_ptr];{$endif}
|
||||
Function Sptr:Pointer;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_ptr];
|
||||
Function GetProcessID:SizeUInt;
|
||||
Function GetThreadID:TThreadID;
|
||||
|
||||
|
@ -416,10 +416,6 @@ Begin
|
||||
End;
|
||||
|
||||
|
||||
{$ifndef INTERNCONSTINTF}
|
||||
Procedure SetTextBuf(Var F : Text; Var Buf);[INTERNPROC: fpc_In_settextbuf_file_x];
|
||||
{$endif}
|
||||
|
||||
|
||||
Procedure SetTextBuf(Var F : Text; Var Buf; Size : Longint);
|
||||
Begin
|
||||
|
@ -25,7 +25,6 @@ const
|
||||
EXTENDED data type routines
|
||||
****************************************************************************}
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
{$define FPC_SYSTEM_HAS_PI}
|
||||
function fpc_pi_real : valreal;compilerproc;
|
||||
begin
|
||||
@ -50,28 +49,13 @@ const
|
||||
result:=0;
|
||||
end;
|
||||
|
||||
{$else}
|
||||
{$define FPC_SYSTEM_HAS_PI}
|
||||
function pi : double;[internproc:fpc_in_pi];
|
||||
|
||||
{$define FPC_SYSTEM_HAS_ABS}
|
||||
function abs(d : extended) : extended;[internproc:fpc_in_abs_real];
|
||||
|
||||
{$define FPC_SYSTEM_HAS_SQR}
|
||||
function sqr(d : extended) : extended;[internproc:fpc_in_sqr_real];
|
||||
{$endif ndef INTERNCONSTINTF}
|
||||
|
||||
const
|
||||
factor: double = double(int64(1) shl 32);
|
||||
factor2: double = double(int64(1) shl 31);
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_TRUNC}
|
||||
{$define FPC_SYSTEM_HAS_TRUNC}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_trunc_real(d : valreal) : int64;assembler;compilerproc;
|
||||
{$else}
|
||||
function trunc(d : extended) : int64;assembler;[internconst:fpc_in_const_trunc];
|
||||
{$endif}
|
||||
{ input: d in fr1 }
|
||||
{ output: result in r3 }
|
||||
assembler;
|
||||
@ -163,7 +147,7 @@ const
|
||||
(*
|
||||
{$ifndef FPC_SYSTEM_HAS_ROUND}
|
||||
{$define FPC_SYSTEM_HAS_ROUND}
|
||||
function round(d : extended) : int64;{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_round, external name 'FPC_ROUND'];{$endif}
|
||||
function round(d : extended) : int64;
|
||||
|
||||
function fpc_round(d : extended) : int64;assembler;[public, alias:'FPC_ROUND'];compilerproc;
|
||||
{ exactly the same as trunc, except that one fctiwz has become fctiw }
|
||||
|
@ -1079,7 +1079,7 @@ asm
|
||||
end;
|
||||
|
||||
{$define FPC_SYSTEM_HAS_ABS_LONGINT}
|
||||
function abs(l:longint):longint; assembler;{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_abs];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
|
||||
function abs(l:longint):longint; assembler;{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
|
||||
asm
|
||||
srawi r0,r3,31
|
||||
add r3,r0,r3
|
||||
@ -1092,14 +1092,14 @@ end;
|
||||
****************************************************************************}
|
||||
|
||||
{$define FPC_SYSTEM_HAS_ODD_LONGINT}
|
||||
function odd(l:longint):boolean;assembler;{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_odd];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
|
||||
function odd(l:longint):boolean;assembler;{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
|
||||
asm
|
||||
rlwinm r3,r3,0,31,31
|
||||
end;
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_SQR_LONGINT}
|
||||
function sqr(l:longint):longint;assembler;{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_sqr];{$endif}{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
|
||||
function sqr(l:longint):longint;assembler;{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
|
||||
asm
|
||||
mullw r3,r3,r3
|
||||
end;
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_ABS}
|
||||
{$define FPC_SYSTEM_HAS_ABS}
|
||||
@ -46,16 +45,3 @@
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
{$else}
|
||||
|
||||
{$define FPC_SYSTEM_HAS_ABS}
|
||||
function abs(d : extended) : extended;[internproc:fpc_in_abs_real];
|
||||
|
||||
{$define FPC_SYSTEM_HAS_SQR}
|
||||
function sqr(d : extended) : extended;[internproc:fpc_in_sqr_real];
|
||||
|
||||
{$define FPC_SYSTEM_HAS_SQRT}
|
||||
function sqrt(d : extended) : extended;[internproc:fpc_in_sqrt_real];
|
||||
|
||||
{$endif}
|
||||
|
||||
|
@ -295,7 +295,7 @@ procedure Move(const source;var dest;count:longint);[public, alias: 'FPC_MOVE'];
|
||||
****************************************************************************}
|
||||
|
||||
{$define FPC_SYSTEM_HAS_ABS_LONGINT}
|
||||
function abs(l:longint):longint; assembler;{$ifdef SYSTEMINLINE}inline;{$endif}nostackframe;{$ifndef INTERNCONSTINTF}[internconst:fpc_in_const_abs];{$endif}
|
||||
function abs(l:longint):longint; assembler;{$ifdef SYSTEMINLINE}inline;{$endif}nostackframe;
|
||||
asm
|
||||
sra %o0,31,%g1
|
||||
add %o0,%g1,%o0
|
||||
|
@ -43,7 +43,6 @@
|
||||
EXTENDED data type routines
|
||||
****************************************************************************}
|
||||
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
{$define FPC_SYSTEM_HAS_PI}
|
||||
function fpc_pi_real : ValReal;compilerproc;
|
||||
begin
|
||||
@ -100,31 +99,9 @@
|
||||
runerror(207);
|
||||
result:=0;
|
||||
end;
|
||||
{$else}
|
||||
{$define FPC_SYSTEM_HAS_PI}
|
||||
function pi : ValReal;[internproc:fpc_in_pi];
|
||||
{$define FPC_SYSTEM_HAS_ABS}
|
||||
function abs(d : ValReal) : ValReal;[internproc:fpc_in_abs_real];
|
||||
{$define FPC_SYSTEM_HAS_SQR}
|
||||
function sqr(d : ValReal) : ValReal;[internproc:fpc_in_sqr_real];
|
||||
{$define FPC_SYSTEM_HAS_SQRT}
|
||||
function sqrt(d : ValReal) : ValReal;[internproc:fpc_in_sqrt_real];
|
||||
{$define FPC_SYSTEM_HAS_ARCTAN}
|
||||
function arctan(d : ValReal) : ValReal;[internproc:fpc_in_arctan_real];
|
||||
{$define FPC_SYSTEM_HAS_LN}
|
||||
function ln(d : ValReal) : ValReal;[internproc:fpc_in_ln_real];
|
||||
{$define FPC_SYSTEM_HAS_SIN}
|
||||
function sin(d : ValReal) : ValReal;[internproc:fpc_in_sin_real];
|
||||
{$define FPC_SYSTEM_HAS_COS}
|
||||
function cos(d : ValReal) : ValReal;[internproc:fpc_in_cos_real];
|
||||
{$endif}
|
||||
|
||||
{$define FPC_SYSTEM_HAS_EXP}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_exp_real(d : ValReal) : ValReal;assembler;compilerproc;
|
||||
{$else}
|
||||
function exp(d : ValReal) : ValReal;assembler;[internconst:fpc_in_const_exp];
|
||||
{$endif}
|
||||
asm
|
||||
// comes from DJ GPP
|
||||
fldt d
|
||||
@ -158,11 +135,7 @@
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_FRAC}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_frac_real(d : ValReal) : ValReal;assembler;compilerproc;
|
||||
{$else}
|
||||
function frac(d : ValReal) : ValReal;assembler;[internconst:fpc_in_const_frac];
|
||||
{$endif}
|
||||
asm
|
||||
subq $16,%rsp
|
||||
fnstcw -4(%rbp)
|
||||
@ -183,11 +156,7 @@
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_INT}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_int_real(d : ValReal) : ValReal;assembler;compilerproc;
|
||||
{$else}
|
||||
function int(d : ValReal) : ValReal;assembler;[internconst:fpc_in_const_int];
|
||||
{$endif}
|
||||
asm
|
||||
subq $16,%rsp
|
||||
fnstcw -4(%rbp)
|
||||
@ -206,11 +175,7 @@
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_TRUNC}
|
||||
{$ifdef INTERNCONSTINTF}
|
||||
function fpc_trunc_real(d : ValReal) : int64;assembler;compilerproc;
|
||||
{$else}
|
||||
function trunc(d : ValReal) : int64;assembler;[internconst:fpc_in_const_trunc];
|
||||
{$endif}
|
||||
var
|
||||
oldcw,
|
||||
newcw : word;
|
||||
@ -232,13 +197,7 @@
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_ROUND}
|
||||
{$ifdef internconstintf}
|
||||
function fpc_round_real(d : ValReal) : int64;assembler;compilerproc;
|
||||
{$else}
|
||||
function round(d : extended) : int64;[internconst:fpc_in_const_round, external name 'FPC_ROUND'];
|
||||
|
||||
function fpc_round(d : extended) : int64;assembler;[public, alias:'FPC_ROUND'];compilerproc;
|
||||
{$endif}
|
||||
var
|
||||
oldcw,
|
||||
newcw : word;
|
||||
|
Loading…
Reference in New Issue
Block a user