mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 18:03:29 +02:00
* LLVM-specific support for popcnt
git-svn-id: trunk@42311 -
This commit is contained in:
parent
5ee32296f0
commit
789f13eb24
@ -41,6 +41,7 @@ interface
|
||||
function first_sqr_real: tnode; override;
|
||||
function first_sqrt_real: tnode; override;
|
||||
function first_trunc_real: tnode; override;
|
||||
function first_popcnt: tnode; override;
|
||||
public
|
||||
procedure second_length; override;
|
||||
procedure second_sqr_real; override;
|
||||
@ -284,6 +285,12 @@ implementation
|
||||
result:=inherited;
|
||||
end;
|
||||
|
||||
function tllvminlinenode.first_popcnt: tnode;
|
||||
begin
|
||||
result:=ctypeconvnode.create(ccallnode.createintern('LLVM_CTPOP', ccallparanode.create(left,nil)),resultdef);
|
||||
left:=nil;
|
||||
end;
|
||||
|
||||
|
||||
procedure tllvminlinenode.second_length;
|
||||
var
|
||||
|
@ -35,6 +35,11 @@ function llvm_cttz(src: UInt16; is_zero_undef: LLVMBool1): UInt16; external name
|
||||
function llvm_cttz(src: UInt32; is_zero_undef: LLVMBool1): UInt32; external name 'llvm.cttz.i32';
|
||||
function llvm_cttz(src: UInt64; is_zero_undef: LLVMBool1): UInt64; external name 'llvm.cttz.i64';
|
||||
|
||||
function llvm_ctpop(src: UInt8): UInt8; external name 'llvm.ctpop.i8';
|
||||
function llvm_ctpop(src: UInt16): UInt16; external name 'llvm.ctpop.i16';
|
||||
function llvm_ctpop(src: UInt32): UInt32; external name 'llvm.ctpop.i32';
|
||||
function llvm_ctpop(src: UInt64): UInt64; external name 'llvm.ctpop.i64';
|
||||
|
||||
function llvm_sqrt_f32(val: single): single; compilerproc; external name 'llvm.sqrt.f32';
|
||||
function llvm_sqrt_f64(val: double): double; compilerproc; external name 'llvm.sqrt.f64';
|
||||
{$ifdef SUPPORT_EXTENDED}
|
||||
|
Loading…
Reference in New Issue
Block a user