mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 13:59:47 +02:00
* moved UseAVX from cgx86 to cpubase
+ UseAVX512 git-svn-id: trunk@47346 -
This commit is contained in:
parent
e46b426ca1
commit
47066f0ce7
@ -178,8 +178,6 @@ unit cgx86;
|
||||
winstackpagesize = 4096;
|
||||
{$endif NOTARGETWIN}
|
||||
|
||||
function UseAVX: boolean;
|
||||
|
||||
function UseIncDec: boolean;
|
||||
|
||||
{ returns true, if the compiler should use leave instead of mov/pop }
|
||||
@ -196,12 +194,6 @@ unit cgx86;
|
||||
paramgr,procinfo,
|
||||
tgobj,ncgutil;
|
||||
|
||||
function UseAVX: boolean;
|
||||
begin
|
||||
Result:={$ifdef i8086}false{$else i8086}(FPUX86_HAS_AVXUNIT in fpu_capabilities[current_settings.fputype]){$endif i8086};
|
||||
end;
|
||||
|
||||
|
||||
{ modern CPUs prefer add/sub over inc/dec because add/sub break instructions dependencies on flags
|
||||
because they modify all flags }
|
||||
function UseIncDec: boolean;
|
||||
|
@ -385,11 +385,15 @@ topsize2memsize: array[topsize] of integer =
|
||||
function requires_fwait_on_8087(op: TAsmOp): boolean;
|
||||
{$endif i8086}
|
||||
|
||||
function UseAVX: boolean;
|
||||
function UseAVX512: boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
globtype,
|
||||
rgbase,verbose;
|
||||
rgbase,verbose,
|
||||
cpuinfo;
|
||||
|
||||
const
|
||||
{$if defined(x86_64)}
|
||||
@ -948,4 +952,17 @@ implementation
|
||||
{$endif i8086}
|
||||
|
||||
|
||||
function UseAVX: boolean;
|
||||
begin
|
||||
Result:={$ifdef i8086}false{$else i8086}(FPUX86_HAS_AVXUNIT in fpu_capabilities[current_settings.fputype]){$endif i8086};
|
||||
end;
|
||||
|
||||
|
||||
function UseAVX512: boolean;
|
||||
begin
|
||||
// Result:=(current_settings.fputype in fpu_avx_instructionsets) {$ifndef i8086}or (CPUX86_HAS_AVXUNIT in cpu_capabilities[current_settings.cputype]){$endif i8086};
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user