* remove asm for simple math functions so the generic inlined function is

taken. This generates smaller optimized code

git-svn-id: trunk@9796 -
This commit is contained in:
peter 2008-01-19 20:23:27 +00:00
parent 624bb8e7e1
commit 2a479654f1
3 changed files with 0 additions and 82 deletions

View File

@ -1069,23 +1069,6 @@ asm
.Lgnf_null:
end;
{****************************************************************************
Math
****************************************************************************}
{$define FPC_SYSTEM_HAS_SQR_LONGINT}
function sqr(l:longint):longint;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}
asm
{$ifdef SYSTEMINLINE}
movl l,%eax
{$else}
{$ifndef REGCALL}
movl l,%eax
{$endif}
{$endif}
imull %eax,%eax
end;
{$define FPC_SYSTEM_HAS_SPTR}
Function Sptr : Pointer;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}

View File

@ -1048,32 +1048,6 @@ asm
li r3,0
end;
{$define FPC_SYSTEM_HAS_ABS_LONGINT}
function abs(l:longint):longint; assembler;{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
asm
srawi r0,r3,31
add r3,r0,r3
xor r3,r3,r0
end;
{****************************************************************************
Math
****************************************************************************}
{$define FPC_SYSTEM_HAS_ODD_LONGINT}
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;{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
asm
mullw r3,r3,r3
end;
{$define FPC_SYSTEM_HAS_SPTR}
Function Sptr : Pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;

View File

@ -540,45 +540,6 @@ asm
.Lcaller_frame_null:
end;
{$define FPC_SYSTEM_HAS_ABS_LONGINT}
function abs(l:longint):longint; assembler;{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
asm
srawi r0,r3,31
add r3,r0,r3
xor r3,r3,r0
end;
{****************************************************************************
Math
****************************************************************************}
{$define FPC_SYSTEM_HAS_ODD_LONGINT}
function odd(l:longint):boolean;assembler;{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
asm
rldicl r3, r3, 0, 63
end;
{$define FPC_SYSTEM_HAS_SQR_LONGINT}
function sqr(l:longint):longint;assembler;{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
asm
mullw r3,r3,r3
end;
{$define FPC_SYSTEM_HAS_ODD_INT64}
function odd(l:int64):boolean;assembler;{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
asm
rldicl r3, r3, 0, 63
end;
{$define FPC_SYSTEM_HAS_SQR_INT64}
function sqr(l:int64):int64;assembler;{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;
asm
mulld r3,r3,r3
end;
{$define FPC_SYSTEM_HAS_SPTR}
Function Sptr : Pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif} nostackframe;